Sponsored

In this article you will learn, after compromise the WordPress CMS ( Content management system ) how you can get the reverse shell of web server. Even In this tutorial we will not use Metasploit Framework, we will try to get reverse shell of web server through Netcat Tool.

Netcat

Netcat is a feature-packed networking utility for reading from and writing to network and it uses the TCP & UDP protocols. Netcat was written for nmap projects and which is helpful for establishing a network listener on random TCP and UDP ports. For established the connection ncat should be implement on both place source and destination. Netcat is a CLI ( Command Line Interface ) tool which provide us various option such as proxy, specific ports, timeout and much more. In this article we will use netcat tool for get the reverse shell of web server.

Requirements

Kali linux = Attacker
Ubuntu = WordPress Installed ( Victim )

Lets take a look 🙂 !!

Note : We already have access of WordPress admin console.
In the given directory has various types of php reverse shell so you can choose as per your need. In our case we will choose php reverse shell.

nano /usr/share/webshells/php/php-reverse-shell.php

Now change your IP address as shown given below.

You can paste it on various file such as 404.php, index.php etc. But in our case we will paste it on main index.php file.

We need to start the netcat listener to control the web server.
Usage : nc (lhost/verbose) (any port)

  • l = Localhost
  • v = Verbose
  • nc -lvvp 1234

After update the file execute the following URL on your favorite browser.
Usage : http:// Remote Host IP /WordPress

http://192.168.0.105/wordpress

When you execute the url on browser the session will comes to you.

Method -2

In this method we will first inject the php reverse shell on the downloaded theme and install it on WordPress to get the shell.

Go on official wordpress website and download any theme.

Extract it and paste the php reverse shell code on index.php file.

Now install the theme on wordpress and activate it.

After doing all this click on the site view option to view your site.

Now you can see that as soon as we clicked on the site view option, the session came here.

Enjoy 🙂 !!

About the Author
Shubham Goyal Certified Ethical Hacker, information security analyst, penetration tester and researcher. Can be Contact on Linkedin.
Sponsored

Recent Posts

Termux Cheat Sheet for Hackers

Hey Folks :) !! In this article, we present the "Termux Cheat Sheet for Hackers"…

1 month ago

Cracking the X-Factor in Cybersecurity: How Humans are Protecting the Systems?

Amid the rapid advancement of technology, the significance of human involvement in cybersecurity frequently goes…

8 months ago

Cariddi – Hidden Endpoint Finder for Bug Hunting

Hey Folks, we are back today after such a long break, but don't worry we…

2 years ago

API Security Testing 101: Know Everything About API Security Testing!

The security of your API should be one of the top priorities of companies. Without…

2 years ago

7 Best Tools for Web Penetration Testing: Comprehensive Details

Hey Folks, In today's business world, it is essential to have an online presence. However,…

2 years ago

Cyber Security Audits: Everything You Need to Know About It

Hey Folks, Is your business prepared in case of a cyber attack? Many companies don't…

2 years ago
Sponsored

This website uses cookies.