Skip to main content

Application server penetration testing tool (Penterep tool)

Project description

penterepTools

PTSRVTESTER - Server Penetration Testing Tool

Installation

pip install ptsrvtester

Adding to PATH

If you're unable to invoke the script from your terminal, it's likely because it's not included in your PATH. You can resolve this issue by executing the following commands, depending on the shell you're using:

For Bash Users

echo "export PATH=\"`python3 -m site --user-base`/bin:\$PATH\"" >> ~/.bashrc
source ~/.bashrc

For ZSH Users

echo "export PATH=\"`python3 -m site --user-base`/bin:\$PATH\"" >> ~/.zshrc
source ~/.zshrc

Usage examples

ptsrvtester snmp detection --ip 192.168.1.1
ptsrvtester dns whois -d example.com
ptsrvtester ldap banner -ip 192.168.1.1
ptsrvtester dhcp info --interface eth0
ptsrvtester xrdp bruteforce --target 192.168.1.1 --username admin --wordlist passwords.txt
ptsrvtester smtp --spoof-headers -r victim@example.com -u user -p pass smtp.example.com:587
ptsrvtester smtp --bcc-test -r to@example.com --cc cc@example.com --bcc bcc@example.com smtp.example.com:25
ptsrvtester smtp -al -r admin@example.com smtp.example.com:25
ptsrvtester smtp -id mail.example.com:25
ptsrvtester smtp -id --id-aggressive smtp.example.com:25
ptsrvtester <module> -h     for help for module use

Available Modules:

   <module>                     Select module to use
                         snmp   SNMP testing module
                         dns    DNS testing module
                         ldap   LDAP testing module
                         msrpc  MSRPC testing module
                         ftp    FTP testing module
                         ssh    SSH testing module
                         smtp   SMTP testing module
                         pop3   POP3 testing module
                         imap   IMAP testing module
                         dhcp   DHCP testing module
                         xrdp   XRDP testing module

   -v        --version          Show script version and exit
   -h        --help             Show this help message and exit
   -j        --json             Output in JSON format
             --debug            Enable debug messages

Module Descriptions:

SNMP Module

  • Version detection (SNMPv1, SNMPv2c, SNMPv3)
  • SNMPv2 community string brute-force
  • SNMPv3 user enumeration and credential brute-force
  • Write permission testing
  • MIB walking (SNMPv2/SNMPv3)

DNS Module

  • DNS server information retrieval
  • Reverse DNS lookup
  • Zone transfer attempts
  • DNS record lookup
  • WHOIS queries
  • Subdomain brute-forcing
  • DNSSEC verification
  • Zone walking (NSEC/NSEC3)

LDAP Module

  • Server banner retrieval
  • LDAP search queries
  • User enumeration
  • Credential brute-force
  • Write permission testing

MSRPC Module

  • Endpoint mapper enumeration
  • MGMT interface enumeration
  • Named pipe brute-force
  • SMB/TCP/HTTP credential brute-force
  • Anonymous SMB access testing
  • Named pipe enumeration

FTP Module

  • Banner and Service Identification
  • Anonymous authentication testing
  • Known-account login or credential brute-force
  • Read/write access testing
  • Path enumeration
  • Data mode test
  • Active mode policy audit
  • Command surface audit
  • Invalid-command resilience
  • Username enumeration
  • Bounce attack testing

SSH Module

  • Banner, Service Identification and host key retrieval
  • Authentication method detection
  • Bad public key detection
  • SSH audit (CVE identification)
  • Credential and private key brute-force

