SlideShare a Scribd company logo
Hacking Primer
Outline Internet footprinting Hacking Windows Hacking Unix/Linux Hacking the network
Internet Footprinting © 2004 Cisco Systems, Inc. All rights reserved. mnystrom
Internet Footprinting Outline Review publicly available information Perform network reconnaissance Discover landscape Determine vulnerable services
Review publicly available information News: Look for recent news news.google.com SEC filings Search for phone numbers, contacts Technical info: Look for stupid postings Router configs Admin pages Nessus scans Netcraft Whois/DNS info SamSpade dig
Network reconnaissance Use traceroute to find vulnerable servers Trout Can also query BGP tools http://nitrous.digex.net/mae/equinix.html Look up ASNs
Landscape discovery Ping sweep: Find out which hosts are alive nmap, fping, gping, SuperScan, etc. Port scans: Find out which ports are listening Don’t setup a full connection – just SYN Netcat can be run in encrypted mode – cryptcat nmap advanced options XMAS scan sends all TCP options Source port scanning sets source port (e.g., port 88 to scan Windows systems) Time delays Banner grab & O/S guess telnet ftp netcat nmap
Hacking Windows © 2004 Cisco Systems, Inc. All rights reserved. mnystrom
Hacking Windows outline Scan Enumerate Penetrate Escalate Pillage Get interactive Expand influence
Scanning Windows Port scan, looking for what’s indicative of Windows 88 – Kerberos 139 – NetBIOS 445 – SMB/CIFS 1433 – SQL Server 3268, 3269 – Active Directory 3389 – Terminal Services Trick: Scan from source port = 88 to find IPSec secured systems
Enumerating Windows Accounts USER account used by most code, but escalates to SYSTEM to perform kernel-level operations System accounts tracked by their SIDs RID at end of SID identifies account type RID = 500 is admin account Need to escalate to Administrator to have any real power Tools userdump – enumerates users on a host sid2user & user2sid translates account names on a host SAM Contains usernames, SIDs, RIDs, hashed passwords Local account stored in local SAM Domain accounts stored in Active Directory (AD) Trusts Can exist between AD domains Allows accounts from one domain to be used in ACLs on another domain
Enumerating Windows (cont.) Need access to ports 135, 139, 445 Enumerate hosts in a domain net view /domain:<domain name> Find domain controller(s) nltest /dsgetdc:<domain name> /pdc nltest /bdc_query:<domain name> nbtstcan – fast NetBIOS scanner null sessions are an important way to get info Runs over 445 Not logged by most IDS net use  \\<target>\ipc$  “” /u:”” “ local” (from ResKit) or Dumpsec can then enumerate accounts Countermeasures Block UDP/137 Set RestictAnonymous registry value
Enumerating Windows (cont.) Look for hosts with 2 NICs “ getmac” from Win2K resource kit Enumerate trusts on domain controller nltest /server:amer /trusted_domains Enumerate shares with DumpSec Hidden shares have “$” at the end Enumerate with LDAP LDAPminer
Penetrating Windows 3 methods Guess password Obtain hashes Emergency Repair Disk Exploit a vulnerable service Guessing passwords Review vulnerable accounts via dumpsec Use NetBIOS Auditing Tool to guess passwords
Escalating privileges in Windows getadmin getad getad2 pipeupadmin Shatter Yields system-level privileges Works against Windows Server 2003
Pillaging Windows Clear logs Some IDS’s will restart auditing once it’s been disabled Grab hashes Remotely with pwdump3 Backup SAM: c:\winnt\repair\sam._ Grab passwords Sniff SMB traffic Crack passwords L0phtcrack John the Ripper
Getting interactive with Windows Copy rootkit over a share Hide rootkit on the target server Low traffic area such as winnt\system32\OS2\dll\toolz Stream tools into files Remote shell remote.exe (resource kit tool) netcat How to fire up remote listener? trojan Leave a CD in the bathroom titled, “pending layoffs”   Schedule it for remote execution at scheduler psexec
Windows – Expand influence Get passwords Keystroke logger with stealth mail FakeGINA intercepts Winlogon Plant stuff in registry to run on reboot Hide files  “ attrib +h <directory>” Stream files Tripwire should catch this stuff
Hacking Unix/Linux © 2004 Cisco Systems, Inc. All rights reserved. mnystrom
Hacking Unix/Linux outline Discover landscape Enumerate systems Attack Remote Local Get beyond root
Discover landscape Goals Discover available hosts Find all running services Methodology ICMP and TCP ping scans Find listening services with nmap and udp_scan Discover paths with ICMP, UDP, TCP Tools nmap SuperScan (Windows) udp_scan (more reliable than nmap for udp scanning)
Enumerate systems Goal:  Discover the following… Users Operating systems Running programs Specific software versions Unprotected files Internal information Tools OS/Application: telnet, ftp, nc, nmap Users: finger, rwho,rusers, SMTP RPC programs: rpcinfo NFS shares: showmount File retrieval: TFTP SNMP: snmpwalk snmpget
Enumerate services Users finger SMTP vrfy DNS info dig RPC services rpcinfo NFS shares showmount Countermeasures Turn off un-necessary services Block IP addresses with router ACLs or TCP wrappers
Attack remotely 3 primary methods Exploit a listening service Route through a system with 2 or more interfaces Get user to execute it for you Trojans Hostile web site Brute-force against service http://packetstormsecurity.nl/Crackers/ Countermeasure: strong passwords, hide user names Buffer-overflow attack Overflow the stack with machine-dependent code (assembler) Usually yields a shell – shovel it back with netcat Prime targets: programs that run as root or suid Countermeasures Disable stack execution Code reviews Limit root and suid programs
Attack remotely (cont.) Buffer overflow example echo “vrfy `perl –e ‘print “a” x 1000’`” |nc  www.targetsystem.com  25 Replace this with something like this… char shellcode[] = “\xeb\xlf\x5e\x89\x76\x08…” Input validation attacks PHF CGI – newline character SSI passes user input to O/S Back channels X-Windows Send display back to attacker’s IP Reverse telnet
Attack remotely (cont.)  Countermeasures against back channels Get rid of executables used for this (x-windows, telnet, etc.) Commonly attacked services Sendmail NFS RPC X-windows (sniffing session data) ftpd (wu-ftpd) DNS Guessable query IDs BIND vulnerabilities Countermeasures Restrict zone transfers Block TCP/UDP 53 Don’t use HINFO records
Attack locally Buffer overflow Setuid programs Password guessing/cracking Mis-configured file/dir permissions
Get beyond root Map the network (own more hosts) Install rootkit crypto checksum is the only way to know if it’s real Create backdoors Sniff other traffic dsniff arpredirect loki Hunt Countermeasures Encrypt all traffic Switched networks (not a panacaea) Clean logs Session hijacking
Hacking the Network © 2004 Cisco Systems, Inc. All rights reserved. mnystrom Vulnerabilities Dealing with firewalls
Vulnerabilities TTY access – 5 to choose from SNMP V2 community strings HTTP (Everthing is clear-text) TFTP No auth Easy to discern router config files “<router-name>.cfg Countermeasures ACLs TCP wrappers Encrypt passwords
Vulnerabilities: routing issues Path integrity Source routing reveals path through the network Routing updates can be spoofed (RIP, IGRP) ARP spoofing Easy with dsniff
Dealing with firewalls Enumerate with nmap or tcpdump Can show you which ports are filtered (blocked) Some proxies return a banner Eagle Raptor TCP traffic itself may provide signature Ping the un-pingable hping Look for ICMP type 13 (admin prohibited)
Dealing with firewalls (cont.) ACLs may allow scanning if source port is set nmap with “-g” option Port redirection fpipe netcat
Questions?

