130 likes | 262 Vues
This chapter provides an in-depth exploration of web hacking, focusing on web server vulnerabilities, misconfigurations, and password cracking techniques. It covers essential topics such as identifying and exploiting web server vulnerabilities, securing applications against threats like SQL injection and cross-site scripting, and leveraging tools like Metasploit for penetration testing. Additionally, the chapter highlights effective countermeasures, including the importance of strong passwords, authentication mechanisms, and robust security practices, helping readers safeguard their web environments effectively.
E N D
Chapter 8 Web Hacking: Google, Web Server, Web App Vulnerabilities, and Web-Based Password Cracking Techniques
Web Server Vulnerabilities • Misconfiguration of Web Server Software • Using default web site with default settings • OS / App bugs; flaws in code • Vulnerable Default Install
Attacking a Web Server • Access via Ports 80 and/or 443 • Allow HTTP Tunneling for covert protocols • Banner Grabbing • Opportunities after Banner Grabbing • Knowing the server type and version: • Deface • Gather Admin information • Using DNS to redirect users • Compromise FTP or SMTP • Change web shares • Perform SQL Injection attacks
Hacking IIS • Directory Transversal / Unicode Exploit • Accessing directories other than those intended • http://www.something.com/scripts/scripts/..%co%af../..%co%af../windows/system32/cmd.exe?/c+dir+C.\ • Buffer Overflow attacks • Send more data than capable of handling • Source Disclosure attacks • Collecting web app source code
Web Server Hardening • Rename Admin account; strong password • Disable default FTP sites • Disable Anonymous/Blind FTP: stops directory transversal • Remove unused apps • Disable directory browsing • Apply patches, hotfixes, service packs • Perform bounds checking • Disable remote administration • Enable auditing and logging • Use strong firewall • Replace GET method with POST method
Web Application Threats • Cross-Site Scripting: Replace ‘<‘ and ‘>’ with ‘<’ and ‘>’ • SQL Injection: validate user variables • Eg: SELECT email, passwd, login_id, full_name FROM members WHERE email = 'attacker@somehwere.com'; DROP TABLE members; --‘ • Command Injection: Use language specific variables
Web Application Threats • Cookie Poisoning: no passwords in cookies • Buffer Overflow: validate user input • Vulnerable: C & C++ • Worm: Code Red • Authentication Hijacking: use SSL or TLS • Directory transversal: Set permissions properly
Web Server Hacking Tools • Wget: command-line for downloading entire website • BlackWidow: scan / map pages of a website • MetasploitProject • Metasploit Framework: develop/execute exploit code • Opcode Database • Shellcode Archive • Security Research • http://en.wikipedia.org/wiki/Metasploit_Project
Web Server Hacking Tools • The Way Back Machine • Contains 100+ TB and 10 billion Web pages from 1996 • Httprint: Web server fingerprinting tool • Nitko: Web scanner for penetration testing • WinSSLMiM: HTTPS MitM creates fake certs
Google Hacking • Look for PHP file with ‘admbook’ and ‘version’ • intitle:admbookintitle:versionfiletype:php • Look for particular text: intext: • Search for specific file type: filetype: • http://www.youtube.com/watch?v=_VWXaBq--eg • http://www.informit.com/articles/article.aspx?p=170880 • http://www.marcandangel.com/2007/07/25/7-clever-google-tricks-worth-knowing/
Web-Based Password-Cracking Techniques • Authentication Types • HTTP authentication • Basic: data sent in clear text • Digest: data is hashed and challenge-response is used • NTLM authentication • Used in IIS for NT4 • Kerberos • Used in IIS for 2000 and 2003 and 2008 • Certificate-Based • Uses Public/Private keys • Token-Based • Requires smart card technology • Biometric-Based
Password Attacks / Cracking • Dictionary / Rainbow • Brute-Force • Hybrid • Tools • Brutus: performs Dictionary, Hybrid, Brute-force • Webcracker: uses a word list
Password-cracking Countermeasures • Strong Passwords • Strong Authentication Mechanisms • Kerberos • Tokens • Biometrics