Cheatsheet
  • Documentation
  • Nmap
  • Ffuf
  • FTP
  • SMB
  • RPC
  • NFS
  • DNS
  • SMTP
  • IMAP / POP3
  • SNMP
  • SQL
  • Rsync
  • Certipy
  • CrackMapExec
  • Transferring Files
  • Windows Remote Management
  • Windows AV
  • Wordpress
  • Infrastructure Enumeration
  • Privilege Escalation
  • Docker Breakout
  • Shells
  • SSTI
  • XSS
  • Pivot
    • SSH Tunneling
    • Chisel
    • Ligolo-ng
    • Meterpreter
  • LDAP
  • Spray
  • Antivirus / EDR
  • Impacket
  • Bloodhound
  • Powershell
  • Kerberosting
  • Password Attacks
  • Command Injections
  • Sliver C2
  • Windows credentials
  • Windows persistance
  • VSCode Debug
Powered by GitBook
On this page
  • Flask application
  • NodeJS application

VSCode Debug

Flask application

Install debugpy in your Dockerfile

RUN pip install debugpy

Run the debug server

python3 -m debugpy --listen 0.0.0.0:5679 run.py

Expose debug port

docker run -p 1337:1337 -p 5679:5679 --rm --name=cop -it cop

launch.json (.vscode)

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Python: Attach to Container",
            "type": "python",
            "request": "attach",
            "connect": {
                "host": "localhost",
                "port": 5679
            },
            "pathMappings": [
                {
                    "localRoot": "${workspaceFolder}/challenge",
                    "remoteRoot": "/app"
                }
            ]
        }
    ]
}

NodeJS application

Run with debug server

node --inspect=0.0.0.0:9229 app.js

Expose debug port

docker run -p 1337:80 -p 9229:9229 -it --name=web_easterbunny web_easterbunny

launch.json (.vscode)

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Attach to Node",
            "type": "node",
            "request": "attach",
            "port": 9229,
            "address": "localhost",
            "localRoot": "${workspaceFolder}/challenge",
            "remoteRoot": "/app",
            "protocol": "inspector"
        }
    ]
}
PreviousWindows persistance

Last updated 1 year ago