WELCOME TO CIS 55 – LECTURE 3
Topics to cover:�Threat Modeling�Incident Management Exercise
Tools for Penetration Testing:
NMAP, NESSUS, METASPLOIT, SQLMAP
Guest Appearance (Microsoft engineer)
COURSE LOGISTICS
Lab 3 is due on Feb 23
Quiz 2 is open from today 1pm till 10pm on Sunday Feb 11
Review of Lab 2
Threat Modeling
THREAT MODELING
GOALS OF THREAT MODELING
THREAT MODELING PROCESS
Evaluate
Evaluate threats.
Characterize
Characterize security of system.
Understand
Understand adversary’s view of system.
KNOW THY ENEMY
System resources that an adversary might attempt to access, modify, or steal.
Ex: credit cards, network bandwidth, user access.
Any location where data or control transfers between the system being modeled and another system.
Ex: network sockets, web forms, files
Privileged external entities have to legitimately use system resources.
IDENTIFY SYSTEM ASSETS
Execute code as web server
Network/disk resources
Access to stored data
ANALYZE ENTRY POINTS
Are you missing any potential back door entry points?
What if attacker is on the web server?
What if attacker between web and database servers?
How does system distinguish between bad and good input?
Can system distinguish a request from a legitimate client from a replay attack?
CHARACTERIZE SYSTEM SECURITY
How do users use the system to fulfill needs?
How could an adversary use these system interfaces to attack the system?
How does system security depend on external systems?
What assumptions do components make about data or control transfers with other components?
Model how system processes data from each entry point using tools
EVALUATE THREATS
Identify Threats
For each entry point, determine how an adversary may attempt to affect an asset.
Based on asset, predict what adversary would try to do and what his goals would be.
Analyze Threats.
Decompose threats into individual, testable conditions using techniques like attack trees.
Evaluate risk of threat with DREAD categories.
DREAD
Damage – how bad would an attack be?
Reproducibility – how easy is it to reproduce the attack?
Exploitability – how much work is it to launch the attack?
Affected users – how many people will be impacted?
Discoverability – how easy is it to discover the threat?
QUANTIFYING THREATS
Calculate risk value for nodes in attack tree
Start at bottom of tree.
Assign a number 1-10 to each DREAD item.
Assign average of numbers to node.
Propagate risk values to nodes.
Alternate technique: monetary evaluation
Estimate monetary value to carry out attacks.
Propagate values to parent nodes as above.
Note: smaller values are higher risks in this method.
Resources
Microsoft: https://www.microsoft.com/en-us/securityengineering/sdl
Threat Modeling:
2017 EQUIFAX DATA BREACH
EQUIFAX
Incident Response -- Backdoors and Breaches
Pentesting Tools
Review & In Depth
WHO NEEDS PENTESTING?
PENTESTING VIEWPOINTS
PHASES OF PENTESTING
Reconnaissance and Information Gathering
Network Enumeration and Scanning
Vulnerability Testing and Exploitation
Reporting
RECONNAISSANCE AND INFORMATION GATHERING
NETWORK ENUMERATION AND SCANNING
NMAP
NMAP RUN EXAMPLES
NMAP FLAGS
NMAP: FLAGS EXAMPLE
NMAP: FLAGS EXAMPLE
NMAP: FIREWALL AVOIDANCE
SCAN SPEED
TESTING AND EXPLOITATION
INTRO TO NESSUS
NESSUS
NESSUS
NESSUS
NESSUS
INTRO METASPLOIT
METASPLOIT
ONCE YOU PICKED A MODULE
INSIDE THE MODULE
EXPLOIT
SQL INJECTIONS
�
SQL INJECTIONS
SQL INJECTIONS
SQLMAP
SQLMAP
Given this result, I decided the scan the
URL where I previously discovered
I could perform injection:
“http://10.0.0.101/peruggia/?action=comment&pic_id=1”.
SQLMAP: THIS SEEMS TO BE MORE INTERESTING
During this scan, sqlmap found the pic_id parameter vulnerable to injection. So now we can add another flag at the end of our scan of this URL to return any databases it finds:
python ./sqlmap.py -u "http://10.0.0.101/peruggia/" -dbs
The -dbs option adds database enumeration to the scan and with that, I was able to retrieve four databases that exist on this web server.
SQLMAP – TABLE ENUMERATION
Now I don’t know about you, but the “target” database kind of stood out to me,
so I chose to further enumerate that one:
python ./sqlmap.py -u "http://10.0.0.101/peruggia/" -tables -D target
In the above command, I used the -tables option to enable table enumeration
and the -D option to specify which database I wanted sqlmap to scan.
SQLMAP – PWNED!
SQLMAP – PWNED!
REPORTING
HOW TO BECOME A PENTESTER
Certified Ethical Hacker (CEH)
eLearnSecurity Junior Penetration Tester
GIAC Certified Penetration Tester (GPEN)
CompTIA Pentest+
Offensive Security Certified Professional (OSCP)
Personal Security
THE END