Impacket is a collection of Python classes for working with network protocols. Impacket is focused on providing low-level programmatic access to the packets and for some protocols (e.g. SMB1-3 and MSRPC) the protocol implementation itself.
Questions tagged [impacket]
18 questions
8
votes
1 answer
Understanding smb and DCERPC for remote command execution capabilities
I'm trying to understand all the methods available to execute remote commands on Windows through the impacket scripts:
https://www.coresecurity.com/corelabs-research/open-source-tools/impacket
https://github.com/CoreSecurity/impacket
I understand…

user134167
- 195
- 3
- 9
4
votes
1 answer
Getting TCP packet payload from Python and impacket
I've been able to find packets of interest using code based on this example:
How can I filter a pcap file by specific protocol using python?
The next child from the TCP packet is the actual data:
if isinstance(child1, TCP):
if…

PeterM
- 2,534
- 6
- 31
- 38
3
votes
3 answers
Packet sniffer in python using pcapy impacket
I'm trying to create a packet sniffer using pcapy and impacket. I'm stuck with data extraction phase. Unfortunately impacket is not properly documented. At least i could n't find one. Could anyone tel me where to find the documentation or what…

AEla
- 173
- 2
- 2
- 9
2
votes
1 answer
'Cannot request session' when using impacket's SMB client against a Windows machine
i am running on fedora 15 ( python 2.7 )
i've tried the imapcket.smb against windows 2000 sp4 (frensh) , windows xp sp2 (frensh) , windows xp sp3 (frensh) and it worked perfectly , but when i use it against windows 7 (frensh) x64 it didn't work…

user987530
- 63
- 6
2
votes
0 answers
Error with the Zerologon POC on Samba AC DC
I have a school projet that require me to emulate the CVE-2020-1472 (Zerologon) on a local environment.
I am currently trying to test following github script but I am facing some issue that I haven't been able to solve since then.
To sumerize, I…

krasseu
- 21
- 3
2
votes
1 answer
Changing the packet data with pcapy/impacket
I'm writing a small program in Python on Linux that will intercept packets flying over the wire on specific port from host A to host B. Host C will act as a man in the middle so all traffic will be going through host C (arp poisoning method). I've…

rapid
- 157
- 3
- 9
1
vote
1 answer
No module named impacket
I have installed impacket and its requirements on windows, but when I want to execute a python file (in my case send_and_execute.py 192.168.x.x sample.exe), the message:
File ..., line 2, in
From impacket import smb, smbconnection…

sh.sagheb
- 27
- 1
- 1
- 7
1
vote
0 answers
Struggling with impacket installation
I'm trying to install impacket and it always give me an error. My pip and python version is same (Python 2.7.18 and pip 20.3.4 from /usr/local/lib/python2.7/dist-packages/pip (python 2.7)).
I checked into my repository and impacket already installed…

lateicelatte
- 11
- 1
1
vote
0 answers
SMB session setup failed: NT_STATUS_LOGON_FAILURE
I'm setting a mini Windows AD.
My setup is a Windows Domain (2019), a W10 Client and a Linux Machine
When I am accessing the C$ of the W10 client with smbclient as any user (even Administrator from AD), I have the following error:
session setup…

HardlyADave
- 11
- 2
1
vote
1 answer
Script for Sambacry exploit encountered bug
I am doing a small school cybersec project, there is one small bug with my Python (with Impacket library: transport module for RPC) script. It is a very simple script and payload can be found on GitHub for your…

Leo Jungleboy
- 21
- 2
1
vote
4 answers
IPv6 decoder for pcapy/impacket
I use the pcapy/impacket library to decode network packets in Python. It has an IP decoder which knows about the syntax of IPv4 packets but apparently no IPv6 decoder.
Does anyone get one?
In a private correspondance, the Impacket maintainers say…

bortzmeyer
- 34,164
- 12
- 67
- 91
1
vote
1 answer
"cannot import name smbserver" when using impacket with smbrelayx.py
I know this is not an actual info-sec question, but I am having problems with getting the smbrealyx.py module to work. For some reason I get the following error when I try to execute the aforementioned python program.
Traceback (most recent call…

JohnnyHunter
- 390
- 1
- 3
- 16
0
votes
0 answers
SMB2 TREE_CONNECT response MaximalAccess: file or directory access mask?
I have hacked impacket a bit to provide access to the MaximalAccess field in the SMB2 TREE_CONNECT Response. However, I am wondering how to interpret this field. The docs say
Contains the maximal access for the user that establishes the tree…

Diederick C. Niehorster
- 839
- 6
- 26
0
votes
1 answer
Issue with impacket & python
Hi there boys and girls,
I am trying to run a script written in python and the console is telling me this:
Install the following library to make this script work
Impacket : https://github.com/CoreSecurity/impacket.git
PyCrypto :…

Neusier
- 1
- 1
- 1
0
votes
0 answers
Sending a ICMPv6 Packet with VLAN while using Impacket
Hey guys I am quite a bind I have this function
def send_ra_packet(self,source_link_layer, send_frequency,vlan_id = 0):
ip = IP6.IP6()
ip.set_source_address(self.get_source_address())
…

Franz Justin Buenaventura
- 366
- 3
- 20