NetbiosSpoof (version 1.1.0)
index
netbiosspoof.py

This package implements a Hostname Spoofer (Netbios, LLMNR and Local DNS).
 
>>> from scapy.all import conf
>>> spoofer = NetbiosSpoof()
>>> spoofer.start(True)
>>> spoofer.stop()
>>> spoofer = NetbiosSpoof(conf.iface)
 
~# python3 NetbiosSpoof.py
[22/06/2022 06:19:32] WARNING  (30) {__main__ - NetbiosSpoof.py:451} The netbios spoofer starts up...
[22/06/2022 06:19:32] CRITICAL (50) {__main__ - NetbiosSpoof.py:470} The netbios spoofer is stopped.
~# python3 NetbiosSpoof.py -v -i 172.17.0.
[22/06/2022 06:19:32] DEBUG    (10) {__main__ - NetbiosSpoof.py:497} Logging is configured.
[22/06/2022 06:19:32] DEBUG    (10) {__main__ - NetbiosSpoof.py:141} Start network interface detection...
[22/06/2022 06:19:32] INFO     (20) {__main__ - NetbiosSpoof.py:150} Interface argument match with (172.17.0.2 89:3c:10:40:61:b1 WIFI)
[22/06/2022 06:19:32] DEBUG    (10) {__main__ - NetbiosSpoof.py:157} Use network interface WIFI
[22/06/2022 06:19:32] WARNING  (30) {__main__ - NetbiosSpoof.py:451} The netbios spoofer starts up...
[22/06/2022 06:19:32] INFO     (20) {__main__ - NetbiosSpoof.py:430} Protocol DNS, spoof b'kali.local.' for 172.17.0.3
[22/06/2022 06:19:32] CRITICAL (50) {__main__ - NetbiosSpoof.py:470} The netbios spoofer is stopped.

 
Classes
       
builtins.object
NetbiosSpoof

 
class NetbiosSpoof(builtins.object)
    NetbiosSpoof(interface: scapy.interfaces.NetworkInterface = <NetworkInterface_Win Intel(R) Dual Band Wireless-AC 8265 [UP+RUNNING+WIRELESS+OK]>)
 
This class implements a netbios spoofer.
 
  Methods defined here:
__init__(self, interface: scapy.interfaces.NetworkInterface = <NetworkInterface_Win Intel(R) Dual Band Wireless-AC 8265 [UP+RUNNING+WIRELESS+OK]>)
Initialize self.  See help(type(self)) for accurate signature.
craft_DNSv6_response(self, name: str) -> scapy.packet.Packet
This function crafts a IPv6-DNS response.
craft_LLMNR_IP(self, packet: scapy.packet.Packet) -> scapy.packet.Packet
This function craft an IP-LLMNR packet.
craft_LLMNR_IP_type_28(self, packet: scapy.packet.Packet) -> scapy.packet.Packet
This function craft an IP-LLMNR packet, type 28.
craft_LLMNR_IPv6(self, packet: scapy.packet.Packet) -> scapy.packet.Packet
This function craft an IPv6-LLMNR packet.
craft_LLMNR_IPv6_type_28(self, packet: scapy.packet.Packet) -> scapy.packet.Packet
This function craft an IPv6-LLMNR packet, type 28.
craft_MDNS_IP(self, packet: scapy.packet.Packet) -> scapy.packet.Packet
This function crafts a MDNS-IP packet.
craft_MDNS_IPv6(self, packet: scapy.packet.Packet) -> scapy.packet.Packet
This function crafts a MDNS-IPv6 packet.
craft_NBNS_response(self, packet: scapy.packet.Packet) -> scapy.packet.Packet
This function crafts the Netbios response.
detect_LLMNR_type(self, packet: scapy.packet.Packet) -> scapy.packet.Packet
This function detects the IP version and DNSQR
type to forge the LLMNR response.
detect_ip_version_DNS(self, packet: scapy.packet.Packet) -> scapy.packet.Packet
This function crafts the DNS response.
identify_packet(self, packet: scapy.packet.Packet) -> None
This function detects the request type and send the response.
start(self, asynchronous: bool = False) -> None
This function starts the netbios spoofer (and the network sniffer).
stop(self) -> None
This function stops the netbios spoofer (and the network sniffer).

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
Functions
       
main() -> int
This function starts the netbios spoofer from the command line.

 
Data
        __all__ = ['NetbiosSpoof', 'main']
__annotations__ = {'conf_iface': <class 'scapy.interfaces.NetworkInterface'>, 'logger': <class 'logging.Logger'>, 'logger_critical': <class 'collections.abc.Callable'>, 'logger_debug': <class 'collections.abc.Callable'>, 'logger_error': <class 'collections.abc.Callable'>, 'logger_info': <class 'collections.abc.Callable'>, 'logger_warning': <class 'collections.abc.Callable'>}
__author_email__ = 'mauricelambert434@gmail.com'
__copyright__ = '\nNetbiosSpoof Copyright (C) 2021 Maurice Lambe...ome to redistribute it\nunder certain conditions.\n'
__description__ = '\nThis package implements a Hostname Spoofer (Netbios, LLMNR and Local DNS).\n'
__license__ = 'GPL-3.0 License'
__maintainer__ = 'Maurice Lambert'
__maintainer_email__ = 'mauricelambert434@gmail.com'
__url__ = 'https://github.com/mauricelambert/NetbiosSpoof'

 
Author
        Maurice Lambert