Lecture 3 - Application Server Attacks
Lecture 3 - Application Server Attacks
Excerpts and concepts taken from the Web Application Hacker’s Handbook 2nd Edition License: Creative Commons
Stuttard & Pinto, Wiley Press
2
Information Disclosure
3
Information • Error
Disclosure Messages
Sources
Performing arbitrary actions
• Stack
against a web application may Traces
result in sensitive data leakage,
by means of:
• Debug
Messages
4
[02-Oct-2016 22:15:24] PHP Fatal error: Call to undefined function add_action() in /home4/finister/public_html/test/wp-
content/themes/solaris/fw/core/type.team.php on line 11
[02-Oct-2016 22:15:33] PHP Fatal error: Call to undefined function add_action() in /home4/finister/public_html/test/wp-
content/themes/solaris/fw/core/core.reviews.php on line 11
[02-Oct-2016 22:15:34] PHP Fatal error: Call to undefined function add_action() in /home4/finister/public_html/test/wp-
content/themes/solaris/fw/core/plugin.woocommerce.php on line 7
[02-Oct-2016 22:15:44] PHP Fatal error: Call to undefined function add_action() in /home4/finister/public_html/test/wp-
content/themes/solaris/fw/core/type.taxonomy.php on line 11
[02-Oct-2016 22:15:49] PHP Fatal error: Call to undefined function add_action() in /home4/finister/public_html/test/wp-
content/themes/solaris/fw/core/type.attachment.php on line 11
[02-Oct-2016 22:15:51] PHP Fatal error: Call to undefined function add_action() in /home4/finister/public_html/test/wp-
content/themes/solaris/fw/core/type.testimonials.php on line 11
[02-Oct-2016 22:15:54] PHP Fatal error: Call to undefined function add_action() in /home4/finister/public_html/test/wp-
content/themes/solaris/fw/core/plugin.bb-press.php on line 7
[02-Oct-2016 22:15:55] PHP Fatal error: Call to undefined function add_action() in /home4/finister/public_html/test/wp-
content/themes/solaris/fw/core/type.post_type.php on line 11
6
Warning: mysql_connect(): Access denied for user 'root'@'localhost' (using password: NO) in
/home/seleccionfidenag/public_html/b4k&2018/clases/clase_mysql.class.php on line 38
Warning: mysql_query(): Access denied for user ''@'localhost' (using password: NO) in
/home/seleccionfidenag/public_html/b4k&2018/paso8.php on line 11
Warning: mysql_connect(): Access denied for user 'root'@'localhost' (using password: NO) in
/home/seleccionfidenag/public_html/b4k&2018/clases/clase_mysql.class.php on line 38
7
[08-Mar-2018 05:55:10 America/Chicago] PHP Fatal error: Class 'WP_Dependencies' not found in /home2/patahiti/public_html/Multi/wp-
includes/class.wp-styles.php on line 18
[08-Mar-2018 08:35:28 America/Chicago] PHP Fatal error: Uncaught Error: Call to undefined function add_shortcode() in
/home2/patahiti/public_html/Multi/wp-includes/media.php:1484
Stack trace: #0 {main} thrown in /home2/patahiti/public_html/Multi/wp-includes/media.php on line 1484
[08-Mar-2018 09:58:42 America/Chicago] PHP Warning: require_once(ABSPATHWPINC/class-walker-nav-menu.php): failed to open stream:
No such file or directory in /home2/patahiti/public_html/Multi/wp-includes/nav-menu-template.php on line 11
[08-Mar-2018 09:58:42 America/Chicago] PHP Fatal error: require_once(): Failed opening required 'ABSPATHWPINC/class-walker-nav-
menu.php' (include_path='.:/opt/php70/lib/php') in /home2/patahiti/public_html/Multi/wp-includes/nav-menu-template.php on line 11
[08-Mar-2018 10:26:36 America/Chicago] PHP Warning: require(ABSPATHWPINC/class-requests.php): failed to open stream: No such file or
directory in /home2/patahiti/public_html/Multi/wp-includes/class-http.php on line 11
[08-Mar-2018 10:26:36 America/Chicago] PHP Warning: require(ABSPATHWPINC/class-requests.php): failed to open stream: No such file or
directory in /home2/patahiti/public_html/Multi/wp-includes/class-http.php on line 11
[08-Mar-2018 10:26:36 America/Chicago] PHP Fatal error: require(): Failed opening required 'ABSPATHWPINC/class-requests.php'
(include_path='.:/opt/php70/lib/php') in /home2/patahiti/public_html/Multi/wp-includes/class-http.php on line 11
11
Triggering Errors
A p p l i c a t i o n S e r v e r At t a c k s
19
Table taken from the Web Application Hacker’s Handbook 2nd Edition, Stuttard & Pinto, Wiley Press
21
Directory Indexing
WebDAV Overview
WebDAV Methods
Request:
OPTIONS /filepath/ HTTP/1.1
Host: example.com
Result:
HTTP/1.1 200 OK
[snip]
Server: Microsoft-IIS/6.0
MicrosoftOfficeWebServer: 5.0_Pub
Allow: OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, COPY, MOVE
Allow: MKCOL, PROPFIND, PROPPATCH, LOCK, UNLOCK, ORDERPATCH
DAV: 1, 2, ordered-collections
27
WebDAV Exploitation
WebDAV Exploitation
Request: Request:
GET https://example.com/resource HTTP/1.1 CONNECT example.com HTTP/1.1
Result: Result:
HTTP/1.1 200 OK HTTP/1.1 200 Connection established
[snip] [snip]
Note: Standard HTTP requests use a relative Note: HTTP’s built-in CONNECT method is
path to access resources and rely on a Host designed specifically to proxy connections to
header to identify the server to contact. By non-HTTP ports over a HTTP channel. You
providing a hostname and full path with no may be able to use this proxy connection to
Host header, the proxy may directly contact load FTP resources from internal services.
the target site on our behalf.
31
We b A p p l i c a t i o n F i r e w a l l s
34
Let’s break!
S e e Yo u N e x t T i m e