SlideShare a Scribd company logo
Sniffing in a Switched Network -With A Recipe To Hack A Switch Using Ettercap and Ethereal Manu Garg http:// www.manugarg.com manugarg at gmail dot com
Problem Statement - To gain access to main switch of your company using a machine in the same LAN. Tools used - Ettercap, Ethereal Techniques Used- Arp spoofing and Sniffing
How can we achieve our goal? Most of the network administrators use telnet to login to a cisco machine.  Telnet is a clear-text protocol – so, if you can sniff the packets you can get to know what is other person talking to the machine. Easy then, I will just sniff the packets from the wire and get into my switch.  Hey, I don’t see any traffic on the wire. What could be the reason? You are in switched network and switches don’t do any favor to the hackers. They transmit data only between the talking machines.  But this is not fair. They said I am on ethernet. Are they not supposed to use CSMA/CD then?  Ethernet has grown up buddy. It’s ‘switched ethernet’ now.
Hey wait! Don’t get disappointed too soon. We hackers are not supposed to get defeated by a switch. Right? Right. Our elite masters who designed TCP/IP protocols didn’t forget us. They left an otherwise invisible path which can only be seen by their enlightened students. So what is that path? It’s the path of arp spoofing. By using this technique you can fool your target machines to send data through your attacking machine and then you can sniff it on your attacking machine.
ARP SPOOFING!! How does it work? Target 1 IP: 192.168.1.1 Hw: 00:00:00:00:00:01 Target 2 IP: 192.168.1.100 Hw: 00:00:00:00:00:02 AM (Attacking Machine) IP: 192.168.1.121 Hw: 00:00:00:00:00:03 Switch Switch forwarding traffic based on MAC address Before Attack……..
T1(192.168.1.1): T2(192.168.1.100): Before attack, T1 and T2 are talking to each other only. Below is the arp table of the machines. The switch understands only MAC addresses and forwards the packets to the right machines based on this MAC address. What if we manipulate the arp tables (this is called arp poisoning) on T1 and T2 so that the target MAC address in all the packets being exchanged between them, becomes the MAC address of our attacking machine. You got it right. Then switch will forward the packet to the attacking machine. So after attack arp table should look like something below: T1: T2: Where 00:00:00:00:00:03 is the MAC address of attacking machine . 00:00:00:00:00:14 192.168.1.123 00:00:00:00:00:02 192.168.1.100 00:00:00:00:00:14 192.168.1.123 00:00:00:00:00:01 192.168.1.1 00:00:00:00:00:14 192.168.1.123 00:00:00:00:00:03 192.168.1.100 00:00:00:00:00:14 192.168.1.123 00:00:00:00:00:03 192.168.1.1
ARP SPOOFING!! How does it work? Target 1 IP: 192.168.1.1 Hw: 00:00:00:00:00:01 Target 2 IP: 192.168.1.100 Hw: 00:00:00:00:00:02 AM (Attacking Machine) IP: 192.168.1.121 Hw: 00:00:00:00:00:03 Switch Switch forwarding traffic based on MAC address After Attack…….. Note: Don’t forget to enable ip_forwarding on your attacking machine otherwise you’ll break down traffic between 2 machines.
OK. I guess, now you know what ARP spoofing is. Now the bigger question - How do we poison ARP table on T1 and T2? Explanation starts from another question. How do the hosts build this arp table?  This table is built using arp protocol. ARP protocol has 2 kinds of packets – ARP request and ARP reply. When a machine (say, A) wants to know MAC address of another machine (say, B), it sends an ARP request asking “who has IP address B”. This is a broadcast, i.e. sent to FF:FF:FF:FF:FF:FF. It is picked up by all the machines in the LAN and only the machine possessing IP address B sends an ARP reply. It is sent to machine A only. Machine A stores this MAC address in it’s ARP table. Now you must be getting some clue. Yes, we are going to poison ARP table of T1 and T2 by sending them ARP replies. Most of the machines are generous enough and respect the ARP reply packet even when there was no request for particular IP address. There are some machines, for example SunOS, which make an ARP entry only if there is a request for the one or if that ip is already in the ARP table.  We can make them request for particular IP address by sending them an ICMP Echo packet from that IP address.
Ok. So you want me to create these ARP replies myself and manage all this. No dude. We have blessings of our fellow hackers.  Alberto Ornaghi (a.k.a. ALoR) and Marco Valleri (a.k.a. NaGA) from Milan have created a nice tool called  Ettercap  based on equally cool library ‘ libnet ’ from Mike. Ettercap is pretty versatile and tool of choice for MITM attacks including ARP spoofing. Ettercap also has sniffing capabilities, but I prefer to use it only for spoofing. For sniffing, I prefer using  Ethereal . Main reason for this is the use of pcap format for storing packets by ethereal. Pcap is a pretty old format and there are many tools available to analyze pcap files. So, use ettercap for arp spoofing. Enable ip forwarding in kernel to maintain the connection between victim machines. And start sniffing using tethereal (text interface to ethereal). That’s all you need to do.
Recipe Let’s try to do everything said till now. Let’s look at our problem once again We want to get into the main switch of our company. This will allow us to configure the switch ports the way we want.  First task, find out ip address of the switch. In my case it is 192.168.1.100. You can use  Nmap ’s OS detection feature to guess it. Now find out how network admin communicates with the switch. In my case network admin sits offsite. So, he connects to the switch through WAN and the requests come through the gateway. I use another machine in the same subset to observe the traffic for sometime and find out that all incoming traffic to the subnet comes through the router 192.168.1.2 and all outgoing traffic goes through the router 192.168.1.1.  So, when a network guy from 192.168.101.34 logs into the switch console, packets are routed through the routers 192.168.1.1 and 192.168.1.2.
Routers (R) 192.168.1.1 Hw Addr. 00:00:00:00:00:01  Attacked Switch (S) Cisco Catalyst 5000 series 192.168.1.100 Hw. Addr. 00:00:00:00:00:02 Attacking Machine (M) RHEL AS 4.0 192.168.1.121 Hw Addr : 00:00:00:00:00:03 Same subnet Rest of the network Routers (R) 192.168.1.2 Hw Addr. 00:00:00:00:00:04
As you can guess, I need to put attacking machine in the path between 192.168.1.1 - 192.168.1.100 to tap outgoing packets and 192.168.1.2 – 192.168.1.100 to tap incoming packets.  So, I need to tell the router 192.168.1.2 that 192.168.1.100 is at 00:00:00:00:00:03 which is the MAC address of attacking machine. At the same time also tell switch i.e. 192.168.1.100 that 192.168.1.1 is at 00:00:00:00:00:03. Before inviting packets to your machine, make sure you have path for them to reach their destination i.e. don’t forget to enable ip forwarding. In linux you can enable ip forwarding using following command: echo 1 >/proc/sys/net/ipv4/ip_forward Recipe …
To start arp spoofing using ettercap: ettercap -o -T -P repoison_arp -M arp:remote /192.168.1.100/ /192.168.1.1-2/ -o  : only spoofing no sniffing. -T  : text mode -P repoison_arp Tells it to load plugin repoison_arp. This plugin re-poisons arp table at some  intervals  -M arp:remote /192.168.1.100/ /192.168.1.1-2/ Tells it to start MITM attack with 192.168.1.100 in first target group and  192.168.1.1, 192.168.1.2 in second target group. I’ll suggest you to run ettercap in screen terminal, so that you can detach from screen and forget about it for some time. I used “ettercap NG-0.7.2”. You can download it from  http://ettercap.sourceforge.com . Start spoofing….
Start Sniffing … Now you are all set to start sniffing. Use following command to start sniffing and write packets to a file: # tethereal -afilesize:100000 -w /tmp/cisco.pcap -f "host 192.168.1.100 and not arp and not icmp” -afilesize:100000  limits the file size to 100MB. -w /tmp/cisco.pcap writes packets to /tmp/cisco.pcap -f “host 192.168.1.100 and not arp and not icmp ” is the filter string. It tells to collect the packets either coming from or  going to  192.168.1.100 and not to collect any arp or icmp packets.
Use some social engineering. Find out when network team is going to work on the switch or any other host which you want to break into. Leave your tools running while they do it. Later on you can analyze the capture file by opening it in ethereal and you can just follow the telnet stream to find out the password. That’s all it takes.  A  person  is smart.  People  are dumb, panicky, dangerous animals and you know it.    --Ed Solomon

