LABREA(1)
β¨ LABREA(1) β General Commands Manual β¨
NAME
labrea β Honeypot for incoming IP connection attempts π―πͺ€
SYNOPSIS
labrea [-i --device INTERFACE] [-n --network nnn.nnn.nnn.nnn[/nn]] [-m
--mask nnn.nnn.nnn.nnn] [-t --throttle-size BYTES] [-p --max-rate RATE ]
[-R --soft-restart] [-r --arp-timeout RATE] [-s --switch-safe] [-h
--hard-capture] [-x --disable-capture] [-X --exclude-resolvable-ips] [-P
--persist-mode-only] [-a --no-resp-synack] [-H --auto-hard-capture] [-f
--no-resp-excluded-ports] [--no-arp-sweep] [--init-file FILE] [-F
--bpf-file FILE] [-T --dry-run] [-d --foreground] [-o --log-to-stdout]
[-O --log-timestamp-epoch] [-l --log-to-syslog] [-b --log-bandwidth] [-v
--verbose] [-q --quiet] [-z --no-nag] [-? --usage --help ] [-V
--version] [-I --ip-addr nnn.nnn.nnn.nnn] [-E --my-mac-addr
xx:xx:xx:xx:xx:xx] [-D --list-interfaces] [-j --winpcap-dev nn]
[--syslog-server nnn.nnn.nnn.nnn] [--syslog-port nnn]
[BPF Filter]
DESCRIPTION
okay so labrea is out here creating virtual machines for unused IP addresses in the specified block of IP addresses. LaBrea just sits there, listening for ARP "who-has" requests like π.
When an ARP request for a particular IP goes unanswered for longer than its "rate" setting β default: 3 seconds β labrea crafts an ARP reply that routes all traffic destined for the IP to a "bogus" MAC address. Then labrea sniffs for TCP/IP traffic sent to that MAC address and responds to any SYN packet with a SYN/ACK packet that it creates. it's giving fake host, real chaos π
.
OPTIONS
labrea accepts the following options:
-i,--deviceINTERFACE β Default vibe:labreauses the first ethernet interface. This forceslabreato use the specified interface. pick your NIC, bestie π«Ά-n,--networkxxx.xxx.xxx.xxx[/nn] βlabreanormally pulls information about the netblock from the IP information assigned to the interface. Iflabreais run on an unconfigured interface (one without an assigned IP address), then use this option to specify the subnet to be captured.xxx.xxx.xxx.xxxis the network address./nnis the subnet mask in CIDR notation. If the subnet mask is not specified here, then you must include the-mparameter. no skips π¨-m,--maskxxx.xxx.xxx.xxx β Another way to specify the network mask for the capture netblock. If this parameter is specified, then the-nparameter must also be specified. they're a package deal π-t,--throttle-sizenn β Sets the TCP window advertisement to limit the amount of data sent tolabrea. The number of data bytes to allow per packet isnnbytes. tiny window, big mood πͺ-p,--max-raterate β Connect attempts will be permanently captured by forcing the connection into a"persist"state (by closing the TCP window). In this state, the connection will not time out.labreawill permanently capture connect attempts up to maximum bandwidthratebytes. If the specified bandwidth is exceeded,labreawill still tarpit the incoming connection (ie respond SYN/ACK to incoming SYN). it's still annoying, just not in persist mode π-R,--soft-restartβ New captures will be held off for5 minutesto let bandwidth calculations progress. If a major scan hits just after startup, this preventslabreafrom capturing too many connections. self-care for your tarpit π§-r,--arp-timeoutrate β Waitrateseconds after seeing incoming arp requests before capturing an IP address. patience is a virtue β³-s,--switch-safeβ When there is an incoming ARP request, specifies thatlabreashould send out an ARP request of its own for the same IP address. This is necessary for safe operation in a switched environment where one host does not necessarily see all the traffic on the switch. switch-safe, no cap π‘οΈ-h,--hard-captureβ Once an IP address has been captured, then do not wait for a"-r"timeout for the next incoming ARP request. hard capture, no chill π¨-x,--disable-captureβ Do not capture IPs. just vibes, no tarpit π«-X,--exclude-resolvable-ipsβ On startup, attempt DNS resolution on all IPs within the capture netblock. Automatically exclude any IP that has a corresponding entry in the DNS. Be careful because this can generate a lot of DNS lookups if the capture subnet is large. your resolver will be sweating π-P,--persist-mode-onlyβ Try to limit bandwidth use by doing only persist capturing. Note: This parameter has limited usefulness since below max b/w, the same exchange that leads to persist capture also has the side effect of tarpitting. so likeβ¦ it's a vibe, but a niche one π«-a,--no-resp-synackβ By default, the LaBrea virtual hosts respond to SYN/ACK with RST, and answer Pings. Disables this behaviour. no more replies, ghost mode π»-H,--auto-hard-captureβ Mark all non-excluded and all non-hardexcluded IPs as being hard captured. Seelabrea.conf(5)for more information. This parameter should be used with caution. β οΈ-f,--no-resp-excluded-portsβ Drop incoming connections to excluded ports. Normal default behaviour is to return a RST. Makes nmap-style scanning go much slower. eat that, scanners π½οΈ--no-arp-sweepβ On startup,labreasweeps the capture subnet with bursts of ARP requests in an attempt to locate all live machines. This parameter disables the sweep. no sweep, just quiet π€«--init-filefile β Read the configuration from the specifiedfileinstead of from the default location. custom config, custom vibe π-F,--bpf-filefile β Designates the name of afilecontaining a BPF filter pointing to machines/ports to be tarpitted. As with the command line BPF filter, these connections MUST be firewalled to DROP inbound traffic. MUST. firewalled. DROP. don't forget π¨-T,--dry-runβ Dolabreainitialization, including Dns excludes, parse of the configuration file, opening the network interface etc. Print diagnostic information, then exit. it's a dress rehearsal π-d,--foregroundβ Do not detach the process. (Unix systems only) stay in the foreground, main character π-o,--log-to-stdoutβ Send log information to stdout rather than to syslog. This option also implies and sets the-doption (i.e. do not detach process). logs on your screen, live πΊ-O,--log-timestamp-epochβ Same as the"-o"option, but with time output in seconds since epoch to make it easier for logfile analysis programs. nerdy timestamp slay π€-l,--log-to-syslogβ Send log messages to syslog. classic πͺ΅-b,--log-bandwidthβ Log a message every minute detailing the current bandwidth consumption of the-poption (persist capture). bandwidth receipts π-v,--verboseβ Increase the verbosity of log messages. Use twice for more effect. double it and give it to the next person π£οΈ-q,--quietβ Do not report arp requests for IPs that are not in the capture subnet. selective hearing π-z,--no-nagβ Turn off the nag message. Before you do this, read the basic warning in the Notes section just below. I'm not saying don't, I'm saying read π-?,--usage,--helpβ Print a help message and then exit. help me help you π-V,--versionβ Print version information and exit. who dis πͺͺ-I,--ip-addrnnn.nnn.nnn.nnn β Manually specify the IP address for thelabreaserver. set it yourself π―-E,--my-mac-addrxx:xx:xx:xx:xx:xx β Manually specify the MAC address of thelabreaserver's NIC. MAC address, but make it manual π·οΈ-D,--list-interfacesβ On Windows systems, print the list of WinPcap devices, followed by the list of the libdnet interfaces. Note that each API has a different nomenclature for the underlying NIC. Windows girlies, this one's for you πͺ-j,--winpcap-devnn β On windows systems, select thennth winpcap device in the list. pick your fighter π₯
also chilling in the synopsis, bestie: --syslog-server nnn.nnn.nnn.nnn and --syslog-port nnn. this part of the page doesn't give them a separate OPTIONS blurb π‘π
NOTES
Basic Warning about use of labrea
You must understand this: As a default, LaBrea captures IP addresses by creating a "virtual machine" that sits on any UNUSED IP address that it sees. labrea has been carefully written and tested to transparently and peacefully operate in normal production environments but ...
There is a potential for problems if someone decides to start using one of the IP addresses thatlabreahas laid claim to, or iflabreaerroneously decides that an IP address is free when in fact a real machine is already there. π¨
Built-in protections
labrea tries very hard to NEVER capture an IP that has a live machine sitting on it. it's not a villain, it's just a honeypot π«Ά
The following automatic mechanisms are provided:
- If
labreasees a gratuitous ARP signalling the arrival of a new machine, it marks the corresponding IP address as excluded. ("new kids on the block"logic) π§βπ€βπ§ - Each ARP response is noted and the corresponding IP address is marked as excluded. π
- At startup, a systematic sweep is done of the entire capture subnet (as long as the subnet is not too big). All IP addresses that respond are marked as excluded. π§Ή
Then there are ways of manually specifying the exclusion of certain addresses, and otherwise ensuring safe operation:
- The
EXCconfig stmt allows specified IP addresses to be manually excluded from capture. π« - The
IPIconfig stmt causes packets with the specified IP source address(es) to be ignored. π -s --switch-safeparameter causes mirroring of ARP requests in a switched environment. πͺ-X --exclude-resolvable-ipssays to exclude all IPs that have a correspondingDnsentry. π
Traffic rerouting: Despite all this, if labrea somehow receives traffic whose IP destination address belongs to a live machine, labrea will reroute that traffic to the real machine. π¦
Size of the capture subnet
It is best to limit the capture subnet to the actual physical segment (VLAN, hub) where labrea is running. keep it cute, keep it local π
In some configurations, where proxy arp is being used to determine routing, interface subnet masks can be quite large. (i.e. the "whole" network is "directly" attached to the physical segment).
In this case, if labrea picks up the subnet mask from the interface, then labrea will inefficiently watch addresses that it has no hope of capturing. You should use the -m / -n parameters to manually limit the size of the capture subnet. π―
Other usage notes
The labrea virtual machines use a bogus MAC address of 0:0:f:ff:ff:ff. iconic fake MAC π
On certain older Windows systems, it may be necessary to manually specify the capture subnet. πͺ
On unix systems, KILL -USR1 will toggle logging off on and off. π
On unix systems, KILL -HUP will cause labrea to reinitialize (and thus free captured IPs). β»οΈ
If the capture subnet is too large (greater than 1024 addresses), then labrea will not do an arp sweep. π«π§Ή
π BUGS π
okay bestie, nobody's perfect and labrea is literally no exception, so here's the tea π΅
- On some systems, if there is absolutely no traffic to sniff,
pcap_dispatchwill wait instead of timing out, making the program seem unresponsive. it's giving "ghosted" but for real, the program just sits there looking at you. Workaround: ping the labrea server to "wake" it up. yes bestie, a lil ping is the smelling salts π - If
--exclude-resolvable-ipsis enabled, and if the capture subnet is large (say class A/8), then a LOT of traffic will be generated to the Dns server. and when we say a LOT we mean A LOT β like, your DNS server is gonna feel so perceived π plan accordingly, no cap.
β¨ EXAMPLES β¨
here's where it gets fun, bestie. real commands, real vibes, copy-paste away π«Ά
- Run safely in a switched environment with very verbose logging. Don't respond to excluded ports. Log bandwidth usage from persist capturing. Exclude all IPs that are in the Dns. Run in the foreground, and log to stdout. Maximum capture bandwidth is 2 MB/sec. Use
toto.confas the initialisation file. Use network device"eth1"instead of the default device. Do a test run only β parse input, initialize, then exit.
labrea --switch-safe --verbose -v --no-resp-excluded-ports
--log-bandwidth --exclude-resolvable-ips --foreground
--log-to-stdout --max-rate 2000000 --init-file toto.conf
--device eth1 -z --dry-run
(one line)
it's one line in real life, the wrapping is just the terminal being dramatic β¨
- Same thing with the short parameter style.
labrea -z -s -v -v -f -b -X -d -o -p 2000000
--init-file toto.conf -i eth1 -T
(one line)
yep, also one line. short flags ate and left no crumbs π
π FILES π
/usr/local/etc/labrea.confβ Default configuration file πΈ/usr/local/sbin/labreaβ Program π
π¦ SEE ALSO π¦
labrea.conf(5)β go read it, bestie, it's the whole other half of the lore π
π AUTHOR π
Tom Liston <tliston@hackbusters.net> Bugs: lorgor@users.sourceforge.net or http://labrea.sourceforge.net
give the man his flowers, he built the thing π and if you find a bug, you know exactly where to send it π
and that's a wrap on the LABREA(1) page, bestie β this whole thing lives under the LABREA(1) footer, so go forth, sniff responsibly, and stay iconic ππβ¨
π¦ where this page comes from
- ubuntu jammy: labrea 2.5-stable-3.1
- Copyright (c) 2002 Tom Liston <tliston@premmag.com>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms