SlideShare une entreprise Scribd logo
1  sur  31
Try Harder
OR GO HOME
Disclaimer
Cha-HA is a "Red Team" social and training group.
Organizers and teachers of Cha-HA are not compensated financially for their time. They do this simply because they enjoy
the topic and like to share.
Some of the skills and tools taught at Cha-HA meetings can be used for malicious purposes.
Cha-HA organizers and teachers only condone and encourage responsible and lawful use of such skills and tools.
Code of Conduct
I will treat all other members respectfully during Cha-HA events.
I will not use tools and skills shared at Cha-HA for unlawful purposes.
If I ignore the previous point and get caught in an unlawful act then it is nobody's fault but my own.
Whoami
● Jared Haight
● Former Sysadmin
● Current Security Engineer
● OSCP as of August 13th
● @jaredhaight
● https://words.photosandtext.com
What am I talking about?
● What I already knew that helped me with the OSCP
● Stuff I learned while studying for the OSCP
● Things you should focus on if you want to take the OSCP
○ Without getting too specific as to ruin the fun (or get in trouble with Offensive Security)
What makes a hacker?
My Background
● Using computers for 17 years
○ Started using Linux about 14 years ago
● Sysadmin for 10 years
○ Covered everything from Firewalls down to the desktop
○ Administered both Windows and Linux environments
● Hobbyist Web dev for 4 years
○ Started learning Python in 2011, still suck at it.
○ Currently learning Javascript, really suck at it.
What makes an effective hacker
● Learn quickly and be able to intuit how things work
● Constantly think about how you can abuse your current position
○ Focus on your long term goals but not to the point that it distracts you from what’s in front of you
● Understand your opponent
○ In the OSCP lab it’s a lot of stupid and lazy admins
Recon
NMAP
● Scan ALL of the ports
○ TCP (1 - 65000)
○ UDP (--top 200 or whatever)
● Read the scan output, not just the overview
○ Thats where all the NSE output is!
● Zenmap is really great
Dirbuster
● Invaluable tool for finding directories/files on webserver
● List in /usr/share/wordlists/dirbuster
○ Use the big one
● Set threads to like 100
Other Enumerators
● SMBEnum
○ Old and/or misconfigured Windows boxes give TONs of info through SMB
● SNMPwalk
○ Can be great for identifying OS
○ Misconfigured OS’s will give a lot of info over SNMP
● Probably more..
Misc
● Save EVERYTHING
○ Notes, NMAP output, Enum Output, etc
● Make sure you can find everything
● My structure:
○ ~/recon/192.168.13/
■ 68/ (host ip)
● notes
● nikto.log
● smbenum.log
● misc loot..
Exploitation
Searchsploit
Why you’d use it:
● You need an exploit
● Searching exploit-db.com is really slow
How you’d use it:
● searchsploit <switches> <terms>
● Example: searchsploit -w windows exec
○ By default lists out exploit name and location on disk
○ -w lists exploit-db url instead of location on disk
Metasploit
Why you’d use it
● Cause it’s fucking metasploit
How you’d use it
● Very carefully if you’re taking the exam
○ Usage is limited to multi handler, meterpreter and msfvenom
○ You can use Auxiliary, Exploit and Post modules against ONE allowed machine.
○ Double check the rules before you do something stupid on your exam
Meterpreter
Why you’d use it:
● It’s like normal shell but with special sauce.
How you’d use it:
● Very carefully if you’re taking your exam
○ Usage is restricted to File System, Network and a subset of System commands
○ All other usage is only allowed the one machine you use Metasploit on.
How do I know what I’m allowed to do?
Metasploit
● If you’re in msfconsole, you can use exploit/multi/handler
○ That’s it. If you want to use more of the metasploit console you can do it only once and only on an allowed
box
● No restrictions on msfvenom
Meterpreter
● If you’re in a meterpreter session run “help”
○ It will list out all meterpreter commands, categorized by section.
Buffer Overflows
Why you’d want to learn this
● You’re a hacker, you want to know how things work.
○ Buffer overflows are core to the fun stuff we get to do
● You want to be able to edit (or even find) exploits
How you’d learn this
● Go over the documentation provided by Offensive Security
○ Keep going over it until it makes sense
○ Do the exercises provided by Offensive Security
○ Go find more stuff to exploit (plenty of resources on the internet)
Exploits in the lab environment
● Lots of finding and editing existing exploits
● Build up a collection of scripts and tools that hit common exploits
○ MS08-067, Linux Kernel Priv Esc, etc
● Learn how to read basic C, it’ll help.
● Some of the servers are old, your compiled code won’t run on them
○ Download an ISO of the old OS and spin it up in a VM
○ Google “Debootstrap” to setup builds of old Debian/Ubuntu installs on your Kali box.
■ Once setup you can use “chroot” to switch into them
■ Note that Debian changed their file hashes from MD5 to SHA a while back. You may need to find an old version of debootstrap
to work on really old OSs.
Tips and Tricks
● If you have a root shell on a box but don’t know the root password, echo your SSH key to
/root/.ssh/authorized_keys
○ Boom. Passwordless login.
● Exploit chains can get complicated and VMs get reset often. Script out exploits that you find yourself
doing over and over again.
● The documentation walks you through writing a “wget script” generating script for Windows. Do that,
it comes in handy.
○ Actually, just do all the exercises that they walk you through.
● Do a report on the lab and do it as you go along
○ The lab is big, there’s a lot of stuff to document. Don’t put it off.
○ The lab report can help to sway whether you pass the OSCP or not
Tips and Tricks Part 2: Too fast too tricky
● Sometimes the easiest way to get shell on a box is to create a new account.
○ If you have privileged code execution on a box, why not just create a new account?
● Pillage
○ Check every single box you get into for loot. There are some boxes in the labs that you can only get into
with info gleaned elsewhere
○ Think. Where would the good stuff be?
■ /home
■ /etc
■ /var/log
■ C:
■ C:Users (C:Documents and Settings)
○ Use scp, meterpreter or existing services (http, ftp) to get files off a box
Pivoting
Pivoting is Fun
● There are three networks in the OSCP lab
○ You start out with access to one
○ Be on the lookout for dual-homed boxes
● How do you pivot
○ SSH
■ Forward Proxy: ssh -D [Port Number] [user]@[Remote IP]
● Example: ssh -D 9995 root@192.168.1.10
■ Reverse Proxy: ssh -R [Remote Port]:localhost:[Local Port] [user]@[Remote IP]
● Example: ssh -R 8081:localhost:3000 root@192.168.1.10
● Note: Requires “GatewayPorts Yes” in remote sshd_config
○ ProxyChains
■ Routes any TCP network traffic over proxy
Wrap Up
Recap
● Don’t be afraid to learn
● Be aggressive in your scanning
● Keep notes, be organized
● Do your lab report
● Don’t use metasploit
● Be really comfortable with basic Buffer Overflows
● Pillage everything
● Hack the planet
Questions?
● @jaredhaight
● jaredhaight@protonmail.com