More Related Content

PPTX
Packet sniffing in switched LANs
PPT
Packet Sniffing
PPTX
PACKET Sniffer IMPLEMENTATION
PPTX
Packet capture in network security
PPT
Hacking Cisco
PDF
Packet sniffing
PDF
Sniffing via dsniff
DOCX
Network scanning with nmap
Packet sniffing in switched LANs
Packet Sniffing
PACKET Sniffer IMPLEMENTATION
Packet capture in network security
Hacking Cisco
Packet sniffing
Sniffing via dsniff
Network scanning with nmap

What's hot (20)

PPT
Dynamic Port Scanning
PPTX
Understanding NMAP
PPTX
PDF
Basics of firewall, ebtables, arptables and iptables
PPTX
NMAP - The Network Scanner
PPTX
Nmap and metasploitable
PPTX
PDF
Ch 5: Port Scanning
PPTX
PPT
PDF
Nmap Basics
PPTX
Recon with Nmap
PPT
Nmap(network mapping)
PPTX
ODP
Scanning with nmap
PPT
IP tables
PDF
Packet Filtering Using Iptables
PPT
TCPdump-Wireshark
Dynamic Port Scanning
Understanding NMAP
Basics of firewall, ebtables, arptables and iptables
NMAP - The Network Scanner
Nmap and metasploitable
Ch 5: Port Scanning
Nmap Basics
Recon with Nmap
Nmap(network mapping)
Scanning with nmap
IP tables
Packet Filtering Using Iptables
TCPdump-Wireshark
Ad