More Related Content

What's hot (20)

PPT
Module 2 Foot Printing
leminhvuong
 
DOCX
CEH v9 cheat sheet notes Certified Ethical Hacker
David Sweigert
 
DOCX
Certified Ethical Hacker quick test prep cheat sheet
David Sweigert
 
PPT
Enabling Worm and Malware Investigation Using Virtualization
amiable_indian
 
PPT
Module 3 Scanning
leminhvuong
 
PPT
hacking and crecjing
parth jasani
 
PPTX
System hacking
CAS
 
PPTX
Ethical hacking Chapter 6 - Port Scanning - Eric Vanderburg
Eric Vanderburg
 
PPTX
BackTrack5 - Linux
mariuszantal
 
PDF
Ddos and mitigation methods.pptx
Ozkan E
 
PDF
Class Project Showcase: DNS Spoofing
Beibei Yang
 
PPTX
Snort
nazzf
 
PPTX
What is DDoS ?
Vikas Phonsa
 
PPTX
All About Snort
28pranjal
 
PDF
DNS Over HTTPS by Michael Casadevall
Glenn McKnight
 
PPTX
BackTrack 4 R2 - SFISSA Presentation
Jorge Orchilles
 
PPTX
Tunneling
Ilan Mindel
 
PPTX
Snort
Fadwa Gmiden
 
