Forum Replies Created
- AuthorPosts
- NikolajevZjParticipant
Hello,
I added the print after load.replace().
It seems like the requests are getting modified properly because i get decrypted answers containing html page details,but still in the load field of the returned packets,the error 400 “bad request” occurs and below i get a packet that contains something like this in the load field:
Here’s the screenshot of it:
https://mega.nz/file/tpNhRYSC#OeVlIdaA_dwS5mcVBVugRKdpjjvOHuNmCyFQ9RRHIp4
Every packet contains the error 400 at the beginning,I noticed that some packets don’t get decrypted at all:
https://mega.nz/file/U4VxBCQQ#YN84lwba0aI4HyPs3ZZpmufsGhMEhYrXlLtCFIRMzRE
I get same results on http,https,and hsts websites.The program still doesn’t manage to inject the script into the browser.Here are screenshots of the code:
https://mega.nz/file/NwU3RaSA#v8H8GtiQm2iz2_VRjxwhxV2iAMYLcsA6ZovmZfByt9g
https://mega.nz/file/tsMQXBZK#QOldM2uY1Z669rRI14skxosxoXSY1KeHu-c7DJdTMO8
Regards,NikolajevZjParticipantHello,
I removed the ip_tables changing function from the code.I cleared the iptables with the commands that you mentioned and I enabled port forwarding,the code still doesnt seem to work.I used stealmylogin.com.I’m using the custom kali image provided by zaid,has there been any newer versions?I downloaded it in may when I started doing zaid’s courses.I’m using python 2.I noticed now that instead of the script it seems like the error message “HTTP/1.1 400 Bad Request” gets somehow injected into the websites source code at the bottom,i think its still because the changes in the packet are getting rejected,here is the screenshot:
https://mega.nz/file/A9sFlAiA#YIxQ2GRPDsEn9RBgI1vTLStXIThL4TTPechcSyn0X1s
Regards,NikolajevZjParticipantHello,
I couldn’t reach speedbit,i can’t access it now,even on the main computer.I tried the code on vulnweb,and it didn’t work so I suppose it wouldn’t work on speedbit,since the thing is they are http.Anyway here are the screenshots of the code:
(This the reorganised code,without the scapy_packet.show commands,but still it doesnt work,I added the functions for changing iptables rules after the errors occured so i don’t think they are the reason)
https://mega.nz/file/V8ciRByJ#6qxrg6uPN5Z9QspZzoDOGsRXTxaFRiEbpfe40rTbEaU
https://mega.nz/file/VkU0UbDK#DqI7ybMoXTwOeXauwyBkGnnCnZCmystR4bkxGjpaBPc
I also noticed that the code didnt decode the incoming raw layers of packets,but i it did show the content length.It seems very strange to me.
Regards,NikolajevZjParticipantHave you used the iptables actually?Cause you know that it is necessary?You know you may have not cleared the ip tables rules or something and the packets still follow the wrong route.
- This reply was modified 4 years, 1 month ago by NikolajevZj.
NikolajevZjParticipantWait,so is there anything that’s not working,or did you figure it out cause I’m a bit confused.
NikolajevZjParticipantIs this the only thing you got?I think it isn’t bad,it proves it’s working cause it is detecting the keep alive packets.But is it something unordinary in it?
It’s working now right?If the program is printing this stuff it shows that it runs properly,let me know if there is something else.NikolajevZjParticipantHi!
It could be the problem,you should be sniffing data from your active internet interface.In case eth0 is not your active interface,check which one is by typing iwconfig
in terminal.Are you using wireless adapter?It’s possible that you just aren’t sniffing on the right interface or did not configure the network settings in kali,cause
when you set the NAT network in kali’s settings by default it uses simulated ethernet connection(eth0).In case you did not set up the NAT network in Kali, I think in
the beginning of the course mr.Zaid explains and shows how to do so.But,anyway in order for the program to work you need to specify the network interface that you
are using currently,if it’s a wireless adapter,it will show up when you type iwconfig,in my case it is wlan0.Let me know if this helps.
NikolajevNikolajevZjParticipantOne more thing,I placed the os.system command in arp_spoofer for executing the echo command,could that somehow be the problem here?
- This reply was modified 4 years, 1 month ago by NikolajevZj.
NikolajevZjParticipantHello,
You need to perform the attack on the Kali machine first(on kali’s browser),in the next lectures it will be shown how to forward packets and then you will be able to sniff the data from the windows machine,I had exact same problem not so long ago.Let me know if you had a laugh on this one :D(I remember the moment when I realized it and I had a truly good time laughing).Best Regards,
NikolajevNikolajevZjParticipantHi!
Yeah,the os.system command worked,the kali is forwarding the packets correctly.Thanks!NikolajevZjParticipantHello!
Thanks to the commands you’ve mentioned I was able to deal with my issue.Firstly I’ve noticed that I’ve been calling the commands with the subprocess in an innapropriate way,I can’t figure out how to call them properly,they just don’t get executed,I need to type them manually.Before when I typed the echo command manually I think the iptables were blocking it,cause I think I didn’t stop the dns spoofer and they were refreshing each second.Anyway what I did,was just typing iptables –flush and restarting the spoofer,it works now,thanks once again!But there’s is one thing,the dns spoofer cuts the connection,and as I have written I can’t deal with calling the echo and iptables commands.
I would like to make to make the program more convienient to use,by automating the necessary commands.I was calling both the echo and iptables commands like this:
def ip_tab():
command_line = “iptables -I FORWARD -j NFQUEUE –queue-num 0”
args = shlex.split(command_line)
subprocess.Popen(args)
I copied this method from stack overflow,because with the echo command it was showing some kind of directory error.
I also tried the subprocess.call with both commands but it didn’t work either.I’m stuck!Can you help me out?NikolajevZjParticipantHello,
Yes sorry I meant packet sniffer.I was trying to sniff on the windowsVM, I just didn’t realize it(i didn’t pay attention to the look of the sniffed browser in the lecture).Anyway everything works fine except one thing.I tried to add and end= argument to the print(load) command,because it printed the username and password 4 times
in separate lines, and it throws an error at me.Here’s the screen:
https://mega.nz/file/MgtkQIDA#ZnLVDtjHXBGCeC8ryrdT_BDbALoVRziUTfnQPh7UcHI
Here’s the code:
https://mega.nz/file/J002RA6R#HeK9kfh8r-lNBDJ5zgQcb2HWi2d4D6JKT-_bF8UlcaU
Regards,NikolajevZjParticipantHello!
I managed to solve my problem.Firstly i noticed that my windowsVM had an expired license,so I recovered the first snapshot.Then i tried again and everything worked perfectly.I also stopped the program before the execution of echo command.I don’t know if those two properties were the actual problem,or if it was some network issue
that didn’t occur further,anyway it works know.Thanks for the iptables commands, I think they might be useful if I encounter similar problems.
Best regards!NikolajevZjParticipantHello!
Both kali and windows VM have internet access before the attack
kali network settings:
https://mega.nz/file/Z103STYJ#dzoaECQVUZHprhEtTDtsmgqCyKJv3CBjBUSljaJ5k0w
kali ifconfig and route -n:
https://mega.nz/file/Q5tlSbaA#pFKJ7GEPyBTVNpOJlJnHBNwVosaz5e4772cVfqH0g_g
windows ipconfig:
https://mega.nz/file/Ek11hZDB#1g04I9TpP3tQvAljNoauSGhIg9N3MzpJhNxvcgGOcN0
windows network settings:
https://mega.nz/file/EgkhDDzS#HLy6w9X1TZZGWLX-0YddZjud8qcMJxO1Ms2eJHErA1k
my code(sorry i could not find the code button):
https://mega.nz/file/JwkhnBDS#UMlLxjIFj8XNIqiOXRCfiKxkCKWVnQV52EhWUSquuxQ
Thanks for your reply!NikolajevZjParticipantI managed to fix my issue by reinstalling scapy,I basically went back to version 2.4.0.I found another post on the forum,where there was a ready fix.But thanks for your reply anyway.
- AuthorPosts