Question: Pentesting AssignmentWelcome to UrBank Login Username : Password : Remember Me Here is your task: The preg _ replace ( ' / s / i
Pentesting AssignmentWelcome to UrBank
Login
Username :
Password :
Remember Me
Here is your task: The pregreplacesi function disallows some SCRIPT elements from being executed. Your task is to find a SCRIPT element that will execute.
To bypass this function, follow these steps:
Refer to reputable sources for an explanation of how the pregreplace function works.
Research code vulnerability databases to see how others have bypassed this control.
Pentest the site armed with the information learned and the procedure demonstrated in this section.
Click the START button in the adjoining window.
Click the Kali workstation icon in the topology.
Type root in the username field and press Enter.
Type P@sswrd into the Password field and press Enter.
Execute the following command and provide the password when prompted
to establish an SSH session with urbank.com.
root@Hacker:~# ssh support@urbank.com
support@urbank.com's password: P@sswrd
Note: the password will not be displayed as you type it for security reasons.
Execute the following and provide the password when prompted to run the setup script.
support@Web:~$ LABB
sudo password for support: P@sswrd
Note: if you submit an incorrect password, then script may only partially run and you may have to
restart the session. Also note: you should wait for the script to complete before continuing.
Execute the following command to open UrBank's homepage into a text editor.
support@Web:~$ sudo nano c varwwwWebServerindexphp
Add pregreplacesi; to line
Press and hold the Ctrl key and press the x key Ctrlx
Press the y key.
Press Enter.
Click the close button on the terminal.
Click the Iceweasel icon on the launcher.
Navigate to urbank.com, then append myusername to the URL along with the SCRIPT
element you believe can bypass the control and press Enter.
Here is how you can tell if you are bypassing the control:
If the JavaScript executes
If the complete SCRIPT element gets injected
When finished please remember to terminate your session.
Click Stop button in the topology.
PREVIOU Processing triggers for libcbin
ldconfig deferredprocessingnowtaking place
support@Web: q sudo nano c varwwwWebServerindexphp
Add pregreplacesi; to line
Press and hold the Ctrl key and press the key
Press the y key. Press Enter.
Click the close button on the terminal.
Click the Iceweasel icon on the launcher.
Navigate to
urbank.com, then append myusername to the URL along with the SCRIPT
element you believe can bypass the control and press Enter. Click the Iceweasel icon on the launcher.
Navigate to
urbank.com, then append myusername to the URL along with the SCRIPT
element you believe can bypass the control and press Enter. Welcome to UrBank
Login
Username :
Password :
Remember Me
Here is how you can tell if you are bypassing the control:
If the JavaScript executes
If the complete SCRIPT element gets injected
When finished please remember to terminate your session.
Click Stop button in the topology.
myusernameiptalertBypassedipt
That script doesn't work. Tiried with the word Bypassed, and SS were stripped, got an aleret of "Bypaed".
All the above scriots won't work.
Am getting frustrated.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
