惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

H
Heimdal Security Blog
小众软件
小众软件
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
罗磊的独立博客
Google DeepMind News
Google DeepMind News
大猫的无限游戏
大猫的无限游戏
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Hugging Face - Blog
Hugging Face - Blog
阮一峰的网络日志
阮一峰的网络日志
A
About on SuperTechFans
宝玉的分享
宝玉的分享
博客园 - 聂微东
月光博客
月光博客
Cyberwarzone
Cyberwarzone
Microsoft Security Blog
Microsoft Security Blog
V
Visual Studio Blog
Project Zero
Project Zero
T
Tor Project blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
L
LINUX DO - 最新话题
博客园 - 叶小钗
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Attack and Defense Labs
Attack and Defense Labs
Spread Privacy
Spread Privacy
Forbes - Security
Forbes - Security
Simon Willison's Weblog
Simon Willison's Weblog
N
Netflix TechBlog - Medium
P
Proofpoint News Feed
Engineering at Meta
Engineering at Meta
Hacker News: Ask HN
Hacker News: Ask HN
I
InfoQ
M
MIT News - Artificial intelligence
AI
AI
博客园 - 三生石上(FineUI控件)
W
WeLiveSecurity
C
Check Point Blog
The Hacker News
The Hacker News
C
Cyber Attacks, Cyber Crime and Cyber Security
Application and Cybersecurity Blog
Application and Cybersecurity Blog
T
Tenable Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
The Cloudflare Blog
Blog — PlanetScale
Blog — PlanetScale
美团技术团队
D
Darknet – Hacking Tools, Hacker News & Cyber Security
GbyAI
GbyAI
Hacker News - Newest:
Hacker News - Newest: "LLM"
腾讯CDC
K
Kaspersky official blog

Black Hills Information Security, Inc.