Viewers also liked (20)

PPTX
Sniffing and spoofing
PDF
832-7678-2-PB
PPTX
vicrael pineda
PPTX
Επιχειρηματικότητα και μοντέλα διαδικτυακής επιχειρηματικοτητας
PPTX
Matemáticas II - ecuaciones lineales 3 incognitas
PPTX
Matemáticas II - ecuaciones cuadráticas
PPTX
Matemáticas II - bloque 3
PPTX
Class 4A OT425 2017
PPT
Lecture3a symmetric encryption
PPTX
Prensentation on packet sniffer and injection tool
PPT
Effect of substituents and functions on drug structure activity relationships
PDF
Rotary Newsletter - 30 January 2017
PPTX
Tata steel’s acquisition of corus
PPTX
Tata Corus acquisition
PPTX
Denial of service attack
PDF
LA VACA ( RESUMEN LIBRO)
PDF
Top U.S. Imports: Apparel
PPTX
Phishing ppt
PPTX
Denial of service attack
Sniffing and spoofing
832-7678-2-PB
vicrael pineda
Επιχειρηματικότητα και μοντέλα διαδικτυακής επιχειρηματικοτητας
Matemáticas II - ecuaciones lineales 3 incognitas
Matemáticas II - ecuaciones cuadráticas
Matemáticas II - bloque 3
Class 4A OT425 2017
Lecture3a symmetric encryption
Prensentation on packet sniffer and injection tool
Effect of substituents and functions on drug structure activity relationships
Rotary Newsletter - 30 January 2017
Tata steel’s acquisition of corus
Tata Corus acquisition
Denial of service attack
LA VACA ( RESUMEN LIBRO)
Top U.S. Imports: Apparel
Phishing ppt
Denial of service attack
Ad

Similar to Sniffing in a Switched Network (20)

