Skip to content

Commit cc8cf12

Browse files
committed
Updates php/challenge-71.md
Auto commit by GitBook Editor
1 parent d135ece commit cc8cf12

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

php/challenge-71.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ echo '<h1>'.htmlspecialchars($currentUser).'</h1>';
3030
This challenge suffers from a connection string injection vulnerability in line 4. It occurs because of the parse_str() call in line 21 that behaves very similar to register globals. Query parameters from the referrer are extracted to variables in the current scope, thus we can control the global variable $config inside of getUser() in lines 5 to 8. To exploit this vulnerability we can connect to our own MySQL server and return arbitrary values for username, for example with the referrer http://host/?config[dbhost]=10.0.0.5&config[dbuser]=root&config[dbpass]=root&config[dbname]=malicious&id=1.
3131

3232
# Refference
33-
+ php-security-calendar-2017
33+
+ php-security-calendar-2017 Day 7 - Bells

0 commit comments

Comments
 (0)