Leak Society - The Home Of Nulled Resources.
Forum Beta v1 Now Live!
RCE Tutorial
Thead Owner : Houga, Category : Everything Coding, 4 Comment, 120 Read
Viewers: 1 Guest(s)
Member
***
68
Messages
29
Threads
0
Rep
4 Years of Service
08-10-2014, 10:22 PM
#1
Remote Code Execution is more common than people think, RCE is unzanitized user input that is executed in a command line.

PHP Code:
<?php
if(isset($_POST['ip']))
echo
"<pre>".shell_exec("ping ".$_POST['ip'])."</pre>";
?>
<html>
<form action="" method="post">
Ping <input type="text" name="ip"><input type=""submit" value="Submit!">
</form>
</html>

This will return:
Pinging google.com
[74.125.224.35] Reply from 74.125.224.35: bytes=32
Reply from 74.125.224.35: bytes=32
Reply from 74.125.224.35: bytes=32
Reply from 74.125.224.35: bytes=32
Reply from 74.125.224.35: bytes=32


Now, this is exactly what we‟d expect. However, if you are at all familiar with command line, you can pass parameters and other commands into it. For example, if : 127.0.0.1 -n 1 && dir
The “-n 1“ signifies that it will only ping once. This way, you don‟t have to wait for all 4 pings.


Messages In This Thread
RCE Tutorial - by Houga - 08-10-2014, 10:22 PM
RCE Tutorial - by Ghost - 08-10-2014, 10:24 PM
RCE Tutorial - by Knowledge - 08-10-2014, 10:24 PM
RCE Tutorial - by Houga - 08-10-2014, 10:25 PM
RCE Tutorial - by piemolneus - 08-11-2014, 11:27 AM

Forum Jump: