- whoami
- Overview
- Testing Methodologies
- Soft Skills
- Why Go Beyond Automated Testing
- Finding Unknown Stuff
- Vulnerability Exploitation
- Reporting and Automation
- Useful Training and Talks
Having an established testing methodology is an important first step before you jump into conducting a pentest.
You do not need to marry a methodology.
Hunt for what automated tools miss
The DHS National Cybersecurity Assessment and Technical Services (NCATS) organization recently released a report on vulnerability findings.
According to the DHS report, 67% of high impact vulnerabilities required manual testing to enumerate.
Burp: Right-Click -> Send to Repeater or Request in Browser
Hopefully you are convinced that just running a scan isn't the best solution.
Given the the following parameters, what would you attempt to do?
If a customer gives me a list of targets I normally encourage them to let me see what I can pull out. They are normally quite surprised and unaware of what they have exposed.
How do you tackle large /8's, /16's, how do you even build out this footprint starting with a company name?
Can you deploy the technology in a VM and test?
If you have access to source code you can enumerate vulnerabilities more efficiently.
Very common finding with web application penetration testing.
Often combines several vulnerabilities:
Pull the authentication request up in Burp's Repeater and try a few times.
If you see no sign of automation controls send to Intruder for more aggressive testing.
We as humans are bad at passwords:
Lots of wordlists out there, consider making a targeted wordlist using CeWL.
Research the targeted user's interests and build lists around those interests.
Automated tools do this poorly. They commonly will point out file upload functionality and make it an informational finding.
You should leverage a proxy and look at all the details associated with the file upload:
Insecure file uploads -> RCE, Web Shells, XSS, etc.
Contact Us, and Feedback forms are commonly vulnerable to SMTP
How excited would you be if the app allowed you to send email as the CEO?
POST /contact/contactus.php HTTP/1.1 Host: www.target-site.com User-Agent: Mozilla/5.0 Connection: Keep-alive Content-Type: application/x-www-form Content-Length 106 name=Stephanie&email=your-input@domain.com&siteAdmin=webmaster@target-site.com &subject=Contact+Us&message=test
Lots of ways to do this: XSS, Open Redirect, New Domain, etc.
From: kren@breakpoint-lab.com To: lhudson@breakpoint-labs.com; [other-employees] Subject: 2015 Tax Information Hey Guys, Please login to the employee portal for important information about 2015 taxes: https://www.breakpoint-lab.com/employee-login.php Thanks, Kylo Ren Human Resources Breakpoint Labs
Enumerate an unlinked resource "debug.php"
that gives an HTTP 200 OK and blank screen. This is where most automated tools stop.
Parameters are fuzzed in an attempt to enumerate inputs "page="
gives back a different response "Failed opening 'test' for inclusion"
.
Attempt to point the page parameter to local and remote resources and attempt to execute code on the server.
PHP was running as SYSTEM on the vulnerable application. An attacker could dump password hashes and pivot throughout the organization with admin privileges.
Something might be vulnerable, but take some work to successfully exploit
Many try to exploit stuff and throw complex payloads. When I am working on exploiting something, I try to use very simple payloads at first and then work my way to something more complex.
Webshell Example: Some simple examples, more here
<?php system($_GET['d']);?>
<% eval request("d") %>
~$ sqlmap -u “[target_URL]” -p “order_by” --random-agent --tamper=between --dbms=mysql --level=5 --risk=3
Markdown is awesome. Common Findings Database - Check it out
#!/usr/bin/env python import sys import requests with open(sys.argv[1], 'r') as URLs: for URL in URLs: header = {'User-Agent':'I Love Python :)'} try: response=requests.get(URL, headers=header, allow_redirects=False) print "[+] "+URL+" ["+str(response.status_code)+"]" except Exception as e: print e
~$ python shodan-searcher.py -s hostname:google.com [+] Query: hostname:google.com Total_Results: 83717 [-] 109.163.221.248 (cache.google.com) 443 [-] 49.128.162.193 (cache.google.com) 2000 Server: MikroTik bandwidth-test server [-] 189.39.126.6 (6.126.39.189.cache.google.com) 80 [-] 82.223.249.194 (www.google.com) 3306 Server: MySQL [-] 67.228.52.246 (googlebot.google.com) 22 Server: OpenSSH ..... [+] Found Results in CIDRs: 208.117.244.0/24, 186.208.224.0/21, 85.118.96.0/19, 210.245.8.0/21, 86.120.0.0/13, 173.237.96.0/19, ..... [+] Found the following TLDs: google.com
Email: amcnicol@breakpoint-labs.com