PPT
Arp spoofing
PDF
04-post-connection-attacks.pdf
PPT
Mitigating Layer2 Attacks
PPTX
packet sniffing with Wireshark and its implementation.pptx
PPTX
Packet sniffing in LAN
PPTX
Et4045-3-attacks-2
PPT
Network Security - Layer 2
PDF
Manipulating the network with packet fu
PDF
Manipulating the Network with PacketFu
PPTX
Packet sniffing
PDF
Ceh v5 module 07 sniffers
PPTX
Packet sniffingin switch lans
PPT
SAS (Secure Active Switch)
PDF
1-300-206 (SENSS)=Firewall (642-618)
PDF
Layer2&arp
PPT
6005679.ppt
PPT
Dynamic Port Scanning
PPTX
Hacking L2 Switches
PDF
Network security
Arp spoofing
04-post-connection-attacks.pdf
Mitigating Layer2 Attacks
packet sniffing with Wireshark and its implementation.pptx
Packet sniffing in LAN
Et4045-3-attacks-2
Network Security - Layer 2
Manipulating the network with packet fu
Manipulating the Network with PacketFu
Packet sniffing
Ceh v5 module 07 sniffers
Packet sniffingin switch lans
SAS (Secure Active Switch)
1-300-206 (SENSS)=Firewall (642-618)
Layer2&arp
6005679.ppt
Dynamic Port Scanning
Hacking L2 Switches
Network security

More from amiable_indian (20)

PDF
Phishing As Tragedy of the Commons
PDF
Cisco IOS Attack & Defense - The State of the Art
PDF
Secrets of Top Pentesters
PPS
Workshop on Wireless Security
PDF
Insecure Implementation of Security Best Practices: of hashing, CAPTCHA's and...
PPS
Workshop on BackTrack live CD
PPS
Reverse Engineering for exploit writers
PPS
State of Cyber Law in India
PPS
AntiSpam - Understanding the good, the bad and the ugly
PPS
Reverse Engineering v/s Secure Coding
PPS
Network Vulnerability Assessments: Lessons Learned
PPS
Economic offenses through Credit Card Frauds Dissected
PPS
Immune IT: Moving from Security to Immunity
PPS
Reverse Engineering for exploit writers
PPS
Hacking Client Side Insecurities
PDF
Web Exploit Finder Presentation
PPT
Network Security Data Visualization
PPT
Enhancing Computer Security via End-to-End Communication Visualization
PDF
Top Network Vulnerabilities Over Time
PDF
What are the Business Security Metrics?
Phishing As Tragedy of the Commons
Cisco IOS Attack & Defense - The State of the Art
Secrets of Top Pentesters
Workshop on Wireless Security
Insecure Implementation of Security Best Practices: of hashing, CAPTCHA's and...
Workshop on BackTrack live CD
Reverse Engineering for exploit writers
State of Cyber Law in India
AntiSpam - Understanding the good, the bad and the ugly
Reverse Engineering v/s Secure Coding
Network Vulnerability Assessments: Lessons Learned
Economic offenses through Credit Card Frauds Dissected
Immune IT: Moving from Security to Immunity
Reverse Engineering for exploit writers
Hacking Client Side Insecurities
Web Exploit Finder Presentation
Network Security Data Visualization
Enhancing Computer Security via End-to-End Communication Visualization
Top Network Vulnerabilities Over Time
What are the Business Security Metrics?

Recently uploaded (20)

PPTX
Spectroscopy.pptx food analysis technology
PDF
Machine learning based COVID-19 study performance prediction
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
KodekX | Application Modernization Development
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
sap open course for s4hana steps from ECC to s4
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PPTX
Cloud computing and distributed systems.
PPT
Teaching material agriculture food technology
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
Spectroscopy.pptx food analysis technology
Machine learning based COVID-19 study performance prediction
20250228 LYD VKU AI Blended-Learning.pptx
Dropbox Q2 2025 Financial Results & Investor Presentation
Advanced methodologies resolving dimensionality complications for autism neur...
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
KodekX | Application Modernization Development
Spectral efficient network and resource selection model in 5G networks
Chapter 3 Spatial Domain Image Processing.pdf
MIND Revenue Release Quarter 2 2025 Press Release
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
sap open course for s4hana steps from ECC to s4
“AI and Expert System Decision Support & Business Intelligence Systems”
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Cloud computing and distributed systems.
Teaching material agriculture food technology
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Reach Out and Touch Someone: Haptics and Empathic Computing