Contenu connexe

Tendances

Incorporating PowerShell into your Arsenal with PS>Attack
Incorporating PowerShell into your Arsenal with PS>AttackIncorporating PowerShell into your Arsenal with PS>Attack
Incorporating PowerShell into your Arsenal with PS>Attackjaredhaight
 
Who Should Use Powershell? You Should Use Powershell!
Who Should Use Powershell?  You Should Use Powershell!Who Should Use Powershell?  You Should Use Powershell!
Who Should Use Powershell? You Should Use Powershell!Ben Finke
 
Get-Help: An intro to PowerShell and how to Use it for Evil
Get-Help: An intro to PowerShell and how to Use it for EvilGet-Help: An intro to PowerShell and how to Use it for Evil
Get-Help: An intro to PowerShell and how to Use it for Eviljaredhaight
 
Windows privilege escalation by Dhruv Shah
Windows privilege escalation by Dhruv ShahWindows privilege escalation by Dhruv Shah
Windows privilege escalation by Dhruv ShahOWASP Delhi
 
Advanced windows debugging
Advanced windows debuggingAdvanced windows debugging
Advanced windows debuggingchrisortman
 
BSidesJXN 2017 - Improving Vulnerability Management
BSidesJXN 2017 - Improving Vulnerability ManagementBSidesJXN 2017 - Improving Vulnerability Management
BSidesJXN 2017 - Improving Vulnerability ManagementAndrew McNicol
 
Snake bites : Python for Pentesters
Snake bites : Python for PentestersSnake bites : Python for Pentesters
Snake bites : Python for PentestersAnant Shrivastava
 
AntiVirus Evasion Reconstructed - Veil 3.0
AntiVirus Evasion Reconstructed - Veil 3.0AntiVirus Evasion Reconstructed - Veil 3.0
AntiVirus Evasion Reconstructed - Veil 3.0CTruncer
 
More fun using Kautilya
More fun using KautilyaMore fun using Kautilya
More fun using KautilyaNikhil Mittal
 
When is something overflowing
When is something overflowingWhen is something overflowing
When is something overflowingPeter Hlavaty
 