Bad Habits: An ANTISOC Operation Same Problem, Different Angles: When Red Team and Blue Team Actually Talk to Each Other How to Identify and Exploit New Vulnerabilities Swapper – A Pure Regex Match/Replace Burp Extension A Practical Guide to BloodHound Data Collection Network Engineering Basics Signed, Trusted, and Abused: Proxy Execution via WebView2 Getting Started In Pentesting – Advice From The BHIS Pentest Lead Cloud Security: Tips and Resources for Securing the Cloud Lessons From A Chatbot Incident How to Lead Effective Tabletops Understanding GRC: How to Navigate Risks and Compliance Standards The “P” in PAM is for Persistence: Linux Persistence Technique Malware Analysis: How to Analyze and Understand Malware OSINT: How to Find, Use, and Control Open-Source Intelligence What to Do with Your First Home Lab When the SOC Goes to Deadwood: A Night to Remember Social Engineering and Microsoft SSPR: The Road to Pwnage is Paved with Good Intentions Common Cyber Threats Finding the Right Penetration Testing Company Deceptive-Auditing: An Active Directory Honeypots Tool The Curious Case of the Comburglar How to Set Smart Goals (That Actually Work For You) Inside the BHIS SOC: A Conversation with Hayden Covington Abusing Delegation with Impacket (Part 3): Resource-Based Constrained Delegation Why You Got Hacked – 2025 Super Edition Abusing Delegation with Impacket (Part 2): Constrained Delegation Abusing Delegation with Impacket (Part 1): Unconstrained Delegation GoSpoof – Turning Attacks into Intel Model Context Protocol (MCP) Bypassing WAFs Using Oversized Requests Getting Started with AI Hacking Part 2: Prompt Injection Wrangling Windows Event Logs with Hayabusa & SOF-ELK (Part 2) DomCat: A Domain Categorization Tool Wrangling Windows Event Logs with Hayabusa & SOF-ELK (Part 1) Microsoft Store and WinGet: Security Risks for Corporate Environments Default Web Content MailFail Commonly Abused Administrative Utilities: A Hidden Risk to Enterprise Security Stop Spoofing Yourself! Disabling M365 Direct Send Bypassing CSP with JSONP: Introducing JSONPeek and CSP B Gone Offensive Tooling Cheatsheets: An Infosec Survival Guide Resource DNS Triage Cheatsheet GraphRunner Cheatsheet Burp Suite Cheatsheet Impacket Cheatsheet Wireshark Cheatsheet Hashcat Cheatsheet EyeWitness Cheatsheet Nmap Cheatsheet Netcat (nc) Cheatsheet Hunt for Weak Spots in Your Wireless Network with Airodump-ng from the Aircrack-ng Suite Detecting ADCS Privilege Escalation Vulnerability Scanning with Nmap Getting Started with NetExec: Streamlining Network Discovery and Access How to Use Dirsearch Augmenting Penetration Testing Methodology with Artificial Intelligence – Part 3: Arcanum Cyber Security Bot How to Design and Execute Effective Social Engineering Attacks by Phone Abusing S4U2Self for Active Directory Pivoting Why Use a Macro Pad? Espanso: Text Replacement, the Easy Way Caging Copilot: Lessons Learned in LLM Security Augmenting Penetration Testing Methodology with Artificial Intelligence – Part 2: Copilot Augmenting Penetration Testing Methodology with Artificial Intelligence – Part 1: Burpference Intercepting Traffic for Mobile Applications that Bypass the System Proxy How to Root Android Phones Communicating Security to the C-Suite: A Strategic Approach Offline Memory Forensics With Volatility Getting Started with AI Hacking: Part 1 Go-Spoof: A Tool for Cyber Deception How to Test Adversary-in-the-Middle Without Hacking Tools Canary in the Code: Alert()-ing on XSS Exploits How to Hack Wi-Fi with No Wi-Fi Why Your Org Needs a Penetration Test Program Burp Suite Extension: Copy For Light at the End of the Dark Web Wi-Fi Forge: Practice Wi-Fi Security Without Hardware Avoiding Dirty RAGs: Retrieval-Augmented Generation with Ollama and LangChain Gone Phishing: Installing GoPhish and Creating a Campaign 5 Things We Are Going to Continue to Ignore in 2025 John Strand’s 5 Phase Plan For Starting in Computer Security Questions From a Beginner Threat Hunter GRC for Security Managers: From Checklists to Influence AI Large Language Models and Supervised Fine Tuning Attack Tactics 9: Shadow Creds for PrivEsc w/ Kent & Jordan One Active Directory Account Can Be Your Best Early Warning Introduction to Zeek Log Analysis Indecent Exposure: Your Secrets are Showing Creating Burp Extensions: A Beginner’s Guide Pitting AI Against AI: Using PyRIT to Assess Large Language Models (LLMs) The Top Ten List of Why You Got Hacked This Year (2023/2024) ICS Hard Knocks: Mitigations to Scenarios Found in ICS/OT Backdoors & Breaches Intro to Data Analytics Using SQL Finding Access Control Vulnerabilities with Autorize The Detection Engineering Process Cyber Risk Lessons We Can Learn From Hurricane Preparedness Intro to Desktop Application Testing Methodology What Is Penetration Testing? Adversary in the Middle (AitM): Post-Exploitation Pentesting, Threat Hunting, and SOC: An Overview
Getting Started With TCPDump
BHIS · 2020-02-24 · via Black Hills Information Security, Inc.


Hello and welcome, my name is John Strand and in this video, we’re going to be talking about getting started with TCPDump.  

Now, TCPDump is a fantastic tool, it’s one of the core essential tools that every single IT professional should have, especially Infosec professionals. The reason why is TCPDump gives us the ability to actually see inside the network traffic that’s coming and going from our computer system and if we’re on a span, port, on a switch or a mirrored port on a switch, or if we’re on a wireless network that broadcasts everything, we can see all the traffic on that particular interface as well.  But the key is, first starting out by identifying which interface you’re going to look at. 

Inside of TCPDump, you can run tcpdump -D

This will actually list out all of the available interfaces that TCPDump has to be able to sniff on. Now it’s generally just good practice 99.99% of the situations to identify the interface you’re going to sniff on. And in this situation on my handy-dandy security onion system, you can see that there are multiple interfaces that are running. Specifically, though we’re going to be looking at the ethernet interface and this one’s named ens33. Now if you’re familiar with some older versions of Linux, they used to call everything eth0, eth1, and so on. They changed that recently, we can get into that a little bit later in a video.  But the name of my ethernet interface on my security onion system is ens33. I’m also going to be looking at the local loopback adapter a little bit later.

So let’s dive in and actually start some sniffing. 