Sniffing in a Switched Network

  • 1. Sniffing in a Switched Network -With A Recipe To Hack A Switch Using Ettercap and Ethereal Manu Garg http:// www.manugarg.com manugarg at gmail dot com
  • 2. Problem Statement - To gain access to main switch of your company using a machine in the same LAN. Tools used - Ettercap, Ethereal Techniques Used- Arp spoofing and Sniffing
  • 3. How can we achieve our goal? Most of the network administrators use telnet to login to a cisco machine. Telnet is a clear-text protocol – so, if you can sniff the packets you can get to know what is other person talking to the machine. Easy then, I will just sniff the packets from the wire and get into my switch. Hey, I don’t see any traffic on the wire. What could be the reason? You are in switched network and switches don’t do any favor to the hackers. They transmit data only between the talking machines. But this is not fair. They said I am on ethernet. Are they not supposed to use CSMA/CD then? Ethernet has grown up buddy. It’s ‘switched ethernet’ now.
  • 4. Hey wait! Don’t get disappointed too soon. We hackers are not supposed to get defeated by a switch. Right? Right. Our elite masters who designed TCP/IP protocols didn’t forget us. They left an otherwise invisible path which can only be seen by their enlightened students. So what is that path? It’s the path of arp spoofing. By using this technique you can fool your target machines to send data through your attacking machine and then you can sniff it on your attacking machine.
  • 5. ARP SPOOFING!! How does it work? Target 1 IP: 192.168.1.1 Hw: 00:00:00:00:00:01 Target 2 IP: 192.168.1.100 Hw: 00:00:00:00:00:02 AM (Attacking Machine) IP: 192.168.1.121 Hw: 00:00:00:00:00:03 Switch Switch forwarding traffic based on MAC address Before Attack……..
  • 6. T1(192.168.1.1): T2(192.168.1.100): Before attack, T1 and T2 are talking to each other only. Below is the arp table of the machines. The switch understands only MAC addresses and forwards the packets to the right machines based on this MAC address. What if we manipulate the arp tables (this is called arp poisoning) on T1 and T2 so that the target MAC address in all the packets being exchanged between them, becomes the MAC address of our attacking machine. You got it right. Then switch will forward the packet to the attacking machine. So after attack arp table should look like something below: T1: T2: Where 00:00:00:00:00:03 is the MAC address of attacking machine . 00:00:00:00:00:14 192.168.1.123 00:00:00:00:00:02 192.168.1.100 00:00:00:00:00:14 192.168.1.123 00:00:00:00:00:01 192.168.1.1 00:00:00:00:00:14 192.168.1.123 00:00:00:00:00:03 192.168.1.100 00:00:00:00:00:14 192.168.1.123 00:00:00:00:00:03 192.168.1.1
  • 7. ARP SPOOFING!! How does it work? Target 1 IP: 192.168.1.1 Hw: 00:00:00:00:00:01 Target 2 IP: 192.168.1.100 Hw: 00:00:00:00:00:02 AM (Attacking Machine) IP: 192.168.1.121 Hw: 00:00:00:00:00:03 Switch Switch forwarding traffic based on MAC address After Attack…….. Note: Don’t forget to enable ip_forwarding on your attacking machine otherwise you’ll break down traffic between 2 machines.
  • 8. OK. I guess, now you know what ARP spoofing is. Now the bigger question - How do we poison ARP table on T1 and T2? Explanation starts from another question. How do the hosts build this arp table? This table is built using arp protocol. ARP protocol has 2 kinds of packets – ARP request and ARP reply. When a machine (say, A) wants to know MAC address of another machine (say, B), it sends an ARP request asking “who has IP address B”. This is a broadcast, i.e. sent to FF:FF:FF:FF:FF:FF. It is picked up by all the machines in the LAN and only the machine possessing IP address B sends an ARP reply. It is sent to machine A only. Machine A stores this MAC address in it’s ARP table. Now you must be getting some clue. Yes, we are going to poison ARP table of T1 and T2 by sending them ARP replies. Most of the machines are generous enough and respect the ARP reply packet even when there was no request for particular IP address. There are some machines, for example SunOS, which make an ARP entry only if there is a request for the one or if that ip is already in the ARP table. We can make them request for particular IP address by sending them an ICMP Echo packet from that IP address.
  • 9. Ok. So you want me to create these ARP replies myself and manage all this. No dude. We have blessings of our fellow hackers. Alberto Ornaghi (a.k.a. ALoR) and Marco Valleri (a.k.a. NaGA) from Milan have created a nice tool called Ettercap based on equally cool library ‘ libnet ’ from Mike. Ettercap is pretty versatile and tool of choice for MITM attacks including ARP spoofing. Ettercap also has sniffing capabilities, but I prefer to use it only for spoofing. For sniffing, I prefer using Ethereal . Main reason for this is the use of pcap format for storing packets by ethereal. Pcap is a pretty old format and there are many tools available to analyze pcap files. So, use ettercap for arp spoofing. Enable ip forwarding in kernel to maintain the connection between victim machines. And start sniffing using tethereal (text interface to ethereal). That’s all you need to do.
  • 10. Recipe Let’s try to do everything said till now. Let’s look at our problem once again We want to get into the main switch of our company. This will allow us to configure the switch ports the way we want. First task, find out ip address of the switch. In my case it is 192.168.1.100. You can use Nmap ’s OS detection feature to guess it. Now find out how network admin communicates with the switch. In my case network admin sits offsite. So, he connects to the switch through WAN and the requests come through the gateway. I use another machine in the same subset to observe the traffic for sometime and find out that all incoming traffic to the subnet comes through the router 192.168.1.2 and all outgoing traffic goes through the router 192.168.1.1. So, when a network guy from 192.168.101.34 logs into the switch console, packets are routed through the routers 192.168.1.1 and 192.168.1.2.
  • 11. Routers (R) 192.168.1.1 Hw Addr. 00:00:00:00:00:01 Attacked Switch (S) Cisco Catalyst 5000 series 192.168.1.100 Hw. Addr. 00:00:00:00:00:02 Attacking Machine (M) RHEL AS 4.0 192.168.1.121 Hw Addr : 00:00:00:00:00:03 Same subnet Rest of the network Routers (R) 192.168.1.2 Hw Addr. 00:00:00:00:00:04
  • 12. As you can guess, I need to put attacking machine in the path between 192.168.1.1 - 192.168.1.100 to tap outgoing packets and 192.168.1.2 – 192.168.1.100 to tap incoming packets. So, I need to tell the router 192.168.1.2 that 192.168.1.100 is at 00:00:00:00:00:03 which is the MAC address of attacking machine. At the same time also tell switch i.e. 192.168.1.100 that 192.168.1.1 is at 00:00:00:00:00:03. Before inviting packets to your machine, make sure you have path for them to reach their destination i.e. don’t forget to enable ip forwarding. In linux you can enable ip forwarding using following command: echo 1 >/proc/sys/net/ipv4/ip_forward Recipe …
  • 13. To start arp spoofing using ettercap: ettercap -o -T -P repoison_arp -M arp:remote /192.168.1.100/ /192.168.1.1-2/ -o : only spoofing no sniffing. -T : text mode -P repoison_arp Tells it to load plugin repoison_arp. This plugin re-poisons arp table at some intervals -M arp:remote /192.168.1.100/ /192.168.1.1-2/ Tells it to start MITM attack with 192.168.1.100 in first target group and 192.168.1.1, 192.168.1.2 in second target group. I’ll suggest you to run ettercap in screen terminal, so that you can detach from screen and forget about it for some time. I used “ettercap NG-0.7.2”. You can download it from http://ettercap.sourceforge.com . Start spoofing….
  • 14. Start Sniffing … Now you are all set to start sniffing. Use following command to start sniffing and write packets to a file: # tethereal -afilesize:100000 -w /tmp/cisco.pcap -f "host 192.168.1.100 and not arp and not icmp” -afilesize:100000 limits the file size to 100MB. -w /tmp/cisco.pcap writes packets to /tmp/cisco.pcap -f “host 192.168.1.100 and not arp and not icmp ” is the filter string. It tells to collect the packets either coming from or going to 192.168.1.100 and not to collect any arp or icmp packets.
  • 15. Use some social engineering. Find out when network team is going to work on the switch or any other host which you want to break into. Leave your tools running while they do it. Later on you can analyze the capture file by opening it in ethereal and you can just follow the telnet stream to find out the password. That’s all it takes. A person is smart. People are dumb, panicky, dangerous animals and you know it. --Ed Solomon