GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Conversation

Notices

  1. Embed this notice
    SwiftOnSecurity (swiftonsecurity@infosec.exchange)'s status on Sunday, 12-Jan-2025 12:32:13 JST SwiftOnSecurity SwiftOnSecurity

    ==Training Lesson==
    INVESTIGATION NARRATIVE: SSH Kill la Killed 🧵

    My job is to solve the Weird Problems as the Final escalation tier. I do this with generalist knowledge and practical experience.

    New InfoSec/IT entrants often ask what this looks like in practice. Follow below.

    In conversation about 10 months ago from infosec.exchange permalink

    Attachments


    1. https://media.infosec.exchange/infosec.exchange/media_attachments/files/113/812/114/069/231/640/original/ac4e33b4fad97aaf.png
    • Embed this notice
      Rich Felker (dalias@hachyderm.io)'s status on Sunday, 12-Jan-2025 12:32:07 JST Rich Felker Rich Felker
      in reply to
      • Dave C.

      @davesomebody @SwiftOnSecurity Back when I had DSL I was trying to figure out Linux networking hacks to intentionally make not just 2 but 5+ copies of each outgoing packet to ensure they got thru, since the DSL/ATM layers had no way to notify of lost packets or retransmit and no way to force more conservative handshake in upstream direction, and packet loss was over 75%. 🤬 Never found it tho.

      In conversation about 10 months ago permalink
    • Embed this notice
      SwiftOnSecurity (swiftonsecurity@infosec.exchange)'s status on Sunday, 12-Jan-2025 12:32:09 JST SwiftOnSecurity SwiftOnSecurity
      in reply to

      You finally get access to firewall. In the logs you find the security blocks.

      A rule named "ET SCAN Potential SSH Scan OUTBOUND" which triggers on:

      -- 5 outbound SSH connections
      -- from the same internal IP address
      -- within 120 seconds

      had been set to Block by an admin trying to do right thing.

      In conversation about 10 months ago permalink

      Attachments


      1. https://media.infosec.exchange/infosec.exchange/media_attachments/files/113/812/309/414/626/215/original/b5b741a86626ddd5.png

      2. https://media.infosec.exchange/infosec.exchange/media_attachments/files/113/812/309/690/287/112/original/080fb671a5906e80.png

      3. https://media.infosec.exchange/infosec.exchange/media_attachments/files/113/812/310/008/929/336/original/ee147944e9db571a.png
    • Embed this notice
      Dave C. (davesomebody@twit.social)'s status on Sunday, 12-Jan-2025 12:32:09 JST Dave C. Dave C.
      in reply to

      @SwiftOnSecurity reminds me of a time troubleshooting a slow network connection at a client. They had really outdone themselves setting up a redundant, round robin network. It had two of everything and the routers at the edges were cross strapped. Something got misconfigured and the cross strap was creating duplicate packets on the network causing everything to come crashing down when really using the connection. They kept blaming the software for this mess. Good times!

      In conversation about 10 months ago permalink
    • Embed this notice
      SwiftOnSecurity (swiftonsecurity@infosec.exchange)'s status on Sunday, 12-Jan-2025 12:32:10 JST SwiftOnSecurity SwiftOnSecurity
      in reply to

      (There are MULTIPLE ways to get to this eventual understanding)

      For some reason the 5th SSH session is dying early. Let's filter on the stream ID to isolate this individual TCP conversation. Yes there's a SYN then two repeats. Nothing is getting established from get-go. But what about the others?

      Going back to our original black lines in Wireshark, those are the 4 different existing connections trying to re-transmit an ACK saying please continue sending. But they are never hearing back. So the APPLICATION is seemingly not dying, it is somewhere else. And no TCP tear-down.

      In conversation about 10 months ago permalink

      Attachments


      1. https://media.infosec.exchange/infosec.exchange/media_attachments/files/113/812/280/065/740/791/original/b913bbaf26eecc68.png

      2. https://media.infosec.exchange/infosec.exchange/media_attachments/files/113/812/280/321/845/643/original/d71281898a44e917.png

      3. https://media.infosec.exchange/infosec.exchange/media_attachments/files/113/812/342/138/824/128/original/cc93341fc43fd260.png
    • Embed this notice
      SwiftOnSecurity (swiftonsecurity@infosec.exchange)'s status on Sunday, 12-Jan-2025 12:32:10 JST SwiftOnSecurity SwiftOnSecurity
      in reply to

      What do we know so far?

      1.) Initial connectivity works.
      2.) Connectivity with up to 4 sessions seems to work.
      3.) The 5th connection doesn't work.
      4.) All connectivity to server stops functioning at this point.

      This smells like an IPS firewall hitting a signature and dropping the traffic. It's probably not the remote server since no FIN but not sure how reliable that is.

      In conversation about 10 months ago permalink
    • Embed this notice
      SwiftOnSecurity (swiftonsecurity@infosec.exchange)'s status on Sunday, 12-Jan-2025 12:32:10 JST SwiftOnSecurity SwiftOnSecurity
      in reply to

      At this point we have acted on knowing _LITERALLY NOTHING_ except "the application stopped working." We didn't know WinSCP, we didn't know SSH protocol internals, or have any logs or server access.

      This is not where you WANT to start, but sometimes starting at bare-metal when you're stuck gets you a new insight.

      In conversation about 10 months ago permalink
    • Embed this notice
      SwiftOnSecurity (swiftonsecurity@infosec.exchange)'s status on Sunday, 12-Jan-2025 12:32:10 JST SwiftOnSecurity SwiftOnSecurity
      in reply to

      Okay, we know these TCP sessions are simulatanously getting

      KILL LA KILLED

      But why?

      In conversation about 10 months ago permalink

      Attachments


      1. https://media.infosec.exchange/infosec.exchange/media_attachments/files/113/812/308/307/665/151/original/ba0392c28aac2633.png
    • Embed this notice
      SwiftOnSecurity (swiftonsecurity@infosec.exchange)'s status on Sunday, 12-Jan-2025 12:32:11 JST SwiftOnSecurity SwiftOnSecurity
      in reply to

      I get WinSCP to right before the problem occurs, start recording, in one window, and start the transfers in the other. 1, 2, 3, 4... Something flashes by in Wireshark scrolling packets. 5 is stuck... Timeout.
      Well that temporal clue is unusually handy, isn't it. Could be nothing. Let's go look.

      !!! NOTE !!! This Wireshark also shows the computer talking with the server over TLS/443, ignore those they're irrelevant to this scenaro.

      In conversation about 10 months ago permalink

      Attachments


      1. https://media.infosec.exchange/infosec.exchange/media_attachments/files/113/812/353/046/782/546/original/6da0eaec2e74be8b.png
    • Embed this notice
      SwiftOnSecurity (swiftonsecurity@infosec.exchange)'s status on Sunday, 12-Jan-2025 12:32:11 JST SwiftOnSecurity SwiftOnSecurity
      in reply to

      Before jumping to conclusions at red text, let's look around. I familiarize myself with the flow of the traffic and patterns. I've never troubleshooted SSH traffic before, but I'm going to list you some of what I start to observe. Importantly, I find when it was normal.

      In conversation about 10 months ago permalink

      Attachments


      1. https://media.infosec.exchange/infosec.exchange/media_attachments/files/113/812/211/468/623/305/original/1e3255774d885ef7.png
    • Embed this notice
      SwiftOnSecurity (swiftonsecurity@infosec.exchange)'s status on Sunday, 12-Jan-2025 12:32:11 JST SwiftOnSecurity SwiftOnSecurity
      in reply to

      DISCLAIMER: I am not a network professional and there's more Wireshark stuff I could have done this is just for approachability.

      Okay, we've found a boundary layer. This is the last SSH-tagged packet and the last from the remote server, plus an ACK from client. After that it's internal noise. (you could filter more but don't have to).

      In conversation about 10 months ago permalink

      Attachments


      1. https://media.infosec.exchange/infosec.exchange/media_attachments/files/113/812/256/758/435/786/original/dba25c272dbefed4.png
    • Embed this notice
      SwiftOnSecurity (swiftonsecurity@infosec.exchange)'s status on Sunday, 12-Jan-2025 12:32:11 JST SwiftOnSecurity SwiftOnSecurity
      in reply to

      Learn to use the Statistics tools in Wireshark.
      Okay, so in networking mutliple sessions can occur by opening new source port, connecting to the server again, and then doing business that way. That appears to be how SSH works. Look! We see 4 connections with lots of traffic, then

      In conversation about 10 months ago permalink

      Attachments


      1. https://media.infosec.exchange/infosec.exchange/media_attachments/files/113/812/277/040/943/630/original/b84f99bb67196b43.png
    • Embed this notice
      SwiftOnSecurity (swiftonsecurity@infosec.exchange)'s status on Sunday, 12-Jan-2025 12:32:12 JST SwiftOnSecurity SwiftOnSecurity
      in reply to

      Okay WinSCP starts opening more (we're going to call them multithreaded) connections to transfer 6 files at once. In some protocols, you can have multiple connections for the same file.

      It starts opening them... and then the last one is stuck at connecting. And the others die?

      In conversation about 10 months ago permalink

      Attachments

      1. No result found on File_thumbnail lookup.
        DOMAIN ERROR

      2. https://media.infosec.exchange/infosec.exchange/media_attachments/files/113/812/133/047/676/128/original/3f07bbec282694e9.png
    • Embed this notice
      SwiftOnSecurity (swiftonsecurity@infosec.exchange)'s status on Sunday, 12-Jan-2025 12:32:12 JST SwiftOnSecurity SwiftOnSecurity
      in reply to

      In this non-enterprise scenario there are basically 6 broad layers this problem could be. Application, Security, OS, Network device, or Server. Many paths. It can be paralyzing, this is where experience comes in.

      In large incidents you may encounter varying levels of "hot potato" between departments where no path is selected because there is no incident command. You can learn to be that person.

      In conversation about 10 months ago permalink

      Attachments


    • Embed this notice
      SwiftOnSecurity (swiftonsecurity@infosec.exchange)'s status on Sunday, 12-Jan-2025 12:32:12 JST SwiftOnSecurity SwiftOnSecurity
      in reply to

      To emulate often limited information and collection abilities early in an incident, before doing ANY other basic troubleshooting we're going to launch Wireshark to inspect the network. Start somewhere you can!

      "But SSH is encrypted."

      Troubleshooting is often connecting metadata.

      In conversation about 10 months ago permalink

      Attachments


      1. https://media.infosec.exchange/infosec.exchange/media_attachments/files/113/812/167/561/144/480/original/3cf7439c11772636.png
    • Embed this notice
      SwiftOnSecurity (swiftonsecurity@infosec.exchange)'s status on Sunday, 12-Jan-2025 12:32:12 JST SwiftOnSecurity SwiftOnSecurity
      in reply to

      "I don't know what I'm looking for, but I'll know it when I see it."

      I have never troubleshooted WinSCP or SSH packets before. Wireshark I've used for years as basic user but not often, and my networking is really fundamentals and "weird stuff I've run into."

      Importantly, I kind of know what Normal looks like.

      In conversation about 10 months ago permalink
    • Embed this notice
      SwiftOnSecurity (swiftonsecurity@infosec.exchange)'s status on Sunday, 12-Jan-2025 12:32:13 JST SwiftOnSecurity SwiftOnSecurity
      in reply to

      NOTE: You can mute this thread if not interested it will be long.

      I have a seedbox in Europe to coalesse torrent downloads from other servers at 10gbe uplink to many other similar colocated servers hosting the content. I then collect finished over SSH file copy at my leisure.

      In conversation about 10 months ago permalink

      Attachments


      1. https://media.infosec.exchange/infosec.exchange/media_attachments/files/113/812/119/234/771/162/original/21cb6dd6acfef9cc.png
    • Embed this notice
      SwiftOnSecurity (swiftonsecurity@infosec.exchange)'s status on Sunday, 12-Jan-2025 12:32:13 JST SwiftOnSecurity SwiftOnSecurity
      in reply to

      In some scenarios you can increase overall transfer speeds by running multiple sessions simultaneously, like a multi-lane highway. This can help saturate your connection, which I was not getting.

      I go into WinSCP and turn this on, 6 sounds good.

      In conversation about 10 months ago permalink

      Attachments


      1. https://media.infosec.exchange/infosec.exchange/media_attachments/files/113/812/131/941/754/416/original/2b38314cc7bbc907.png
    • Embed this notice
      Rich Felker (dalias@hachyderm.io)'s status on Sunday, 12-Jan-2025 12:33:40 JST Rich Felker Rich Felker
      in reply to

      @SwiftOnSecurity LOL'd that in the end it was your own BOFH inspection rule doing it. I kinda guessed this halfway thru tho. 😁

      In conversation about 10 months ago permalink

Feeds

  • Activity Streams
  • RSS 2.0
  • Atom
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.