Convert Figma logo to code with AI

lgandx logoPCredz

This tool extracts Credit card numbers, NTLM(DCE-RPC, HTTP, SQL, LDAP, etc), Kerberos (AS-REQ Pre-Auth etype 23), HTTP Basic, SNMP, POP, SMTP, FTP, IMAP, etc from a pcap file or from a live interface.

1,967
399
1,967
7

Top Related Projects

3,554

Framework for Man-In-The-Middle attacks

10,590

Standalone man-in-the-middle attack framework used for phishing login credentials along with session cookies, allowing for the bypass of 2-factor authentication

A tool for exploiting Moxie Marlinspike's SSL "stripping" attack.

16,239

The Swiss Army knife for 802.11, BLE, HID, CAN-bus, IPv4 and IPv6 networks reconnaissance and MITM attacks.

The Social-Engineer Toolkit (SET) repository from TrustedSec - All new versions of SET will be deployed here.

Quick Overview

PCredz is a network packet sniffer and credential extraction tool designed to capture and analyze network traffic for sensitive information. It focuses on extracting credentials from various protocols and services, including HTTP, SMTP, POP3, IMAP, Telnet, and more.

Pros

  • Supports a wide range of protocols and services for credential extraction
  • Can be used with live network traffic or PCAP files
  • Lightweight and easy to use
  • Actively maintained and updated

Cons

  • Potential for misuse in unauthorized network monitoring
  • May trigger antivirus or intrusion detection systems
  • Requires root/administrator privileges to capture live network traffic
  • Limited documentation for advanced usage scenarios

Code Examples

# Example 1: Sniffing live network traffic
sudo python3 Pcredz -i eth0
# Example 2: Analyzing a PCAP file
python3 Pcredz -f /path/to/capture.pcap
# Example 3: Filtering specific protocols
python3 Pcredz -i eth0 -v -t http,ftp

Getting Started

  1. Clone the repository:

    git clone https://github.com/lgandx/PCredz.git
    
  2. Install dependencies:

    cd PCredz
    pip3 install -r requirements.txt
    
  3. Run PCredz (requires root/administrator privileges):

    sudo python3 Pcredz -i <interface_name>
    

Replace <interface_name> with the name of your network interface (e.g., eth0, wlan0).

Competitor Comparisons

3,554

Framework for Man-In-The-Middle attacks

Pros of MITMf

  • More comprehensive feature set, including multiple attack modules
  • Active development and community support
  • Extensible plugin architecture for custom modules

Cons of MITMf

  • More complex setup and configuration
  • Potentially overwhelming for beginners
  • Larger codebase, which may impact performance on resource-constrained systems

Code Comparison

MITMf:

from core.sslstrip.DnsCache import DnsCache
from core.sslstrip.URLMonitor import URLMonitor
from core.utils import *

class Plugin(Plugin):
    name = "SSLstrip+"
    optname = "sslstrip"
    implements = ["handleRequest", "handleResponse", "handleHeader"]

PCredz:

def start_sniffer():
    if args.interface:
        sniff(iface=args.interface, prn=pkt_parser, store=0)
    else:
        sniff(prn=pkt_parser, store=0)

def pkt_parser(pkt):
    if pkt.haslayer(TCP) and pkt.haslayer(Raw) and pkt.haslayer(IP):
        parse_pkt(pkt)

MITMf offers a more structured plugin-based approach, while PCredz focuses on a simpler packet sniffing implementation. MITMf's code demonstrates its extensibility, whereas PCredz showcases a more straightforward packet parsing method.

10,590

Standalone man-in-the-middle attack framework used for phishing login credentials along with session cookies, allowing for the bypass of 2-factor authentication

Pros of evilginx2

  • More advanced phishing capabilities with real-time session hijacking
  • Supports multiple target websites and custom phishing templates
  • Active development and regular updates

Cons of evilginx2

  • Steeper learning curve and more complex setup
  • Requires more resources to run effectively
  • May be considered more invasive and potentially illegal in some jurisdictions

Code Comparison

PCredz (Python):

def parse_pcap(pcap_file):
    try:
        a = rdpcap(pcap_file)
        sessions = a.sessions()
        for session in sessions:
            for packet in sessions[session]:
                try:
                    if packet.haslayer(TCP) and packet.haslayer(Raw):
                        packet_data = packet[Raw].load

evilginx2 (Go):

