Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

[TuT] Maintaining access with Web Backdoors - Kali Linux [Weevely]

Hello, Today we will learn about maintaining access with Web backdoors using Web shell. Example, Weevely (Pre-installed in Kali Linux).

Once a web server and its services have been compromised, it is important to ensure that secure access can be maintained. This is usually accomplished with the help of a Web Shell - a small program that provides stealth backdoor access and allows the use of system commands to facilitate post-exploitation activities.

Kali comes with several web shells, here we will use a popular PHP web shell called Weevely.

Weevely simulates a Telnet session and allows the tester or attacker to take advantage of more than 30 modules for post exploitation tasks, including the following:

1. Browsing the target filesystem.
2. File transfer to and from the compromised system.
3. Performing audits for common server misconfigurations.
4. Brute-forcing SQL accounts through the target system.
5. Spawning reverse TCP shells.
6. Executing commands on remote systems that have been compromised, even if PHP security restrictions have been applied.

Finally, Weevely endeavors to hide communications in HTTP cookies to avoid detection. To create Weevely, issue the following command from the Terminal.

root@rs :~ # weevely generate <Password> <Path>

This will create the file weevely.php in the root directory. Executing commands on remote systems that have been compromised, even if PHP security have been applied.

Using a file upload vulnerability or any other compromise , including ones that give access to the meterpreter file upload functions, upload weevely.php onto the compromised website.

To communicate with the web shell, issue the following command from the
command prompt, ensuring that the target IP address, directory, and password
variables are changed to reflect those of the compromised system:

root@rs :~# weevely http://<target IP address> <directory><password>

In the example shown in the following screenshot, we have verified that we are
connected to the web shell using the whoami command (which identifies the correct
directory) and the ls command in order to obtain a file list (which again confirms the
source of the connection as weevely.php). The cat /etc/password command was
used to view passwords.

The web shell can also be used to establish a reverse shell connection back to the
tester, using either Netcat or the Metasploit Framework as the local listener.

Summary

In this tutorial, we examined websites and the services that they provide to
authorized users from the perspective of an attacker. We applied the kill chain
perspective to web services in order to understand the correct application of
reconnaissance and vulnerability scanning.

Several different vulnerability scanners were presented; we focused on making and
using modifications to existing scanners to support the assessment of websites and
web services, the use of browser-based vulnerability scanners, and vulnerability
scanners that are specifically designed to assess websites and their services.
Only a select few exploits were reviewed, and we completed the chapter with an
examination of a web shell that is specific for web services.

Credits - Mastering Kali Linux.
For more tutorials : www.rootsh3ll.com
Seeing Weevely mentioned in HF always stings my heart. Techie, one of the youngest and most talented people I've met here wrote his one over it. Cheers.
(Jul 8, 2015 11:55 AM)Th3PonyWizard Wrote:  Seeing Weevely mentioned in HF always stings my heart. Techie, one of the youngest and most talented people I've met here wrote his one over it. Cheers.

Thanks 'Makise Kurisu' for the feedback!
and thanks also for providing the Link.
This Weevely tutorial is written very deeply and in an easy to understand manner. Such a great post! Really helpful.
Thanks a lot dear! :)


Possibly Related Threads...
Thread / Author Replies Views Last Post
by TiTaNiK53Aug 8, 2020 11:14 AM 0 158 Aug 8, 2020 11:14 AM
Last Post: TiTaNiK53
by blackcoder00Jan 31, 2018 07:55 AM 3 299 Jan 31, 2018 07:55 AM
Last Post: CyberStrike
by Sky123Aug 21, 2017 03:47 AM 0 166 Aug 21, 2017 03:47 AM
Last Post: Sky123