So I can do TCPDump and then I can actually specify my interface and in this situation, I provide ens33, your ethernet interface will most likely be different, and I’m also going to add a couple of additional switches. 

I’m going to add -XA

The reason why I’m putting in the X and the A is because with those two switches combined, it’s going to show me the hexadecimal output and it’s going to show me the ASCII code of that hex. 

X is for Hex. A is for ASCII.

Why is that important? Let me show you.

So we’re going to run TCPDump, specify the interface is ens33 on my computer system, yours will be different, and I do -XA. Now as soon as I run that, it pops up and it says you do not have permission to actually start sniffing. The reason for this is TCPDump requires Superuser permissions.

On a Linux or Unix based system, you need to be root.  Or on a Windows computer system, if you’re running the Windows equivalent called WinDump, you need me to running as administrator because we’re going to be running very very low-level permissions to be able to sniff the traffic on a computer.

Now to get around this error, if you ever get it, all you need to do is put a sudo in front of it. If you’ve seen the xkcd comic, sudo make me a sandwich.

This is going to switch users and then do the command tcpdump. It’s going to ask me for my password, I put in my password, hit enter and then TCPDump should be running…  if I type my password correctly, which I did not.

There we go, now it’s running.

So with this, I now want to start sending traffic that TCPDump can see. So I’m going to start by pinging 8.8.8.8 and that’s going to be Google’s DNS server. And as soon as I hit enter, Huzzah! You can see the packets being sent and the responses coming back from Google.

Now what’s interesting about this is I am doing a standard ping of Google, sending an icmp echo request to Google, and you can see that Google is responding. What’s interesting is if you look at what’s being sent you can see I’m sending to Google could you please send back 0 1 2 3 4 5 6 7 and then the reply, down here you can see the request, and then the reply is 0 1 2 3 4 5 6 7.  Ok, so it’s not all that interesting, alright I get it, so now let’s change this up just a hair okay?

So now what we’re going to do is I’m going to specify a different adapter, I’m going to specify my local loopback adapter. And I’m going to actually send some data back and forth. So whenever I start up TCPDump, I’m going to fire up Netcat, because I’m old, people. I’m going to run Netcat listening on port 2222. Then I’m going to connect, we’re going to send data through that.

So there I have my Netcat listener and then on the other side, I’m going to do Netcat 127.0.0.1 and then we’re going to go 2222 and then hit enter. And I type HELLOOOOOOOOOOOO, lots of O’s, it’s important. Hit enter and it shows up on the other side.

What did I just do?

Well, I created a little port listener on Port 2222 and then I connected and I sent through the data HELLOOOOOOOOOOOO and if we look, you can actually see inside of that packet which is unencrypted. You can see that TCPDump was able to actually see that raw data.

That’s pretty cool. 

Now there’s some other really neat options that you can run with TCPDump.

One of the things you can do with TCPDump is you can actually read in the contents of a file. So in this situation, I’m reading in a pcap file, but we’re going to spend some more time looking into that actually has command and control backdoor data in it. So we’re going to use taidoor, we’re going to look at the traffic, no interactions, just a straight pcap, it’s a really small pcap, we’re going to read in that capture file, we’re going to see the hex decode and the ASCII decode and specifically we want to look at all the data coming and going from a host.

In this situation, the compromised host is 10.0.2.15 and the port is 80. So whenever I hit enter, it’s going to read that data from that capture file and you can see the HTTP requests being sent back and forth. Up here a little bit further you’re actually able to see the encoded data with the backdoor being sent.

We’ll talk more about encoding and decoding a little bit later, but this kind of helps you get started with TCPDump.

One other quick note, whenever you’re running with TCPDump you can run TCPDump and then you can also write out the data to a file. So I’m going to specify my ethernet interface but now I’m going to do the -W, and I’m going to give it a file, ihateclowns2.pcap.

There we go.  And now what it’s going to do is, well if I’m root, I’m going to hit sudo, hit enter and now it’s sniffing on our interface and it’s writing all the data to a file. This can then be shared with other Professionals for troubleshooting and offline analysis.

One of the other great features of TCPDump is it is very fast, very lightweight, and very efficient at capturing and writing out large packet capture files. I hope you had a good time in this video and I hope to see you in the other videos in the very near future.  

Available live/virtual and on-demand