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 ">/var/www/WebServer/com.html
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.8 Execute the following command to open the successful
login page.
support@Web: $ sudo nano -c
/var/www/WebServer/login_success.php
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
support@Web: ; sudo nano -c /var/www/WebServer/login_success.php
9 Scroll down to lines 20 and 21 and wrap
$_POST['comment'] functions with addslashes().
if ($_PQST){
$name = addslashes($_POST['name']);
$comment = addslashes($_POST['comment']);
(1if ($_POST){
$name = addslashes($_POST['name']);
$comment = addslashes($_POST['comment']);

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Finance Questions!