Writing malware while the blue team is staring at you
Writing malware while the blue team is staring at youWriting malware while the blue team is staring at you
Writing malware while the blue team is staring at youRob Fuller
 
Automated testing in Drupal
Automated testing in DrupalAutomated testing in Drupal
Automated testing in DrupalArtem Berdishev
 
BSides Hannover 2015 - Shell on Wheels
BSides Hannover 2015 - Shell on WheelsBSides Hannover 2015 - Shell on Wheels
BSides Hannover 2015 - Shell on Wheelsinfodox
 
Workshop: PowerShell for Penetration Testers
Workshop: PowerShell for Penetration TestersWorkshop: PowerShell for Penetration Testers
Workshop: PowerShell for Penetration TestersNikhil Mittal
 
Steelcon 2015 - 0wning the internet of trash
Steelcon 2015 - 0wning the internet of trashSteelcon 2015 - 0wning the internet of trash
Steelcon 2015 - 0wning the internet of trashinfodox
 
Steelcon 2014 - Process Injection with Python
Steelcon 2014 - Process Injection with PythonSteelcon 2014 - Process Injection with Python
Steelcon 2014 - Process Injection with Pythoninfodox
 
Modern Evasion Techniques
Modern Evasion TechniquesModern Evasion Techniques
Modern Evasion TechniquesJason Lang
 

Tendances (20)

Incorporating PowerShell into your Arsenal with PS>Attack
Incorporating PowerShell into your Arsenal with PS>AttackIncorporating PowerShell into your Arsenal with PS>Attack
Incorporating PowerShell into your Arsenal with PS>Attack
 
Who Should Use Powershell? You Should Use Powershell!
Who Should Use Powershell?  You Should Use Powershell!Who Should Use Powershell?  You Should Use Powershell!
Who Should Use Powershell? You Should Use Powershell!
 
Get-Help: An intro to PowerShell and how to Use it for Evil
Get-Help: An intro to PowerShell and how to Use it for EvilGet-Help: An intro to PowerShell and how to Use it for Evil
Get-Help: An intro to PowerShell and how to Use it for Evil
 
Veil-Ordnance
Veil-OrdnanceVeil-Ordnance
Veil-Ordnance
 
Windows privilege escalation by Dhruv Shah
Windows privilege escalation by Dhruv ShahWindows privilege escalation by Dhruv Shah
Windows privilege escalation by Dhruv Shah
 
Advanced windows debugging
Advanced windows debuggingAdvanced windows debugging
Advanced windows debugging
 
BSidesJXN 2017 - Improving Vulnerability Management
BSidesJXN 2017 - Improving Vulnerability ManagementBSidesJXN 2017 - Improving Vulnerability Management
BSidesJXN 2017 - Improving Vulnerability Management
 
Snake bites : Python for Pentesters
Snake bites : Python for PentestersSnake bites : Python for Pentesters
Snake bites : Python for Pentesters
 
AntiVirus Evasion Reconstructed - Veil 3.0
AntiVirus Evasion Reconstructed - Veil 3.0AntiVirus Evasion Reconstructed - Veil 3.0
AntiVirus Evasion Reconstructed - Veil 3.0
 
More fun using Kautilya
More fun using KautilyaMore fun using Kautilya
More fun using Kautilya
 
When is something overflowing
When is something overflowingWhen is something overflowing
When is something overflowing
 
Writing malware while the blue team is staring at you
Writing malware while the blue team is staring at youWriting malware while the blue team is staring at you
Writing malware while the blue team is staring at you
 
Automated testing in Drupal
Automated testing in DrupalAutomated testing in Drupal
Automated testing in Drupal
 
BSides Hannover 2015 - Shell on Wheels
BSides Hannover 2015 - Shell on WheelsBSides Hannover 2015 - Shell on Wheels
BSides Hannover 2015 - Shell on Wheels
 
The Veil-Framework
The Veil-FrameworkThe Veil-Framework
The Veil-Framework
 
Workshop: PowerShell for Penetration Testers
Workshop: PowerShell for Penetration TestersWorkshop: PowerShell for Penetration Testers
Workshop: PowerShell for Penetration Testers
 
Steelcon 2015 - 0wning the internet of trash
Steelcon 2015 - 0wning the internet of trashSteelcon 2015 - 0wning the internet of trash
Steelcon 2015 - 0wning the internet of trash
 
Steelcon 2014 - Process Injection with Python
Steelcon 2014 - Process Injection with PythonSteelcon 2014 - Process Injection with Python
Steelcon 2014 - Process Injection with Python
 