Module 2 Foot Printing
leminhvuong
 
CEH v9 cheat sheet notes Certified Ethical Hacker
David Sweigert
 
Certified Ethical Hacker quick test prep cheat sheet
David Sweigert
 
Enabling Worm and Malware Investigation Using Virtualization
amiable_indian
 
Module 3 Scanning
leminhvuong
 
hacking and crecjing
parth jasani
 
System hacking
CAS
 
Ethical hacking Chapter 6 - Port Scanning - Eric Vanderburg
Eric Vanderburg
 
BackTrack5 - Linux
mariuszantal
 
Ddos and mitigation methods.pptx
Ozkan E
 
Class Project Showcase: DNS Spoofing
Beibei Yang
 
Snort
nazzf
 
What is DDoS ?
Vikas Phonsa
 
All About Snort
28pranjal
 
DNS Over HTTPS by Michael Casadevall
Glenn McKnight
 
BackTrack 4 R2 - SFISSA Presentation
Jorge Orchilles
 
Tunneling
Ilan Mindel
 

Viewers also liked (20)

PDF
Packet sniffing & ARP Poisoning
Viren Rao
 
PPTX
Packet sniffers
Kunal Thakur
 
PPT
Ethical Hacking Powerpoint
Ren Tuazon
 
PPTX
Cain
gasay
 
PPTX
Packet sniffing in LAN
Arpit Suthar
 
PPTX
Windows Hacking
Mayur Sutariya
 
PPT
09 Cain And Abel
Maranata
 
PPTX
Network sniffers & injection tools
vishalgohel12195
 
PPT
Ethical Hacking
aashish2cool4u
 
PPSX
Information Security and Ethical Hacking
Divyank Jindal
 
PPTX
Hacktrikz - Introduction to Information Security & Ethical Hacking
Ravi Sankar
 
PPT
Module 5 Sniffers
leminhvuong
 
PDF
Tutorial in DEBS 2008 - Event Processing Patterns
Opher Etzion
 
PDF
Installing Complex Event Processing On Linux
Osama Mustafa
 
PPTX
Session hijacking
Vishal Punjabi
 
PPTX
Reactconf 2014 - Event Stream Processing
Andy Piper
 
PPTX
Access control attacks by nor liyana binti azman
Hafiza Abas
 
PDF
Comparative Analysis of Personal Firewalls
Andrej Šimko
 
PPT
Debs 2011 tutorial on non functional properties of event processing
Opher Etzion
 
PPT
Complex Event Processing with Esper and WSO2 ESB
Prabath Siriwardena
 
Packet sniffing & ARP Poisoning
Viren Rao
 
Packet sniffers
Kunal Thakur
 
Ethical Hacking Powerpoint
Ren Tuazon
 
Cain
gasay
 
Packet sniffing in LAN
Arpit Suthar
 
Windows Hacking
Mayur Sutariya
 