SMTP Module

  • Banner and Service Identification
  • Server identification
  • Server information gathering
  • Encryption testing (plaintext, STARTTLS, TLS); port 465 implicit TLS
  • User enumeration (VRFY, EXPN, RCPT)
  • AUTH user enumeration (LOGIN/NTLM)
  • HELO/EHLO hostname validation
  • AUTH downgrade test
  • Invalid/non-standard SMTP commands
  • HELO-only test
  • HELO/EHLO bypass test
  • Bounce replay / backscatter test
  • Mail bomb / rate limiting test
  • Antivirus/antispam protection test
  • SSRF test
  • Queue flood, SIZE extension test
  • Zip Bomb, Billion Laughs, XXE in attachments test
  • Spoof headers test
  • BCC disclosure test
  • Alias & addressing bypass test
  • NTLM information disclosure
  • Open relay testing
  • Catch-all mailbox detection
  • RCPT TO limit test
  • Credential brute-force
  • Blacklist testing

POP3 Module

  • Banner, Service Identification and capabilities retrieval
  • Help/Implementation info disclosure test (HELP command, IMPLEMENTATION from CAPA)
  • Encryption testing (plaintext, STLS, TLS); port 995 implicit TLS
  • Anonymous authentication testing
  • NTLM authentication inspection
  • Credential brute-force

IMAP Module

  • Banner, Service Identification and capabilities retrieval
  • Anonymous authentication testing
  • NTLM authentication inspection
  • Credential brute-force

DHCP Module

  • DHCP server information retrieval
  • DHCP starvation attack testing
  • DHCP DoS/flood attack testing
  • Network interface based testing

XRDP Module

  • XRDP server brute-force testing
  • Credential testing via GUI automation
  • Multi-threaded password testing
  • CVE-2024-39917 exploitation (no rate limiting)
  • Requires Linux with Xorg, xfreerdp3, and wmctrl

## Dependencies

cryptography>=42.0.8 dnspython>=2.7.0 impacket>=0.12.0 ldap3>=2.9.1 ptlibs>=1.0.20,<2 pysnmp>=7.1.20 python-whois>=0.9.5 paramiko>=4.0.0 beautifulsoup4>=4.14.0 httpx>=0.28.0 h2>=4.3.0 lxml>=6.0.0 ssh_audit>=3.3.0 ntlm-auth>=1.5.0 scapy>=2.6.1 dhcppython>=0.1.4 pillow>=12.0.0 python-xlib>=0.33 pynput>=1.8.0 XWindows>=0.0.7


### Additional System Requirements

For DHCP module:
- Root/sudo privileges (for network packet manipulation)

For XRDP module:
- Linux with Xorg (not Wayland)
- `xfreerdp3` command available
- `wmctrl` command available
- Disable screen saver/lock during use


## License

Copyright (c) 2024 Penterep Security s.r.o.

ptsrvtester is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

ptsrvtester is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with ptsrvtester. If not, see https://www.gnu.org/licenses/.

## Warning

You are only allowed to run the tool against the servers and systems which
you have been given permission to pentest. We do not accept any
responsibility for any damage/harm that this application causes to your
computer, or your network. Penterep is not responsible for any illegal
or malicious use of this code. Be Ethical!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ptsrvtester-1.1.0.tar.gz (271.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ptsrvtester-1.1.0-py3-none-any.whl (287.5 kB view details)

Uploaded Python 3

File details

Details for the file ptsrvtester-1.1.0.tar.gz.

File metadata

  • Download URL: ptsrvtester-1.1.0.tar.gz
  • Upload date:
  • Size: 271.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for ptsrvtester-1.1.0.tar.gz
Algorithm Hash digest
SHA256 bc039b7160b8191da4818611625f4f62a919c5918a04429f8cdb3d7e55de93a8
MD5 7d35ec5df48f42810924ebb92dc4c621
BLAKE2b-256 9d2de2e3b6792e3e9ab6ae821262906fc699f3de6585604238c435edce08e441

See more details on using hashes here.

File details

Details for the file ptsrvtester-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: ptsrvtester-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 287.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for ptsrvtester-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9e22268c7555f507002b41f59effbc05474ddfed56081c188049a7bc819b132e
MD5 0361b6c865a6ef1f10bd9d6234da9e36
BLAKE2b-256 fc20ee6aca5fdf37486fbbfb7c7c2ce07c31cf3be735748ed48e6bcd9609d4c0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page