Home »
OWASP
» OWASP Top 10 Web Hacking Final Lab 9 SQL Injection Union Exploit #2 (Create Output File)
OWASP Top 10 Web Hacking Final Lab 9 SQL Injection Union Exploit #2 (Create Output File)
{ SQL Injection Union Exploit #2 (Create Output File) }
OWASP Top 10 Web Hacking Final Lab 9
Start Web Browser Session to Mutillidae |
- On BackTrack, Open Firefox
- Instructions:
- Click on the Firefox Icon
- Notes (FYI):
- If FireFox Icon does not exist in the Menu Bar Tray, then go to Applications --> Internet --> Firefox Web Browser
- Open Mutillidae
- Notes (FYI):
- Replace 192.168.1.111 in the following URL --> http://192.168.1.111/mutillidae, with your Mutillidae's IP Address obtained from (Section 3, Step 3)
- Instructions:
- http://192.168.1.111/mutillidae
Section 9. Go To User Info Page |
- Go to User Info
- Instructions:
- OWASP Top 10 --> A1 - SQL Injection --> SQLi - Extract Data --> User Info
Section 15. SQL Injection (Refresher Union Examples) |
- Inspect the Name Textbox with Firebug
- Instructions:
- Right click on the Name Textbox
- Click on Inspect Element
- Change Text Box Size
- Instructions:
- After the string "size=", Change 20 to 100. (See Picture)
- Click on the Close Button
- Second Union SQL Injection Attempt
- Instructions:
- In the Name Textbox place the following string. Remember to put a space after the "-- ".
- ' union select ccid,ccnumber,ccv,expiration,null from credit_cards --
- Click the View Account Details button
- Note(FYI):
- The goal with this union statement is to map out which fields in the database align with the above numbers when the output is displayed.
- Viewing the Results
- Note(FYI):
- Scroll down and notice that Username is populated with a credit card number, Password is populated with the CCV, and Signature is populated with the expiration.
- Username=4444111122223333
- Password=745
- Signature=2012-03-01
- Congrats, you successful manipulated a "purposeful" bug in the user-info.php script, to display credit card information using a query meant for the accounts table.
- Instructions:
- View the Results
Section 16. SQL Injection (Union Example with Curl #5) |
- Go to User Info
- Instructions:
- OWASP Top 10 --> A1 - SQL Injection --> SQLi - Extract Data --> User Info
- Inspect the Name Textbox with Firebug
- Instructions:
- Right click on the Name Textbox
- Click on Inspect Element
- Change Text Box Size
- Instructions:
- After the string "size=", Change 20 to 100. (See Picture)
- Click on the Close Button
- Execute MySQL Union Injection
- Note(FYI):
- Remember to put a space after the "-- ".
- Instructions:
- Place the below Injection String in the Name Textbox
- ' union select ccid,ccnumber,ccv,expiration,null from credit_cards INTO OUTFILE '/var/www/html/mutillidae/CCN.txt' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n' --
- Click the View Account Details Button
- View Results Page
- Instructions:
- At first you would think that causing an Authentication Error would not result in any other action aside from printing a message to the screen.
- Although the second message says results were found, they were actually written to a file instead of being displayed to the screen.
- Open a new tab
- View Union Injection Output File
- Notes(FYI):
- Replace 192.168.1.111 in the below URL with your Mutillidae's IP Address obtained from (Section 3, Step 3)
- Instructions:
- Place the following URL in the Address Textbox
- http://192.168.1.111/mutillidae/CCN.txt
- Proof of Lab : Các bạn hãy quay lại toàn bộ quá trình thực hành, với text note có tên của mình
0 comments:
Post a Comment