Chapter 6 - Web Based Hacking Servers and Applications Flashcards
Web Organizations
Internet Engineering Task Force (IETF)
World Wide Web Consortium (W3C)
Open Web Application Security Project (OWASP)
IETF - publishes RFC’s. No policy or business, only engineering.
W3C - develop protocols and guidelines to ensure long term growth of the web. Tries to get vendors to implement core principles and components
OWASP - charitable organization focused on improving security of software. Publishes reports, documents, training efforts to assist in web security
OWASP Top 10
broad consensus about what the most critical web application security flaws are
A1 - injection flaws
A2 - broken authentication and session management
A3 - Cross-Site Scripting (XSS)
A4 - insecure direct object references
A5 - security misconfiguration
A6 - sensitive data exposure
A7 - missing function level access control
A8 - cross-site request forgery
A9 - using components with known vulnerabilities
A10 - unvalidated redirects and forwards
A1
Injection Flaws
SQL, OS, LDAP occur when untrusted data sent to an interpreter as part of a command or query
Hostile data can trick interpreter into executing commands or accessing data without authorization
A2
Broken Authentication and Session Management
can allow attackers to compromise passwords, keys, session tokens or exploit other implementation flaws to assume other users’ identities
A3
Cross-Site Scripting (XSS)
occur whenever an application takes untrusted data and sends it to a web browser without proper validation or escaping.
Lets attackers execute scripts in target browser which can hijack user sessions, deface websites or redirect user to malicious website
A4
Insecure Direct Object References
A direct object reference occurs when developer exposes a reference to an internal implementation object like a file, directory or database key.
Without access control check or other protection, attackers can manipulate these references to access unauthorized data
A5
Security Misconfiguration
security configurations should be defined and deployed for applications, frameworks, servers and platforms.
defaults are often insecure, so secure settings should be defined and implemented
software should be updated
A6
Sensitive Data Exposure
Many web applications don’t properly protect sensitive data and authentication credentials
sensitive data deserves extra protection like encryption at rest and transit, and special precautions when exchanged with the browser
A7
Missing Function Level Access Control
Most web applications verify function level access rights before making that functionality visible in the UI. But applications need to perform the same access control checks on the server when each function is accessed
If requests aren’t verified attackers can forge requests to access functionality without proper authorization
A8
Cross-Site Request Forgery (CSRF)
CSRF attack forces a logged-on victim’s browser to send a forged HTTP request including the victim’s session cookie and any other automatically included authentication info to a vulnerable web application
This allows attacker to force victim’s browser to generate requests the vulnerable applications thinks are legitimate requests from the victim
A9
Using Components with Known Vulnerabilities
Many components are often run with full privileges. If one is exploited, an attack can facilitate serious loss or server takeover.
Applications using components with known vulnerabilities can undermine application defenses and enable a range of attacks and impacts
A10
Unvalidated Requests and Forwards
Web applications often redirect and forward users to other pages and websites and use untrusted data to determine the destination pages.
Without proper validation, attackers can redirect victim to phishing or malware sites or use forwards to access unauthorized pages
ECC’s 6 Stages of Web Server Attack Methodology
information gathering
footprinting
mirroring websites
vulnerability scanning
session hijacking
password cracking
web server attack
information gathering and footprinting
whois and banner grabbing
net craft for high level info
HTTPRecon, IDServe for identifying web server architecture and OS
HTTPrint
Burp Suite can give insight to content
Black Wiow, HTTrack can copy website to your system for review
web server attack
vulnerability scanning
Nessus is ok
Nikto is designed for web servers: file problems, script errors, server configuration errors. Can be configured within Nessus to automatically scan when a web server is discovered. Plugins and signatures available
Nikto is not a stealthy tool
Web Server Architecture
Steps to request and receive a web page
client sends request to server to open TCP port on 80 or 443 (typically)
after agreeing to the handshake on the page request, the server waits for HTTP GET request from the client
HTTP GET request asks for specific HTML code representing a web page
Server looks through storage area, finds code that matches request and sends to client
Issues to consider when a client requests a web page
does the server validate what client is requesting
does server respond only to verbiage in the request or can it get confused and respond with other actions
where are the actual files of HTML and other code stored. How are their permissions assigned.
etc etc
Tier system in network architecture
N-tier architecture (aka multi-tier architecture) distributes processes across multiple servers
each tier consists of single role carried out by one or more computer systems (or a cluster)
Typically this is done in 3 Tiers:
presentation
logic
data
Apache design and architecture
Apache is built modularly with a core and modules to perform variety of functions. Open source so many add-ons available
Commonly misconfigured settings on Apache or IIS
error messaging (debug logs are useful) default passwords SSL certificates scripts remote admin functions config files and services properly restricting remote administration eliminating unnecessary services changing default passwords and accounts