09 Cain And Abel
Maranata
 
Network sniffers & injection tools
vishalgohel12195
 
Ethical Hacking
aashish2cool4u
 
Information Security and Ethical Hacking
Divyank Jindal
 
Hacktrikz - Introduction to Information Security & Ethical Hacking
Ravi Sankar
 
Module 5 Sniffers
leminhvuong
 
Tutorial in DEBS 2008 - Event Processing Patterns
Opher Etzion
 
Installing Complex Event Processing On Linux
Osama Mustafa
 
Session hijacking
Vishal Punjabi
 
Reactconf 2014 - Event Stream Processing
Andy Piper
 
Access control attacks by nor liyana binti azman
Hafiza Abas
 
Comparative Analysis of Personal Firewalls
Andrej Šimko
 
Debs 2011 tutorial on non functional properties of event processing
Opher Etzion
 
Complex Event Processing with Esper and WSO2 ESB
Prabath Siriwardena
 

Similar to Intro To Hacking (20)

PPT
Security & ethical hacking p2
ratnalajaggu
 
PDF
Ethical hacking mind map
dasdwwe1
 
PPT
Security & ethical hacking
Amanpreet Singh
 
PDF
The Dirty Little Secrets They Didn’t Teach You In Pentesting Class
Chris Gates
 
PPTX
DC612 Day - Hands on Penetration Testing 101
dc612
 
PPT
Bsides-Philly-2016-Finding-A-Companys-BreakPoint
Zack Meyers
 
PPTX
BSIDES-PR Keynote Hunting for Bad Guys
Joff Thyer
 
ODP
Cracking Into Embedded Devices - HACK.LU 2K8
guest441c58b71
 
PDF
Intrusion Techniques
Festival Software Livre
 
PPTX
Final project.ppt
shreyng
 
PDF
The Art of Grey-Box Attack
Prathan Phongthiproek
 
PPTX
The basics of hacking and penetration testing 이제 시작이야 해킹과 침투 테스트 kenneth.s.kwon
Kenneth Kwon
 
PDF
CNIT 123: 8: Desktop and Server OS Vulnerabilites
Sam Bowne
 
PPT
Kunal - Introduction to backtrack - ClubHack2008
ClubHack
 
PPT
Kunal - Introduction to BackTrack - ClubHack2008
ClubHack
 
PPS
Workshop on BackTrack live CD
amiable_indian
 
PDF
Network Vulnerabilities And Cyber Kill Chain Essay
Karen Oliver
 
PPTX
lecture5.pptxJHKGJFHDGTFGYIUOIUIPIOIPUOHIYGUYFGIH
Abodahab
 
PPTX
lecture5.pptx
Llobarro2
 
PPTX
Penetration Testing and Intrusion Detection System
Bikrant Gautam
 
Security & ethical hacking p2
ratnalajaggu
 
Ethical hacking mind map
dasdwwe1
 
Security & ethical hacking
Amanpreet Singh
 
The Dirty Little Secrets They Didn’t Teach You In Pentesting Class
Chris Gates
 
DC612 Day - Hands on Penetration Testing 101
dc612
 
Bsides-Philly-2016-Finding-A-Companys-BreakPoint
Zack Meyers
 
BSIDES-PR Keynote Hunting for Bad Guys
Joff Thyer
 
Cracking Into Embedded Devices - HACK.LU 2K8
guest441c58b71
 
Intrusion Techniques
Festival Software Livre
 
Final project.ppt
shreyng
 
The Art of Grey-Box Attack
Prathan Phongthiproek
 
The basics of hacking and penetration testing 이제 시작이야 해킹과 침투 테스트 kenneth.s.kwon
Kenneth Kwon
 
CNIT 123: 8: Desktop and Server OS Vulnerabilites
Sam Bowne
 
Kunal - Introduction to backtrack - ClubHack2008
ClubHack
 
Kunal - Introduction to BackTrack - ClubHack2008
ClubHack
 
Workshop on BackTrack live CD
amiable_indian
 