func (p *HttpProxy) handleClient(client net.Conn) {
    defer client.Close()
    ctx := &Context{
        Params:   make(map[string]string),
        Cookies:  make(map[string]*http.Cookie),
        UserAgent: "",
    }
    p.httpredir.HandleClientRequest(client, ctx)

Both tools are used for credential harvesting, but evilginx2 offers more sophisticated phishing capabilities at the cost of increased complexity. PCredz focuses on passive network sniffing, while evilginx2 actively manipulates traffic for real-time session hijacking.

A tool for exploiting Moxie Marlinspike's SSL "stripping" attack.

Pros of sslstrip

  • Focuses specifically on SSL/TLS stripping attacks
  • Lightweight and easy to use
  • Well-established tool with a long history in the security community

Cons of sslstrip

  • Less actively maintained compared to PCredz
  • More limited in scope, focusing only on SSL/TLS stripping
  • May not capture as wide a range of credentials as PCredz

Code Comparison

sslstrip:

def handleRequest(self, request):
    logging.debug("Handling request: %s" % request)
    client = self.getClientIP(request)
    self.stripSSL(request)

PCredz:

def start(self):
    self.start_sniffer()
    self.parse_pcap()
    self.print_credentials()

Key Differences

PCredz is a more comprehensive tool for capturing various types of credentials from network traffic, while sslstrip focuses specifically on SSL/TLS stripping attacks. PCredz is more actively maintained and updated, offering broader functionality for credential harvesting across different protocols. sslstrip, while more specialized, remains a popular choice for its specific use case in SSL/TLS attacks.

Both tools serve different purposes within the realm of network security testing and should be chosen based on the specific requirements of the task at hand. PCredz is better suited for general credential capturing, while sslstrip excels in scenarios where SSL/TLS stripping is the primary objective.

16,239

The Swiss Army knife for 802.11, BLE, HID, CAN-bus, IPv4 and IPv6 networks reconnaissance and MITM attacks.

Pros of Bettercap

  • More comprehensive network attack and monitoring tool
  • Actively maintained with frequent updates
  • Supports a wider range of protocols and attack vectors

Cons of Bettercap

  • Steeper learning curve due to more complex features
  • Requires more system resources to run effectively
  • May be overkill for simple credential sniffing tasks

Code Comparison

PCredz (Python):

def parse_pcap(pcap_file):
    try:
        a = rdpcap(pcap_file)
        sessions = a.sessions()
        for session in sessions:
            for packet in sessions[session]:
                # Packet processing logic

Bettercap (Go):

func (mod *HttpProxy) onPacket(pkt gopacket.Packet) {
    if mod.isHTTPRequest(pkt) {
        req := mod.parseRequest(pkt)
        if req != nil {
            // Request processing logic

Both tools process network packets, but Bettercap's implementation is more modular and type-safe due to Go's strong typing. PCredz focuses specifically on credential extraction, while Bettercap offers a broader range of network manipulation capabilities.

The Social-Engineer Toolkit (SET) repository from TrustedSec - All new versions of SET will be deployed here.

Pros of Social-Engineer Toolkit

  • Comprehensive suite of social engineering tools
  • User-friendly interface with menu-driven options
  • Regularly updated with new features and attack vectors

Cons of Social-Engineer Toolkit

  • Larger footprint and more complex setup
  • Requires more system resources
  • Steeper learning curve for beginners

Code Comparison

Social-Engineer Toolkit:

# Example of a phishing attack setup
choice = input("Select attack vector: ")
if choice == "1":
    site = input("Enter site to clone: ")
    clone_site(site)

PCredz:

# Example of credential extraction
for pkt in packets:
    if pkt.haslayer(TCP) and pkt.haslayer(Raw):
        process_packet(pkt)

Key Differences

  • PCredz focuses specifically on credential extraction from network traffic
  • Social-Engineer Toolkit offers a broader range of social engineering attacks
  • PCredz is more lightweight and easier to integrate into existing workflows
  • Social-Engineer Toolkit provides a more guided experience for less experienced users

Both tools serve different purposes within the realm of security testing and should be chosen based on the specific requirements of the task at hand.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

PCredz

This tool extracts Credit card numbers, NTLM(DCE-RPC, HTTP, SQL, LDAP, etc), Kerberos (AS-REQ Pre-Auth etype 23), HTTP Basic, SNMP, POP, SMTP, FTP, IMAP, etc from a pcap file or from a live interface.

Features

  • Extract from a pcap file or from a live interface IPv4 and IPv6:

    • Credit card numbers
    • POP
    • SMTP
    • IMAP
    • SNMP community string
    • FTP
    • HTTP (NTLM/Basic/HTTP Forms)
    • NTLMv1/v2 (DCE-RPC,SMBv1/2,LDAP, MSSQL, HTTP, etc)
    • Kerberos (AS-REQ Pre-Auth etype 23) hashes.
  • All hashes are displayed in a hashcat format (use -m 7500 for kerberos, -m 5500 for NTLMv1, -m 5600 for NTLMv2).

  • Log all credentials and information to a file (CredentialDump-Session.log).

  • Log credentials in the logs/ folder. MSKerb.txt, NTLMv1.txt and NTLMv2.txt can be directly fed to hashcat.

Install

Docker

Install docker and clone the repo

Build the container

$ docker build . -t pcredz

Then use the command below to map the current working directory inside the Pcredz container. This is useful for moving .pcap files to parse or for retrieving log files from a live capture.

$ docker run --net=host -v $(pwd):/opt/Pcredz -it pcredz

Linux

On a debian based OS bash:

apt install python3-pip && sudo apt-get install libpcap-dev && pip3 install Cython && pip3 install python-libpcap

Usage

# extract credentials from a pcap file
python3 ./Pcredz -f file-to-parse.pcap

# extract credentials from all pcap files in a folder
python3 ./Pcredz -d /tmp/pcap-directory-to-parse/

# extract credentials from a live packet capture on a network interface (need root privileges)
python3 ./Pcredz -i eth0 -v

Options

  -h, --help          show this help message and exit
  -f capture.pcap     Pcap file to parse
  -d /home/pnt/pcap/  Pcap directory to parse recursivly
  -i eth0             interface for live capture
  -v                  More verbose.
  -o output_dir       Store log files in output_dir instead of the directory containing Pcredz.