Question: Here is your task: The addslahes function disallows some SCRIPT elements from being executed. However, if you understand how the control works, you can bypass
Here is your task: The addslahes function disallows some SCRIPT elements from being executed.
However, if you understand how the control works, you can bypass this control. Your task is to
bypass the control and have the JavaScript execute.
To bypass this function, follow these steps:
Refer to reputable sources for an explanation of how the addslashes 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. Here the procedure for pentesting:
Clear the file as needed.
echo varwwwWebServercomhtml
Add contents to the comment field to see if it bypasses the control.
View the page source to determine what did or did not get injected.
Repeat the process outlined above Execute the following command to open the successful
login page.
support@Web: $ sudo nano c
varwwwWebServerloginsuccess.php
Processing triggers for libcbin
ldconfig deferred processing now taking place
support@Web: ; sudo nano c varwwwWebServerloginsuccess.php
Scroll down to lines and and wrap
$POSTcomment functions with addslashes
if $PQST
$name addslashes$POSTname;
$comment addslashes$POSTcomment;
if $POST
$name addslashes$POSTname;
$comment addslashes$POSTcomment;
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
