Article View: alt.privacy.anon-server
Article #311755Re: Ping sec3
From: Grant Taylor
Date: Mon, 26 Oct 2020 19:57
Date: Mon, 26 Oct 2020 19:57
202 lines
8826 bytes
8826 bytes
On 10/26/20 7:18 AM, inwtx wrote: > Tcpdump setup and here is what I got: > sudo tcpdump -A -vv host sec3.net I reformatted the output a bit. Reminder: Syn / Ack / Push Let's look at the packets independent of their content first. Here's the first connection: > 08:09:16.427165 ... inwtx.net.57066 > caputo.sec3.net.smtp: Flags [S] ... seq 2722135890 ... length 00 > 08:09:16.436151 ... caputo.sec3.net.smtp > inwtx.net.57066: Flags [SA] ... seq 1809313142, ack 2722135891 ... length 00 > 08:09:16.436205 ... inwtx.net.57066 > caputo.sec3.net.smtp: Flags [A] ... seq 0000000001, ack 0000000001 ... length 00 These packets are the quintessential TCP 3-way handshake of the first connection. > 08:09:16.476769 ... caputo.sec3.net.smtp > inwtx.net.57066: Flags [PA] ... seq 1:49, ack 0000000001 ... length 48: SMTP, length: 48 caputo's SMTP greeting banner. > 08:09:16.476821 ... inwtx.net.57066 > caputo.sec3.net.smtp: Flags [A] ... seq 0000000001, ack 0000000049 ... length 00 inwtx acknowledging caputo's SMTP greeting banner. > 08:09:16.477119 ... inwtx.net.57066 > caputo.sec3.net.smtp: Flags [PA] ... seq 1:22, ack 0000000049 ... length 21: SMTP, length: 21 inwtx sending an extended hello. > 08:09:16.485247 ... caputo.sec3.net.smtp > inwtx.net.57066: Flags [A] ... seq 0000000049, ack 0000000022 ... length 00 caputo acknowledging inwtx's hello. > 08:09:16.730801 ... caputo.sec3.net.smtp > inwtx.net.57066: Flags [PA] ... seq 201:266, ack 0000000185 ... length 65: SMTP, length: 65 caputo sending the ESMTP supported features list. > 08:09:16.946733 ... caputo.sec3.net.smtp > inwtx.net.57066: Flags [PA] ... seq 201:266, ack 0000000185 ... length 65: SMTP, length: 65 caputo re-sending the ESMTP supported features list a second time. > 08:09:17.402800 ... caputo.sec3.net.smtp > inwtx.net.57066: Flags [PA] ... seq 201:266, ack 0000000185 ... length 65: SMTP, length: 65 caputo re-sending the ESMTP supported features list a third time. > 08:09:18.266889 ... caputo.sec3.net.smtp > inwtx.net.57066: Flags [PA] ... seq 201:266, ack 0000000185 ... length 65: SMTP, length: 65 caputo re-sending the ESMTP supported features list a fourth time. > 08:09:19.994744 ... caputo.sec3.net.smtp > inwtx.net.57066: Flags [PA] ... seq 201:266, ack 0000000185 ... length 65: SMTP, length: 65 caputo re-sending the ESMTP supported features list a fifth time. > 08:09:23.451050 ... caputo.sec3.net.smtp > inwtx.net.57066: Flags [PA] ... seq 201:266, ack 0000000185 ... length 65: SMTP, length: 65 caputo re-sending the ESMTP supported features list a sixth time. > 08:09:30.362598 ... caputo.sec3.net.smtp > inwtx.net.57066: Flags [PA] ... seq 201:266, ack 0000000185 ... length 65: SMTP, length: 65 caputo re-sending the ESMTP supported features list a seventh time. > 08:09:44.186519 ... caputo.sec3.net.smtp > inwtx.net.57066: Flags [PA] ... seq 201:266, ack 0000000185 ... length 65: SMTP, length: 65 caputo re-sending the ESMTP supported features list a eith time. This begs the following questions: Q1 - Why is caputo re-sending (retransmitting) the same packet eight times? Q2 - Why is it doing so in less than 28 seconds? Q3 - Why is inwtx not at least Acknowledging any of the packets? Q4 - Where are the rest of the packets from the first connection. Here's the second connection: > 08:10:07.185583 ... inwtx.net.40403 > caputo.sec3.net.http: Flags [S] ... seq 3170484620, win 0000029200 ... length 00 > 08:10:07.194300 ... caputo.sec3.net.http > inwtx.net.40403: Flags [SA] ... seq 1365974840, ack 3170484621 ... length 00 > 08:10:07.194357 ... inwtx.net.40403 > caputo.sec3.net.http: Flags [A] ... seq 0000000001, ack 0000000001 ... length 00 These packets are the quintessential TCP 3-way handshake of the second connection. Now let's look at this from an SMTP protocol level. Here's the first connection: > 08:09:16.476769 ... caputo.sec3.net.smtp > inwtx.net.57066: Flags [PA] > 220 caputo.sec3.net ESMTP Postfix (Debian/GNU) caputo's SMTP greeting banner. -- This is normal. > 08:09:16.477119 ... inwtx.net.57066 > caputo.sec3.net.smtp: Flags [PA] > EHLO mail.inwtx.net inwtx acknowledging caputo's SMTP greeting banner. -- This is normal. > 08:09:16.730801 ... caputo.sec3.net.smtp > inwtx.net.57066: Flags [PA] > 250 2.1.0 Ok > 250 2.1.5 Ok > 354 End data with <CR><LF>.<CR><LF> caputo sending the ESMTP supported features list. This is definitely NOT normal. 1) If it's supposed to be a multi-line SMTP reply, all but the last line is supposed to be ###-..., number, number, number, hyphen. Only the last line is supposed to be ### ..., number, number, number, space. 2) Why are there two different extended status notification numbers, 2.1.0 vs 2.1.5? 3) Why are there two basic major status groups, 2xx and 3xx? 4) Why does caputo finish responding to the EHLO command as if it's the response to the DATA command? This fundamentally violates the (E)SMTP finite state machine. caputo's SMTP server appears to be broken. Or at least something is causing it to misbehave very badly here. I'm ignoring the other seven retransmissions of the same thing because from an application's point of view, the SMTP data through the TCP connection stops and does not progress past the first transmission of the packet. This packet capture actually makes the following make more sense to me. > -Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient------- > B8EBF80193 3317 Sat Oct 24 07:44:41 mix@inwtx.net > (host caputo.sec3.net[45.138.97.132] said: 421 4.4.2 caputo.sec3.net > Error: timeout exceeded (in reply to end of DATA command)) > echolot+conf.14=1603543500=29c56a23@sec3.net I'm making the following assumptions: 1) inwtx.net generated this report output. 2) caputo.sec3.net would /eventually/ generate the "timeout exceeded (in reply to end of DATA command)" This really makes me believe that caputo.sec3.net's SMTP finite state machine is messed up (at least for inwtx.net). The reason inwtx is not completing the "DATA" command is because it hasn't ever started it. The SMTP finite state machine should go something like this: C <<< | 220 caputo.sec3.net ESMTP Postfix (Debian/GNU) I >>> | EHLO mail.inwtx.net C <<< | 250 2.1.0 Ok I >>> MAIL FROM:<...> C <<< | 250 2.1.5 Ok I >>> RCPT TO:<...> C <<< 2xx ... I >>> DATA C <<< | 354 End data with <CR><LF>.<CR><LF> I >>> ... I >>> . C <<< 2xx ... I >>> QUIT C <<< 2xx ... The pipe symbols are the lines that are actually being seen in the packet capture. I'm guessing that inwtx quits sending any data because what it's seeing does not match the SMTP finite state machine. If caputo thinks that it's entering the DATA phase, and inwtx thinks it's still after the hello, the systems fail to properly communicate. caputo quite likely will /eventually/ time out the DATA and produce an error like "timeout exceeded (in reply to end of DATA command)". I didn't hyper analyze the acknowledgement and sequence numbers beyond the first few packets (TCP 3-way handshake) and a couple after. At least not beyond seeing that one packet is being re-transmitted. But, based on what I did see, the sequence and acknowledgement numbers do match what they should, and I don't believe there are any packets missing (up to the point of retransmission) to account for the SMTP finite state machine violations. This seems VERY broken to me. I don't recall seeing anything like this in my career. -- Grant. . . . unix || die
Technical Details
Message-ID:
<rn79pa$1v2$1@tncsrv09.home.tnetconsulting.net>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!news.usenet.farm!..!..!not-for-mailReferences:
<rn2j5d$7ln$1@tncsrv09.home.tnetconsulting.net> <rn6iam$7nh$1@news.mixmin.net>Show Full Headers
Complete Article Headers
Message-ID: <rn79pa$1v2$1@tncsrv09.home.tnetconsulting.net> Subject: Re: Ping sec3 Date: Mon, 26 Oct 2020 13:57:00 -0600 From: Grant Taylor <gtaylor@tnetconsulting.net> References: <rn2j5d$7ln$1@tncsrv09.home.tnetconsulting.net> <rn6iam$7nh$1@news.mixmin.net> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!news.usenet.farm!..!..!not-for-mail Newsgroups: alt.privacy.anon-server Organization: TNet Consulting Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Mon, 26 Oct 2020 19:58:34 -0000 (UTC) Injection-Info: tncsrv09.home.tnetconsulting.net; posting-host="alpha.home.tnetconsulting.net:198.18.18.251"; User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 In-Reply-To: <rn6iam$7nh$1@news.mixmin.net> Content-Language: en-US Lines: 201