Network Vulnerabilities And Cyber Kill Chain Essay
Karen Oliver
 
lecture5.pptxJHKGJFHDGTFGYIUOIUIPIOIPUOHIYGUYFGIH
Abodahab
 
lecture5.pptx
Llobarro2
 
Penetration Testing and Intrusion Detection System
Bikrant Gautam
 

More from nayakslideshare (20)

PPT
Mips 64
nayakslideshare
 
PPT
Digital Signature
nayakslideshare
 
PPT
Spyware
nayakslideshare
 
PPT
Digital Signature
nayakslideshare
 
PPT
Hyper Threading Technology
nayakslideshare
 
PPT
Quantum Teleportation
nayakslideshare
 
PPT
Biochip 1
nayakslideshare
 
PPT
Biochip
nayakslideshare
 
PPT
Satellite Networks
nayakslideshare
 
PPT
Cybercrime
nayakslideshare
 
PPT
Cybercrime 1
nayakslideshare
 
PPT
Biochip 1
nayakslideshare
 
PPT
Touch Screens
nayakslideshare
 
PPT
Linux Security
nayakslideshare
 
PPT
Dna Fingerprinting
nayakslideshare
 
PPT
Thinking Critically About WWW
nayakslideshare
 
PPT
Remote Sensing
nayakslideshare
 
PPT
Teleportation
nayakslideshare
 
Digital Signature
nayakslideshare
 
Digital Signature
nayakslideshare
 
Hyper Threading Technology
nayakslideshare
 
Quantum Teleportation
nayakslideshare
 
Biochip 1
nayakslideshare
 
Satellite Networks
nayakslideshare
 
Cybercrime
nayakslideshare
 
Cybercrime 1
nayakslideshare
 
Biochip 1
nayakslideshare
 
Touch Screens
nayakslideshare
 
Linux Security
nayakslideshare
 
Dna Fingerprinting
nayakslideshare
 
Thinking Critically About WWW
nayakslideshare
 
Remote Sensing
nayakslideshare
 
Teleportation
nayakslideshare
 

Recently uploaded (20)

PPTX
Top iOS App Development Company in the USA for Innovative Apps
SynapseIndia
 
PDF
July Patch Tuesday
Ivanti
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
PPTX
Building and Operating a Private Cloud with CloudStack and LINBIT CloudStack ...
ShapeBlue
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PPTX
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PPTX
Top Managed Service Providers in Los Angeles
Captain IT
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PPTX
Darren Mills The Migration Modernization Balancing Act: Navigating Risks and...
AWS Chicago
 
PDF
Women in Automation Presents: Reinventing Yourself — Bold Career Pivots That ...
DianaGray10
 
PDF
TrustArc Webinar - Data Privacy Trends 2025: Mid-Year Insights & Program Stra...
TrustArc
 
PDF
Building Resilience with Digital Twins : Lessons from Korea
SANGHEE SHIN
 
PDF
Empowering Cloud Providers with Apache CloudStack and Stackbill
ShapeBlue
 
Top iOS App Development Company in the USA for Innovative Apps
SynapseIndia
 
July Patch Tuesday
Ivanti
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
Building and Operating a Private Cloud with CloudStack and LINBIT CloudStack ...
ShapeBlue
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
Top Managed Service Providers in Los Angeles
Captain IT
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
Darren Mills The Migration Modernization Balancing Act: Navigating Risks and...
AWS Chicago
 
Women in Automation Presents: Reinventing Yourself — Bold Career Pivots That ...
DianaGray10
 
TrustArc Webinar - Data Privacy Trends 2025: Mid-Year Insights & Program Stra...
TrustArc
 
Building Resilience with Digital Twins : Lessons from Korea
SANGHEE SHIN
 
Empowering Cloud Providers with Apache CloudStack and Stackbill
ShapeBlue
 

