hacktricks-mcp
v0.5.7Offline HackTricks and HackTricks Cloud search, permissions check, payload and cheatsheet lookups.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
hacktricks_search Search HackTricks
Full-text search over the HackTricks wiki: both the HackTricks book (pentesting techniques, privilege escalation, web vulns, AD attacks, forensics) and the HackTricks Cloud book (AWS, Azure, GCP and other providers, Kubernetes, CI/CD). Returns ranked pages with snippets and each page's size. It takes terms, not a question: the name of the technique ('kerberoast', 'docker escape'), or the words of the situation when you cannot name it ('aws s3 enumeration', 'lxd group privilege escalation'). The page named after the technique is ranked first. Follow up with hacktricks_get_page on a result's pat…
| Parameter | Type | Description |
|---|---|---|
query * | string | Terms: the technique's name, or the words of the situation when you cannot name it, e.g. 'docker escape', 'aws s3 enumeration', 'lxd group privilege escalation' |
category | string | Optional: restrict to one category when the top hits are for the wrong one (substring match), e.g. 'Linux' or 'Windows'. hacktricks_get_toc lists them |
limit | integer | Max results (default 10) |
hacktricks_get_page Read HackTricks Page
Retrieve content of a HackTricks page found via hacktricks_search. For a long page, start with outlineOnly=true to list its sections with their sizes, then use section= to read one section by heading name, or codeOnly=true to get just the commands/payloads; a code block that antivirus software flags comes back as a note with the page's link. A short page (the search result shows its size) can be read whole. Text comes in slices of up to 20,000 characters, each ending at the end of a line; a cut slice ends with the offset where the rest continues.
| Parameter | Type | Description |
|---|---|---|
path * | string | Page path from hacktricks_search (e.g. 'windows-hardening/active-directory-methodology/kerberoast.md'). The ending of a path and a file name without .md also work ('kerberoast', 'ntlm/README.md'); whe… |
book | string | Book to read from. Only matters for the few paths that exist in both books, such as README.md; the default is "hacktricks". |
codeOnly | boolean | If true, return only the fenced code blocks (commands/payloads) of the page or section, each with its language and the label above it when the page gives one |
offset | integer | Skip this many characters of the page or section. A truncated response ends with the offset where the rest continues. |
outlineOnly | boolean | If true, return the headings with the size of each section instead of the content. Use it to choose a section before reading. |
section | string | Optional heading name to extract just that section. A heading with exactly that text is preferred, else the first whose text contains it; marks, footnote links and double spaces do not count. The answ… |
hacktricks_get_toc HackTricks Table of Contents
Get the structure of both HackTricks books from their tables of contents. Call without arguments for the overview (each book's categories and chapters with page counts), or pass a filter to list the pages under the entries whose title contains it. Useful to see where a topic lives before searching.
| Parameter | Type | Description |
|---|---|---|
category | string | Optional text filter on entry titles, case-insensitive: a category to expand (e.g. 'Linux Hardening', 'Pentesting Cloud') or a topic to list (e.g. 'Kerberos', 'AWS', 'GitHub Actions'). Omit for the ov… |
hacktricks_cloud_permissions Check Cloud Permissions
Check cloud permissions against HackTricks Cloud. Give the permissions a principal holds and get each one's rating (critical, high, medium, low) from the book's rated list, the combination rules they complete, and every escalation technique in the book's catalog whose required permissions are all held, with the page section that explains each. Use it for questions like 'is this permission dangerous?', 'what can I do with these permissions?' or 'which of these permissions should I remove?'. Resources, scopes and request conditions are not evaluated, so read a technique's conditions and its page…
| Parameter | Type | Description |
|---|---|---|
permissions * | array | The permissions held, as the cloud writes them: "iam:PassRole", "iam.serviceAccounts.actAs", "Microsoft.Authorization/roleAssignments/write", "Application.ReadWrite.All". Wildcards as in a policy ("ia… |
provider * | string | The cloud: "aws", "gcp", "azure" or "k8s" |
limit | integer | How many escalation techniques to list at most (default 20); the total is always reported |
payloads_topics Payload Collections Map
The map of two payload collections: Payloads All The Things, a topic per attack type with its pages and ready-made files (payload lists, bypass files, polyglots), and SecLists, wordlists and webshells by use, listed with their sizes and download links; a webshell is listed in both, never held as text. Read it once to see what exists; a filter word narrows it to the topics and folders whose name, description or file names contain it. It takes a word, not a question. Read a topic, folder or file with payloads_get.
| Parameter | Type | Description |
|---|---|---|
filter | string | Optional word that a topic's or folder's name, description or file names must contain, case-insensitive (e.g. 'upload', 'password', 'shell'). Omit for the whole map, about 16,000 characters. |
source | string | Collection: "payloads" for Payloads All The Things, "seclists" for SecLists. Only needed when both have what you pass. |
payloads_get Read a Payload Topic, Page or File
Read one thing of the payload collections by name or by path. A topic by name ('SQL Injection', 'upload', 'jwt') lists its pages, its files and the sections of its README; a folder of SecLists ('Passwords/Default-Credentials') lists its wordlists with sizes; a page is read whole, in one section or as its code blocks; a text file of Payloads All The Things (a bypass file, a payload list, a polyglot) comes back as written, ready to be saved under its name; a webshell or other server-side program (in either collection), a file antivirus software flags, a wordlist or a binary file comes back with…
| Parameter | Type | Description |
|---|---|---|
target * | string | A topic by name ("SQL Injection", "upload"), a folder ("Passwords/Default-Credentials", "Web-Shells"), a page ("SQL Injection/README.md") or a file ("Web-Shells/PHP/php-backdoor.php"), as the map and… |
codeOnly | boolean | For a page, or for a topic (its README): only the fenced code blocks (commands and payloads). |
offset | integer | Skip this many characters of a long text. A truncated response ends with the offset where the rest continues. |
outlineOnly | boolean | For a page, or for a topic (its README): the headings with the size of each section instead of the content. |
section | string | For a page, or for a topic (its README): the heading of the one section to read. A heading with exactly that text is preferred, else the first whose text contains it. |
source | string | Collection: "payloads" for Payloads All The Things, "seclists" for SecLists. Only needed when both have what you pass. |
payloads_search Search Payload Collections
Search the payload collections for terms: a technique, a word of a file name, a payload's fragment ('jwt alg none', 'upload bypass', 'onerror'). With match='exact' it finds text exactly as typed, in the case it is typed, and returns the lines ('alg": "none', '<?php system'). It takes terms, not a question: name the technique or the words. When you know the topic, payloads_get reads it without searching.
| Parameter | Type | Description |
|---|---|---|
query * | string | Terms ('jwt alg none', 'htaccess'), or with match='exact' the text as typed ('alg": "none', '<%= system(') |
extension | string | Only files with this ending, with or without the dot (e.g. 'php', '.htaccess', 'txt') |
limit | integer | Max results (default 10) |
match | string | 'terms' ranks pages and files by the terms; 'exact' finds the text as typed and returns its lines. |
source | string | Collection: "payloads" for Payloads All The Things, "seclists" for SecLists. Only needed when both have what you pass. |
internal_get Read an Internal All The Things Page
Read a cheatsheet or playbook of Internal All The Things by its name: 'reverse shell', 'amsi bypass', 'ESC8', 'S3 buckets', 'Cobalt Strike', 'MSSQL command execution', 'GitHub Actions'. The name of a folder or an area ('aws', 'azure', 'evasion', 'cloud') lists its pages; no target returns the map of the collection (shells, PowerShell, Mimikatz, Active Directory with the certificate attacks ESC1 to ESC15, AWS and Azure checklists, C2 frameworks, red team access, evasion, persistence, CI/CD attacks). A page is read whole, as its outline, in one section or as its code blocks. A name that several…
| Parameter | Type | Description |
|---|---|---|
codeOnly | boolean | For a page: only the code blocks (commands and payloads). |
offset | integer | Skip this many characters of a long page. A truncated response ends with the offset where the rest continues. |
outlineOnly | boolean | For a page: the headings with the size of each section instead of the content. |
section | string | For a page: the heading of the one section to read. A heading with exactly that text is preferred, else the first whose text contains it. |
target | string | A page by its title ("Windows - AMSI Bypass", "Reverse Shell Cheat Sheet") or by words its title has ("reverse shell", "esc8"); a folder ("cloud/aws", "redteam/evasion") or an area ("active-directory"… |
internal_search Search Internal All The Things
Search the cheatsheets and playbooks of Internal All The Things for terms ('kerberoast', 'ntlm relay', 'amsi patch', 's3 bucket policy'). With match='exact' it finds text exactly as typed, in the case it is typed, and returns its lines. It takes terms, not a question. When the page's title is known, internal_get reads it without searching.
| Parameter | Type | Description |
|---|---|---|
query * | string | Terms ('pass the hash', 'applocker bypass'), or with match='exact' the text as typed ('AmsiScanBuffer') |
limit | integer | Max results (default 10) |
match | string | 'terms' ranks the pages by relevance; 'exact' finds the text as typed and returns its lines. |