Monday, April 21, 2025

Monitoring transient network traffic session

 Sometimes there is a need to investigate network traffic that is transient. To make the problem clearer, let's examine this example. The firewall indicates some network traffic was blocked:


Block IPv4 link-local (1000000102) 192.168.99.99:35018 169.254.169.254:80 TCP:S 

We  want to figure out which process that sent out the packets. So, we would do something like


sudo netstat -anp | grep 35018

Unfortunately, this yields nothing because at the time we issue the netstat command port 35018 is not open. It turns out the network traffic is short-lived. How do we figure out which process sends out the packets? Of course, we could try to capture the packets:


tcpdump -XX -i any host 169.254.169.254 and port 80

which indeed captures the packets, and also shows the header and content of the packets captured. Sometimes, the packet header and the content are sufficiently for us to figure out what progress sent out the packets. However, what if the packet header and the content do not offer a clue?

It turns out, we can use sysdig, for instance, we can use it in this way:


sysdig -p '*%evt.num  %evt.time   %evt.cpu   %proc.name   (%thread.tid %proc.ppid)   %evt.dir %evt.type %evt.info' fd.rip=169.254.169.254 and fd.rport=80

which tells us the process that sent out the packets and the parent process PID. The process that sent out the packets may have gone, but it is offen that the parent process is still around. This solves us the problem because it offers a way to investigate further.

2 comments:

  1. // Observing and analyzing temporary network traffic sessions to track data flow and identify anomalies.

    <a href="https://digitalfloats.com/video-editing-course-in-hyderabad/">Monitoring transient network traffic session
    ;/a>
    https://digitalfloats.com/video-editing-course-in-hyderabad

    ReplyDelete
  2. FundedFirm has solidified its reputation as the Best prop firm in Nigeria by providing ambitious traders with access to simulated accounts reaching up to $200,000. The platform’s innovative evaluation process, featuring both one-phase and two-phase challenges, is engineered to identify and reward true market talent. Traders benefit from institutional-level liquidity, ultra-low spreads, and the ability to retain up to 100% of their generated profits. With a dedicated focus on transparency, seamless MT5 integration, and consistent bi-weekly payouts, FundedFirm offers the ideal ecosystem for the local trading community to scale their strategies and achieve professional independence without risking personal capital.

    Best prop firm in Nigeria

    ReplyDelete