Intro To Hacking

  • 2. Outline Internet footprinting Hacking Windows Hacking Unix/Linux Hacking the network
  • 3. Internet Footprinting © 2004 Cisco Systems, Inc. All rights reserved. mnystrom
  • 4. Internet Footprinting Outline Review publicly available information Perform network reconnaissance Discover landscape Determine vulnerable services
  • 5. Review publicly available information News: Look for recent news news.google.com SEC filings Search for phone numbers, contacts Technical info: Look for stupid postings Router configs Admin pages Nessus scans Netcraft Whois/DNS info SamSpade dig
  • 6. Network reconnaissance Use traceroute to find vulnerable servers Trout Can also query BGP tools http://nitrous.digex.net/mae/equinix.html Look up ASNs
  • 7. Landscape discovery Ping sweep: Find out which hosts are alive nmap, fping, gping, SuperScan, etc. Port scans: Find out which ports are listening Don’t setup a full connection – just SYN Netcat can be run in encrypted mode – cryptcat nmap advanced options XMAS scan sends all TCP options Source port scanning sets source port (e.g., port 88 to scan Windows systems) Time delays Banner grab & O/S guess telnet ftp netcat nmap
  • 8. Hacking Windows © 2004 Cisco Systems, Inc. All rights reserved. mnystrom
  • 9. Hacking Windows outline Scan Enumerate Penetrate Escalate Pillage Get interactive Expand influence
  • 10. Scanning Windows Port scan, looking for what’s indicative of Windows 88 – Kerberos 139 – NetBIOS 445 – SMB/CIFS 1433 – SQL Server 3268, 3269 – Active Directory 3389 – Terminal Services Trick: Scan from source port = 88 to find IPSec secured systems
  • 11. Enumerating Windows Accounts USER account used by most code, but escalates to SYSTEM to perform kernel-level operations System accounts tracked by their SIDs RID at end of SID identifies account type RID = 500 is admin account Need to escalate to Administrator to have any real power Tools userdump – enumerates users on a host sid2user & user2sid translates account names on a host SAM Contains usernames, SIDs, RIDs, hashed passwords Local account stored in local SAM Domain accounts stored in Active Directory (AD) Trusts Can exist between AD domains Allows accounts from one domain to be used in ACLs on another domain
  • 12. Enumerating Windows (cont.) Need access to ports 135, 139, 445 Enumerate hosts in a domain net view /domain:<domain name> Find domain controller(s) nltest /dsgetdc:<domain name> /pdc nltest /bdc_query:<domain name> nbtstcan – fast NetBIOS scanner null sessions are an important way to get info Runs over 445 Not logged by most IDS net use \\<target>\ipc$ “” /u:”” “ local” (from ResKit) or Dumpsec can then enumerate accounts Countermeasures Block UDP/137 Set RestictAnonymous registry value
  • 13. Enumerating Windows (cont.) Look for hosts with 2 NICs “ getmac” from Win2K resource kit Enumerate trusts on domain controller nltest /server:amer /trusted_domains Enumerate shares with DumpSec Hidden shares have “$” at the end Enumerate with LDAP LDAPminer
  • 14. Penetrating Windows 3 methods Guess password Obtain hashes Emergency Repair Disk Exploit a vulnerable service Guessing passwords Review vulnerable accounts via dumpsec Use NetBIOS Auditing Tool to guess passwords
  • 15. Escalating privileges in Windows getadmin getad getad2 pipeupadmin Shatter Yields system-level privileges Works against Windows Server 2003
  • 16. Pillaging Windows Clear logs Some IDS’s will restart auditing once it’s been disabled Grab hashes Remotely with pwdump3 Backup SAM: c:\winnt\repair\sam._ Grab passwords Sniff SMB traffic Crack passwords L0phtcrack John the Ripper
  • 17. Getting interactive with Windows Copy rootkit over a share Hide rootkit on the target server Low traffic area such as winnt\system32\OS2\dll\toolz Stream tools into files Remote shell remote.exe (resource kit tool) netcat How to fire up remote listener? trojan Leave a CD in the bathroom titled, “pending layoffs”  Schedule it for remote execution at scheduler psexec
  • 18. Windows – Expand influence Get passwords Keystroke logger with stealth mail FakeGINA intercepts Winlogon Plant stuff in registry to run on reboot Hide files “ attrib +h <directory>” Stream files Tripwire should catch this stuff
  • 19. Hacking Unix/Linux © 2004 Cisco Systems, Inc. All rights reserved. mnystrom
  • 20. Hacking Unix/Linux outline Discover landscape Enumerate systems Attack Remote Local Get beyond root
  • 21. Discover landscape Goals Discover available hosts Find all running services Methodology ICMP and TCP ping scans Find listening services with nmap and udp_scan Discover paths with ICMP, UDP, TCP Tools nmap SuperScan (Windows) udp_scan (more reliable than nmap for udp scanning)
  • 22. Enumerate systems Goal: Discover the following… Users Operating systems Running programs Specific software versions Unprotected files Internal information Tools OS/Application: telnet, ftp, nc, nmap Users: finger, rwho,rusers, SMTP RPC programs: rpcinfo NFS shares: showmount File retrieval: TFTP SNMP: snmpwalk snmpget
  • 23. Enumerate services Users finger SMTP vrfy DNS info dig RPC services rpcinfo NFS shares showmount Countermeasures Turn off un-necessary services Block IP addresses with router ACLs or TCP wrappers
  • 24. Attack remotely 3 primary methods Exploit a listening service Route through a system with 2 or more interfaces Get user to execute it for you Trojans Hostile web site Brute-force against service http://packetstormsecurity.nl/Crackers/ Countermeasure: strong passwords, hide user names Buffer-overflow attack Overflow the stack with machine-dependent code (assembler) Usually yields a shell – shovel it back with netcat Prime targets: programs that run as root or suid Countermeasures Disable stack execution Code reviews Limit root and suid programs
  • 25. Attack remotely (cont.) Buffer overflow example echo “vrfy `perl –e ‘print “a” x 1000’`” |nc www.targetsystem.com 25 Replace this with something like this… char shellcode[] = “\xeb\xlf\x5e\x89\x76\x08…” Input validation attacks PHF CGI – newline character SSI passes user input to O/S Back channels X-Windows Send display back to attacker’s IP Reverse telnet
  • 26. Attack remotely (cont.) Countermeasures against back channels Get rid of executables used for this (x-windows, telnet, etc.) Commonly attacked services Sendmail NFS RPC X-windows (sniffing session data) ftpd (wu-ftpd) DNS Guessable query IDs BIND vulnerabilities Countermeasures Restrict zone transfers Block TCP/UDP 53 Don’t use HINFO records
  • 27. Attack locally Buffer overflow Setuid programs Password guessing/cracking Mis-configured file/dir permissions
  • 28. Get beyond root Map the network (own more hosts) Install rootkit crypto checksum is the only way to know if it’s real Create backdoors Sniff other traffic dsniff arpredirect loki Hunt Countermeasures Encrypt all traffic Switched networks (not a panacaea) Clean logs Session hijacking
  • 29. Hacking the Network © 2004 Cisco Systems, Inc. All rights reserved. mnystrom Vulnerabilities Dealing with firewalls
  • 30. Vulnerabilities TTY access – 5 to choose from SNMP V2 community strings HTTP (Everthing is clear-text) TFTP No auth Easy to discern router config files “<router-name>.cfg Countermeasures ACLs TCP wrappers Encrypt passwords
  • 31. Vulnerabilities: routing issues Path integrity Source routing reveals path through the network Routing updates can be spoofed (RIP, IGRP) ARP spoofing Easy with dsniff
  • 32. Dealing with firewalls Enumerate with nmap or tcpdump Can show you which ports are filtered (blocked) Some proxies return a banner Eagle Raptor TCP traffic itself may provide signature Ping the un-pingable hping Look for ICMP type 13 (admin prohibited)
  • 33. Dealing with firewalls (cont.) ACLs may allow scanning if source port is set nmap with “-g” option Port redirection fpipe netcat