Forum Replies Created
- AuthorPosts
- Jamal RelefordParticipant
Thanks for your continued help, Diego. It seems now I’m getting the following error around the Raw field (see message below). I’ve also attached my code as it’s been written exactly as Zaid or so I thought when I checked it again.
[+] HTTP Request >> http://www.bing.com/fd/ls/l?IG=0F644CBDB97F475084D8232545A7016D&Type=Event.ClientInst&DATA=%5B{%22T%22:%22CI.ReturnTop%22,%22FID%22:%22CI%22,%22Name%22:%22ReturnTop60%22,%22Text%22:%22Triggered%22}]
Traceback (most recent call last):
File “/root/PycharmProjects/packet_sniffer/packet_sniffer.py”, line 28, in <module>
sniff(“eth0”)
File “/root/PycharmProjects/packet_sniffer/packet_sniffer.py”, line 6, in sniff
scapy.sniff(iface = interface, store = False, prn = process_sniffed_packet)
File “/usr/lib/python3/dist-packages/scapy/sendrecv.py”, line 1036, in sniff
sniffer._run(*args, **kwargs)
File “/usr/lib/python3/dist-packages/scapy/sendrecv.py”, line 989, in _run
session.on_packet_received(p)
File “/usr/lib/python3/dist-packages/scapy/sessions.py”, line 82, in on_packet_received
result = self.prn(pkt)
File “/root/PycharmProjects/packet_sniffer/packet_sniffer.py”, line 24, in process_sniffed_packet
login_info = get_login_info(packet)
File “/root/PycharmProjects/packet_sniffer/packet_sniffer.py”, line 12, in get_login_info
if packet.haslayer(scapy, Raw):
NameError: name ‘Raw’ is not definedAfter which I thought it might be because I needed to import scapy so I attempted to install the module and got the following:
root@kali:~/PycharmProjects/packet_sniffer# python
Python 2.7.18 (default, Apr 20 2020, 20:30:41)
[GCC 9.3.0] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.
>>> pip install scapy_http
File “<stdin>”, line 1
pip install scapy_http
^
SyntaxError: invalid syntax
>>> apt-get install scapy
File “<stdin>”, line 1
apt-get install scapy
^
SyntaxError: invalid syntax
>>> apt-get update
File “<stdin>”, line 1
apt-get update
^
SyntaxError: invalid syntax
>>> pip install scapy.all as scapy
File “<stdin>”, line 1
pip install scapy.all as scapyAttachments:
You must be logged in to view attached files.Jamal RelefordParticipantOther screenshots for the comment above. VMware settings
Attachments:
You must be logged in to view attached files.Jamal RelefordParticipantOther screenshots for the comment above from network scanner
Attachments:
You must be logged in to view attached files.Jamal RelefordParticipantOther screenshots for the comment above.
Attachments:
You must be logged in to view attached files.Jamal RelefordParticipantThanks Diego. I realized when I did the network scan that I didn’t have the Windows VM opened. It appeared when I opened it. However just for my own sanity I wanted to share the information to ensure my VM was configured correctly for further lesson. Your email mentions to share the settings for VirtualBox but per the the lessons I’ve been using VMWare so not sure if the information you’re requested will look the same. The file size max for the forum won’t allow me to share but one screenshot so I’l see if I can post the others subsequently. Thanks.
Attachments:
You must be logged in to view attached files.Jamal RelefordParticipantThanks for the response. My notes allowed me to arrive at these same conclusions however in the lecture Zaid says to use the network scanner to learn what its are on the network. My kali ip is 172.16.43.138. The Windows Ip (172.16.43.138) from the ifconfig command doesn’t appear as one of the IPs that is returned on the network scanner list.
Is there a reason for this? Is there something I can do to make sure it appears?
Results from python network_scanner.py -t 172.16.43.1/24
IP MAC Address
———————————————
172.16.43.1 f2[redacted]
172.16.43.2 00:50:[redacted]
172.16.43.254 00:50:[redacted]Jamal RelefordParticipantThe code appears to only provide the output from the ifconfig method but doesn’t take in the provided parameters and change the Mac address for some reason.
Jamal RelefordParticipantNow I’ve uncommented out the change Mac function and commented out the new function that includes the subprocess. After running the code again with the old code, I get SIOCSIFHWADDR: Cannot assign requested address
- AuthorPosts