Modern Evasion Techniques
Modern Evasion TechniquesModern Evasion Techniques
Modern Evasion Techniques
 
Introduction to Browser Fuzzing
Introduction to Browser FuzzingIntroduction to Browser Fuzzing
Introduction to Browser Fuzzing
 

En vedette

ColdFusion for Penetration Testers
ColdFusion for Penetration TestersColdFusion for Penetration Testers
ColdFusion for Penetration TestersChris Gates
 
PSConfEU - Offensive Active Directory (With PowerShell!)
PSConfEU - Offensive Active Directory (With PowerShell!)PSConfEU - Offensive Active Directory (With PowerShell!)
PSConfEU - Offensive Active Directory (With PowerShell!)Will Schroeder
 
Level Up! - Practical Windows Privilege Escalation
Level Up! - Practical Windows Privilege EscalationLevel Up! - Practical Windows Privilege Escalation
Level Up! - Practical Windows Privilege Escalationjakx_
 
Fundamentals of Linux Privilege Escalation
Fundamentals of Linux Privilege EscalationFundamentals of Linux Privilege Escalation
Fundamentals of Linux Privilege Escalationnullthreat
 
Drilling deeper with Veil's PowerTools
Drilling deeper with Veil's PowerToolsDrilling deeper with Veil's PowerTools
Drilling deeper with Veil's PowerToolsWill Schroeder
 
PowerShell and the Future of Windows Automation
PowerShell and the Future of Windows AutomationPowerShell and the Future of Windows Automation
PowerShell and the Future of Windows AutomationConcentrated Technology
 
PowerShell crashcourse for Sharepoint admins
PowerShell crashcourse for Sharepoint adminsPowerShell crashcourse for Sharepoint admins
PowerShell crashcourse for Sharepoint adminsConcentrated Technology
 
Ive got a powershell secret
Ive got a powershell secretIve got a powershell secret
Ive got a powershell secretChris Conte
 
Managing enterprise with PowerShell remoting
Managing enterprise with PowerShell remotingManaging enterprise with PowerShell remoting
Managing enterprise with PowerShell remotingConcentrated Technology
 
Advanced Tools & Scripting with PowerShell 3.0 Jump Start - Certificate
Advanced Tools & Scripting with PowerShell 3.0 Jump Start - CertificateAdvanced Tools & Scripting with PowerShell 3.0 Jump Start - Certificate
Advanced Tools & Scripting with PowerShell 3.0 Jump Start - CertificateDon Reese
 
Three cool cmdlets I wish PowerShell Had!
Three cool cmdlets I wish PowerShell Had!Three cool cmdlets I wish PowerShell Had!
Three cool cmdlets I wish PowerShell Had!Thomas Lee
 
Free tools for win server administration
Free tools for win server administrationFree tools for win server administration
Free tools for win server administrationConcentrated Technology
 

En vedette (20)

ColdFusion for Penetration Testers
ColdFusion for Penetration TestersColdFusion for Penetration Testers
ColdFusion for Penetration Testers
 
PSConfEU - Offensive Active Directory (With PowerShell!)
PSConfEU - Offensive Active Directory (With PowerShell!)PSConfEU - Offensive Active Directory (With PowerShell!)
PSConfEU - Offensive Active Directory (With PowerShell!)
 
Analogic Opsec 101
Analogic Opsec 101Analogic Opsec 101
Analogic Opsec 101
 
Level Up! - Practical Windows Privilege Escalation
Level Up! - Practical Windows Privilege EscalationLevel Up! - Practical Windows Privilege Escalation
Level Up! - Practical Windows Privilege Escalation
 
Bridging the Gap
Bridging the GapBridging the Gap
Bridging the Gap
 
Fundamentals of Linux Privilege Escalation
Fundamentals of Linux Privilege EscalationFundamentals of Linux Privilege Escalation
Fundamentals of Linux Privilege Escalation
 
Drilling deeper with Veil's PowerTools
Drilling deeper with Veil's PowerToolsDrilling deeper with Veil's PowerTools
Drilling deeper with Veil's PowerTools
 
PowerShell crashcourse for sharepoint
PowerShell crashcourse for sharepointPowerShell crashcourse for sharepoint
PowerShell crashcourse for sharepoint
 
Automating ad with powershell
Automating ad with powershellAutomating ad with powershell
Automating ad with powershell
 
PowerShell and the Future of Windows Automation
PowerShell and the Future of Windows AutomationPowerShell and the Future of Windows Automation
PowerShell and the Future of Windows Automation
 
PowerShell crashcourse for Sharepoint admins
PowerShell crashcourse for Sharepoint adminsPowerShell crashcourse for Sharepoint admins
PowerShell crashcourse for Sharepoint admins
 
PowerShell 8tips
PowerShell 8tipsPowerShell 8tips
PowerShell 8tips
 
Ive got a powershell secret
Ive got a powershell secretIve got a powershell secret
Ive got a powershell secret
 
Combining output from multiple sources
Combining output from multiple sourcesCombining output from multiple sources
Combining output from multiple sources
 
Managing enterprise with PowerShell remoting
Managing enterprise with PowerShell remotingManaging enterprise with PowerShell remoting
Managing enterprise with PowerShell remoting
 
Advanced Tools & Scripting with PowerShell 3.0 Jump Start - Certificate
Advanced Tools & Scripting with PowerShell 3.0 Jump Start - CertificateAdvanced Tools & Scripting with PowerShell 3.0 Jump Start - Certificate
Advanced Tools & Scripting with PowerShell 3.0 Jump Start - Certificate
 
PowerShell custom properties
PowerShell custom propertiesPowerShell custom properties
PowerShell custom properties
 
Three cool cmdlets I wish PowerShell Had!
Three cool cmdlets I wish PowerShell Had!Three cool cmdlets I wish PowerShell Had!
Three cool cmdlets I wish PowerShell Had!
 
PowerShell crashcourse
PowerShell crashcoursePowerShell crashcourse
PowerShell crashcourse
 
Free tools for win server administration
Free tools for win server administrationFree tools for win server administration
Free tools for win server administration
 

Similaire à Try harder or go home

How To Get The Most Out Of Your Hibernate, JBoss EAP 7 Application (Ståle Ped...
How To Get The Most Out Of Your Hibernate, JBoss EAP 7 Application (Ståle Ped...How To Get The Most Out Of Your Hibernate, JBoss EAP 7 Application (Ståle Ped...
How To Get The Most Out Of Your Hibernate, JBoss EAP 7 Application (Ståle Ped...Red Hat Developers
 
Code Camp NYC 2017 - How to deal with everything... | Chris Ozog - Codesushi
Code Camp NYC 2017 - How to deal with everything... | Chris Ozog - Codesushi Code Camp NYC 2017 - How to deal with everything... | Chris Ozog - Codesushi
Code Camp NYC 2017 - How to deal with everything... | Chris Ozog - Codesushi Krzysztof (Chris) Ozog
 
Mp26 : Tachyon, sloppiness is bliss
Mp26 : Tachyon, sloppiness is blissMp26 : Tachyon, sloppiness is bliss
Mp26 : Tachyon, sloppiness is blissMontreal Python
 
Pentester++
Pentester++Pentester++
Pentester++CTruncer
 
Techhub Riga - tm 27.07
Techhub Riga - tm  27.07Techhub Riga - tm  27.07
Techhub Riga - tm 27.07Toms Bauģis
 
What Your Tech Lead Thinks You Know (But Didn't Teach You)
What Your Tech Lead Thinks You Know (But Didn't Teach You)What Your Tech Lead Thinks You Know (But Didn't Teach You)
What Your Tech Lead Thinks You Know (But Didn't Teach You)Chris Riccomini
 
Ever Present Persistence - Established Footholds Seen in the Wild
Ever Present Persistence - Established Footholds Seen in the WildEver Present Persistence - Established Footholds Seen in the Wild
Ever Present Persistence - Established Footholds Seen in the WildCTruncer
 
PostgreSQL worst practices, version FOSDEM PGDay 2017 by Ilya Kosmodemiansky
PostgreSQL worst practices, version FOSDEM PGDay 2017 by Ilya KosmodemianskyPostgreSQL worst practices, version FOSDEM PGDay 2017 by Ilya Kosmodemiansky
PostgreSQL worst practices, version FOSDEM PGDay 2017 by Ilya KosmodemianskyPostgreSQL-Consulting
 
LXC Containers and AUFs
LXC Containers and AUFsLXC Containers and AUFs
LXC Containers and AUFsDocker, Inc.
 
I Know What You Did Last Summer
I Know What You Did Last SummerI Know What You Did Last Summer
I Know What You Did Last SummerMartin Packer
 
Introduction To ICT Security Audit OWASP Day Malaysia 2011
Introduction To ICT Security Audit OWASP Day Malaysia 2011Introduction To ICT Security Audit OWASP Day Malaysia 2011
Introduction To ICT Security Audit OWASP Day Malaysia 2011Linuxmalaysia Malaysia
 
ContainerDays Boston 2016: "Hiding in Plain Sight: Managing Secrets in a Cont...
ContainerDays Boston 2016: "Hiding in Plain Sight: Managing Secrets in a Cont...ContainerDays Boston 2016: "Hiding in Plain Sight: Managing Secrets in a Cont...
ContainerDays Boston 2016: "Hiding in Plain Sight: Managing Secrets in a Cont...DynamicInfraDays
 
Hacking - Breaking Into It
Hacking - Breaking Into ItHacking - Breaking Into It
Hacking - Breaking Into ItCTruncer
 
DIY Applied Machine Learning
DIY Applied Machine LearningDIY Applied Machine Learning
DIY Applied Machine LearningTarek Hoteit
 
Software Development Whats & Whys
Software Development Whats & Whys Software Development Whats & Whys
Software Development Whats & Whys Harun Yardımcı
 
The Supporting Role of Antivirus Evasion while Persisting
The Supporting Role of Antivirus Evasion while PersistingThe Supporting Role of Antivirus Evasion while Persisting
The Supporting Role of Antivirus Evasion while PersistingCTruncer
 
How to write bioinformatics software no one will use
How to write bioinformatics software no one will useHow to write bioinformatics software no one will use
How to write bioinformatics software no one will useTorsten Seemann
 
SDEC2011 Mahout - the what, the how and the why
SDEC2011 Mahout - the what, the how and the whySDEC2011 Mahout - the what, the how and the why
SDEC2011 Mahout - the what, the how and the whyKorea Sdec
 
Pen Testing, Red Teaming, and More
Pen Testing, Red Teaming, and MorePen Testing, Red Teaming, and More
Pen Testing, Red Teaming, and MoreCTruncer
 

Similaire à Try harder or go home (20)

Spaghetti gate
Spaghetti gateSpaghetti gate
Spaghetti gate
 
How To Get The Most Out Of Your Hibernate, JBoss EAP 7 Application (Ståle Ped...
How To Get The Most Out Of Your Hibernate, JBoss EAP 7 Application (Ståle Ped...How To Get The Most Out Of Your Hibernate, JBoss EAP 7 Application (Ståle Ped...
How To Get The Most Out Of Your Hibernate, JBoss EAP 7 Application (Ståle Ped...
 
Code Camp NYC 2017 - How to deal with everything... | Chris Ozog - Codesushi
Code Camp NYC 2017 - How to deal with everything... | Chris Ozog - Codesushi Code Camp NYC 2017 - How to deal with everything... | Chris Ozog - Codesushi
Code Camp NYC 2017 - How to deal with everything... | Chris Ozog - Codesushi
 
Mp26 : Tachyon, sloppiness is bliss
Mp26 : Tachyon, sloppiness is blissMp26 : Tachyon, sloppiness is bliss
Mp26 : Tachyon, sloppiness is bliss
 
Pentester++
Pentester++Pentester++
Pentester++
 
Techhub Riga - tm 27.07
Techhub Riga - tm  27.07Techhub Riga - tm  27.07
Techhub Riga - tm 27.07
 
What Your Tech Lead Thinks You Know (But Didn't Teach You)
What Your Tech Lead Thinks You Know (But Didn't Teach You)What Your Tech Lead Thinks You Know (But Didn't Teach You)
What Your Tech Lead Thinks You Know (But Didn't Teach You)
 
Ever Present Persistence - Established Footholds Seen in the Wild
Ever Present Persistence - Established Footholds Seen in the WildEver Present Persistence - Established Footholds Seen in the Wild
Ever Present Persistence - Established Footholds Seen in the Wild
 
PostgreSQL worst practices, version FOSDEM PGDay 2017 by Ilya Kosmodemiansky
PostgreSQL worst practices, version FOSDEM PGDay 2017 by Ilya KosmodemianskyPostgreSQL worst practices, version FOSDEM PGDay 2017 by Ilya Kosmodemiansky
PostgreSQL worst practices, version FOSDEM PGDay 2017 by Ilya Kosmodemiansky
 
LXC Containers and AUFs
LXC Containers and AUFsLXC Containers and AUFs
LXC Containers and AUFs
 
I Know What You Did Last Summer
I Know What You Did Last SummerI Know What You Did Last Summer
I Know What You Did Last Summer
 
Introduction To ICT Security Audit OWASP Day Malaysia 2011
Introduction To ICT Security Audit OWASP Day Malaysia 2011Introduction To ICT Security Audit OWASP Day Malaysia 2011
Introduction To ICT Security Audit OWASP Day Malaysia 2011
 
ContainerDays Boston 2016: "Hiding in Plain Sight: Managing Secrets in a Cont...
ContainerDays Boston 2016: "Hiding in Plain Sight: Managing Secrets in a Cont...ContainerDays Boston 2016: "Hiding in Plain Sight: Managing Secrets in a Cont...
ContainerDays Boston 2016: "Hiding in Plain Sight: Managing Secrets in a Cont...
 
Hacking - Breaking Into It
Hacking - Breaking Into ItHacking - Breaking Into It
Hacking - Breaking Into It
 
DIY Applied Machine Learning
DIY Applied Machine LearningDIY Applied Machine Learning
DIY Applied Machine Learning
 
Software Development Whats & Whys
Software Development Whats & Whys Software Development Whats & Whys
Software Development Whats & Whys
 
The Supporting Role of Antivirus Evasion while Persisting
The Supporting Role of Antivirus Evasion while PersistingThe Supporting Role of Antivirus Evasion while Persisting
The Supporting Role of Antivirus Evasion while Persisting
 
How to write bioinformatics software no one will use
How to write bioinformatics software no one will useHow to write bioinformatics software no one will use
How to write bioinformatics software no one will use
 
SDEC2011 Mahout - the what, the how and the why
SDEC2011 Mahout - the what, the how and the whySDEC2011 Mahout - the what, the how and the why
SDEC2011 Mahout - the what, the how and the why
 
Pen Testing, Red Teaming, and More
Pen Testing, Red Teaming, and MorePen Testing, Red Teaming, and More
Pen Testing, Red Teaming, and More
 

Dernier

The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observabilityitnewsafrica
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesBernd Ruecker
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024TopCSSGallery
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...itnewsafrica
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxfnnc6jmgwh
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkPixlogix Infotech
 

Dernier (20)

The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
 

Try harder or go home

  • 2. Disclaimer Cha-HA is a "Red Team" social and training group. Organizers and teachers of Cha-HA are not compensated financially for their time. They do this simply because they enjoy the topic and like to share. Some of the skills and tools taught at Cha-HA meetings can be used for malicious purposes. Cha-HA organizers and teachers only condone and encourage responsible and lawful use of such skills and tools.
  • 3. Code of Conduct I will treat all other members respectfully during Cha-HA events. I will not use tools and skills shared at Cha-HA for unlawful purposes. If I ignore the previous point and get caught in an unlawful act then it is nobody's fault but my own.
  • 4. Whoami ● Jared Haight ● Former Sysadmin ● Current Security Engineer ● OSCP as of August 13th ● @jaredhaight ● https://words.photosandtext.com
  • 5. What am I talking about? ● What I already knew that helped me with the OSCP ● Stuff I learned while studying for the OSCP ● Things you should focus on if you want to take the OSCP ○ Without getting too specific as to ruin the fun (or get in trouble with Offensive Security)
  • 6. What makes a hacker?
  • 7.
  • 8.
  • 9.
  • 10. My Background ● Using computers for 17 years ○ Started using Linux about 14 years ago ● Sysadmin for 10 years ○ Covered everything from Firewalls down to the desktop ○ Administered both Windows and Linux environments ● Hobbyist Web dev for 4 years ○ Started learning Python in 2011, still suck at it. ○ Currently learning Javascript, really suck at it.
  • 11. What makes an effective hacker ● Learn quickly and be able to intuit how things work ● Constantly think about how you can abuse your current position ○ Focus on your long term goals but not to the point that it distracts you from what’s in front of you ● Understand your opponent ○ In the OSCP lab it’s a lot of stupid and lazy admins
  • 12. Recon
  • 13. NMAP ● Scan ALL of the ports ○ TCP (1 - 65000) ○ UDP (--top 200 or whatever) ● Read the scan output, not just the overview ○ Thats where all the NSE output is! ● Zenmap is really great
  • 14. Dirbuster ● Invaluable tool for finding directories/files on webserver ● List in /usr/share/wordlists/dirbuster ○ Use the big one ● Set threads to like 100
  • 15. Other Enumerators ● SMBEnum ○ Old and/or misconfigured Windows boxes give TONs of info through SMB ● SNMPwalk ○ Can be great for identifying OS ○ Misconfigured OS’s will give a lot of info over SNMP ● Probably more..
  • 16. Misc ● Save EVERYTHING ○ Notes, NMAP output, Enum Output, etc ● Make sure you can find everything ● My structure: ○ ~/recon/192.168.13/ ■ 68/ (host ip) ● notes ● nikto.log ● smbenum.log ● misc loot..
  • 18. Searchsploit Why you’d use it: ● You need an exploit ● Searching exploit-db.com is really slow How you’d use it: ● searchsploit <switches> <terms> ● Example: searchsploit -w windows exec ○ By default lists out exploit name and location on disk ○ -w lists exploit-db url instead of location on disk
  • 19.
  • 20. Metasploit Why you’d use it ● Cause it’s fucking metasploit How you’d use it ● Very carefully if you’re taking the exam ○ Usage is limited to multi handler, meterpreter and msfvenom ○ You can use Auxiliary, Exploit and Post modules against ONE allowed machine. ○ Double check the rules before you do something stupid on your exam
  • 21. Meterpreter Why you’d use it: ● It’s like normal shell but with special sauce. How you’d use it: ● Very carefully if you’re taking your exam ○ Usage is restricted to File System, Network and a subset of System commands ○ All other usage is only allowed the one machine you use Metasploit on.
  • 22. How do I know what I’m allowed to do? Metasploit ● If you’re in msfconsole, you can use exploit/multi/handler ○ That’s it. If you want to use more of the metasploit console you can do it only once and only on an allowed box ● No restrictions on msfvenom Meterpreter ● If you’re in a meterpreter session run “help” ○ It will list out all meterpreter commands, categorized by section.
  • 23. Buffer Overflows Why you’d want to learn this ● You’re a hacker, you want to know how things work. ○ Buffer overflows are core to the fun stuff we get to do ● You want to be able to edit (or even find) exploits How you’d learn this ● Go over the documentation provided by Offensive Security ○ Keep going over it until it makes sense ○ Do the exercises provided by Offensive Security ○ Go find more stuff to exploit (plenty of resources on the internet)
  • 24. Exploits in the lab environment ● Lots of finding and editing existing exploits ● Build up a collection of scripts and tools that hit common exploits ○ MS08-067, Linux Kernel Priv Esc, etc ● Learn how to read basic C, it’ll help. ● Some of the servers are old, your compiled code won’t run on them ○ Download an ISO of the old OS and spin it up in a VM ○ Google “Debootstrap” to setup builds of old Debian/Ubuntu installs on your Kali box. ■ Once setup you can use “chroot” to switch into them ■ Note that Debian changed their file hashes from MD5 to SHA a while back. You may need to find an old version of debootstrap to work on really old OSs.
  • 25. Tips and Tricks ● If you have a root shell on a box but don’t know the root password, echo your SSH key to /root/.ssh/authorized_keys ○ Boom. Passwordless login. ● Exploit chains can get complicated and VMs get reset often. Script out exploits that you find yourself doing over and over again. ● The documentation walks you through writing a “wget script” generating script for Windows. Do that, it comes in handy. ○ Actually, just do all the exercises that they walk you through. ● Do a report on the lab and do it as you go along ○ The lab is big, there’s a lot of stuff to document. Don’t put it off. ○ The lab report can help to sway whether you pass the OSCP or not
  • 26. Tips and Tricks Part 2: Too fast too tricky ● Sometimes the easiest way to get shell on a box is to create a new account. ○ If you have privileged code execution on a box, why not just create a new account? ● Pillage ○ Check every single box you get into for loot. There are some boxes in the labs that you can only get into with info gleaned elsewhere ○ Think. Where would the good stuff be? ■ /home ■ /etc ■ /var/log ■ C: ■ C:Users (C:Documents and Settings) ○ Use scp, meterpreter or existing services (http, ftp) to get files off a box
  • 28. Pivoting is Fun ● There are three networks in the OSCP lab ○ You start out with access to one ○ Be on the lookout for dual-homed boxes ● How do you pivot ○ SSH ■ Forward Proxy: ssh -D [Port Number] [user]@[Remote IP] ● Example: ssh -D 9995 root@192.168.1.10 ■ Reverse Proxy: ssh -R [Remote Port]:localhost:[Local Port] [user]@[Remote IP] ● Example: ssh -R 8081:localhost:3000 root@192.168.1.10 ● Note: Requires “GatewayPorts Yes” in remote sshd_config ○ ProxyChains ■ Routes any TCP network traffic over proxy
  • 30. Recap ● Don’t be afraid to learn ● Be aggressive in your scanning ● Keep notes, be organized ● Do your lab report ● Don’t use metasploit ● Be really comfortable with basic Buffer Overflows ● Pillage everything ● Hack the planet

Notes de l'éditeur

  1. Twitter - I specialize in retweeting people much smarter than myself.
  2. How many people are taking/studying for the OSCP now?
  3. I love hacker stock images
  4. This kid is wearing two pairs of glasses.
  5. All of this helped out
  6. Learn Quickly: I picked up real basic PHP and C while studying. Learned how Coldfusion and Tomcat worked. Multi chain exploits