Ethical Hacking using Python | Steal Wi-Fi Passwords in Seconds
Vložit
- čas přidán 5. 09. 2024
- Improved code video: • Steal Wi-Fi Passwords ...
$2 Rubber Ducky - Steal WiFi Passwords in Seconds - • $2 Rubber Ducky - Stea...
Python for Beginners - Full Course - • Python for Beginners -...
___________________________________________
Pentests & Security Consulting: tcm-sec.com
Get Trained: academy.tcm-se...
Get Certified: certifications...
Merch: merch.tcm-sec.com
Sponsorship Inquiries: info@thecybermentor.com
📱Social Media📱
___________________________________________
Twitter: / thecybermentor
Twitch: / thecybermentor
Instagram: / thecybermentor
LinkedIn: / heathadams
Discord: / discord
💸Donate💸
___________________________________________
Like the channel? Please consider supporting me on Patreon:
/ thecybermentor
Support the stream (one-time): streamlabs.com...
Hacker Books:
Penetration Testing: A Hands-On Introduction to Hacking: amzn.to/31GN7iX
The Hacker Playbook 3: amzn.to/34XkIY2
Hacking: The Art of Exploitation: amzn.to/2VchDyL
The Web Application Hacker's Handbook: amzn.to/30Fj21S
Real-World Bug Hunting: A Field Guide to Web Hacking: amzn.to/2V9srOe
Social Engineering: The Science of Human Hacking: amzn.to/31HAmVx
Linux Basics for Hackers: amzn.to/34WvcXP
Python Crash Course, 2nd Edition: amzn.to/30gINu0
Violent Python: amzn.to/2QoGoJn
Black Hat Python: amzn.to/2V9GpQk
My Build:
lg 32gk850g-b 32" Gaming Monitor:amzn.to/30C0qzV
darkFlash Phantom Black ATX Mid-Tower Case: amzn.to/30d1UW1
EVGA 2080TI: amzn.to/30d2lj7
MSI Z390 MotherBoard: amzn.to/30eu5TL
Intel 9700K: amzn.to/2M7hM2p
G.SKILL 32GB DDR4 RAM: amzn.to/2M638Zb
Razer Nommo Chroma Speakers: amzn.to/30bWjiK
Razer BlackWidow Chroma Keyboard: amzn.to/2V7A0or
CORSAIR Pro RBG Gaming Mouse: amzn.to/30hvg4P
Sennheiser RS 175 RF Wireless Headphones: amzn.to/31MOgpu
My Recording Equipment:
Panasonic G85 4K Camera: amzn.to/2Mk9vsf
Logitech C922x Pro Webcam: amzn.to/2LIRxAp
Aston Origin Microphone: amzn.to/2LFtNNE
Rode VideoMicro: amzn.to/309yLKH
Mackie PROFX8V2 Mixer: amzn.to/31HKOMB
Elgato Cam Link 4K: amzn.to/2QlicYx
Elgate Stream Deck: amzn.to/2OlchA5
*We are a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for us to earn fees by linking to Amazon.com and affiliated sites.
If you want to see an update to this video with improved code, check out this link: czcams.com/video/POgrNo4xRko/video.html
please can you say i have a doubt
that my passwords are not displaying in the file please say what to do
making foolish efforts to show my own passwrod, how can i crack unknown wifi password ? why i steal my own password and spread to world ?
2:15 video starts
Thanks Soldier. 🫡
Thanks my grandma didn't stand a chance
😂
LOOOOOOOOOOL 😂😂😂😂 boy you gonna get your ass slapped
Thanks for the humor. I needed this laugh
🤣🤣🤣🤣😂😂😂
Best comment I’ve seen all week.
If it doesn't work at 16:20, try:
if (filename.startswith("Wi-Fi") or filename.startswith("WiFi")) and filename.endswith(".xml"):
My XML file starts with "WiFi". Could also make filename lowercase to avoid any further discrepancies.
You could also check the .xml file and see what it starts with(mine was Wi-Fi instead of wifi) and try that, it worked for me
so basically, this can be done only if we are connected to the network or we can get all the available networks which are available nearby?
same ques works for some tho check it out
But this will only give the passwords for saved profiles, isn't it? Can I know the password of any random SSID ?
U could use the script like a malware and just send it
Dope content Heath! Super informative too! Please keep the great content coming!
Nice!!!!
But if we were to use this snippet in commercial network systems where there could be a lot of wifi's available, this could take a lot of time since the code is of O(n^4) complexity. This could be bought to O(n^2) by subtle changes to increase execution speed.
How
Any ideas !
@@moiz_6 No stress!! We can remove nested for loops, use lambda functions for function definitions and use file parsers
@@tyrannicalguy7262 ok
Thanks
Nice one dudes. One day I want to be able to contribute to threads like this and provide solutions as a coder and ethical hacker.
Correct me if I’m wrong, but isn’t this actually O(n!)?
And it could be just O(n).
It actually baffles me how someone could write such a inefficient code and call it an tutorial. I don’t know this channel and maybe he is a great programmer and it is done on purpose so some noobie doesn’t do anything stupid on more than cca 15-20 passwords.
Anyway it is in python so efficiently wasn’t the point.
Nice work, mate! Well explained and pretty informative as well. After watching the whole video, there's one thing i would like to know: How can i protect myself from this commands? Can i block a system from accepting that commands or anything like that? What steps should i take after knowing that this kind of stuff is possible?
What goes around,comes around. If you don't harm others, you will most likely be protected from the harm of others. And in case someone manages to steal your password,just ban their MAC adress through the router settings.
You can just don't have python installed so that can't really run python on their computer.
What about online interpreters?
My first time watching one of ur vids, I'm not familiar with coding, quit impressive and interesting
How you go about covering your trail? Deleting process files? Great vid! You've earned my sub!
Do you know when I try to the run the file on command prompt it says “no such file or directory”?
iam watching this at night and got flashbanged 3:28
how to hack nearby wifi passwords? instead of saved wifi in our system!!
This tutorial is kid stuff, like stealing something inside your home?
Does not work for me it says that there is not file that has that name. Wasted a lot of my time on this.
I thought at the first time that this is a remote-based wifi hacking tutorial. Nice one tho!
didnt realize i was being taught to make a wifi stealing virus lol
it is showing alot of numbers in the password place, can you fix that?
So first I need to have internet to download Linux and python?
use the same internet as u used to watch the video
how did you open file after typing commands in cmd ?
put the the link of the file in the cmd
Is this works for those wifi which were not even connected before.. With your laptop?..
No, you must connect first.
Changing some code since I have some issues when computer has more than one WIFI stored and if there are some open WIFI stored:
#Do the hackies
for filename in os.listdir(path):
if filename.startswith("Wi-Fi") and filename.endswith(".xml"):
wifi_files.append(filename)
for i in wifi_files:
with open(i,'r') as f:
for line in f.readlines():
if 'name' in line:
stripped = line.strip()
front = stripped[6:]
back = front[:-7]
wifi_name.append(back)
if 'keyMaterial' in line:
stripped = line.strip()
front = stripped[13:]
back = front[:-14]
wifi_password.append(back)
if 'open' in line:
stripped = line.strip()
front = stripped[16:]
back = front[:-17]
wifi_password.append(back)
for x, y in zip(wifi_name, wifi_password):
sys.stdout = open("passwords.txt", "a")
print("SSID: "+x, "Password: "+y, sep=' ')
sys.stdout.close()
wifi_name.clear()
wifi_password.clear()
Is webhooksite safe? They can collect all passwords as a word Dict ..
is this helped for unknown wifi, if we didn't connect earlier before
No
Very well you're explained, but we re needed to kali Linux video, thanks 🧐
When I open the mousepad my keyboard it’s Putin other keywords
If it only gives you password of your saved wifi or wifi that you connected before then we can use like 3 cmd in cmd promt to get it easily...
how to coonect any wifi without knowing its password and its is our first time to connect with it
Tricky exploits(Usually, the holes are fixed) or brute force( extremely long process) =)
thanks for the code very informative and cool. One question, this code is good for windows machines only or will work for other system? I am assuming is for windows only. if we use a windows command will take one line code netsh wlan export profile key=clear to get the file and then the password. I dont see the benefit using python instead of windows command. Sorry I am learning (super beginner) I just want to understand the advantage of using Python. Thanks again
Bro did u tried this
Some advantages:
1: in Python you can send it somewhere as he did if there are multiple people involved
2: you can put that script on a usb Stick and with some small chnages to the stick you can automatically get all passwords from another Laptop
3: you do not have to do stuff Manual.
4: it is good for learning and having fun with it.
i have this error
if filename.startswith("WLAN") and filename.endswith(".xml"):
IndentationError: expected an indented block after 'for' statement on line 20
Help
Did you figure this one out allready? It's a good Idea to google search your errors when you program.. Everybody does it. -Programming is 10 percent typing and 95 percent google searching... Anyways- python indentations are important... You use tab spaces to communicate what blocks that should be executed and in what order.
So informative! Thanks so much ❤️
we can only hack our password what about other's
I still have a lot to learn but I glad I am learning python, I am understanding the script, what words like append mean, understanding what a for loop does, etc. Then I am learning more things and how to use python for hacking. Being a script kitty sucks kids. I have never been one and never will be.
i think ya mean script kiddie ;)
Can this be done remotely without hosting any site??
I have a question let’s say I hypothetically I am hacked into my neginbours wifi and then they change thier password so woudl the cmd show the current password or the password that was saved before
It will show the password saved earlier .. there will be no update if the password was changed
Hi, Can you share this code?
WHICH COMPILER?
"Hello sir!" is a nice touch. Thanks - I'll be going on my first wifi engagement next month.
are you a pentester?
How to do this in notepad++
Okay so you never said how to prevent this if you are a person who has someone near them stealing their wifi. I have the issue where Samsung TV and Mediatec with Mac address 28:84:fa:9b:b9:e2 as well as multiple other devices which are not mine keep showing up in my network under Windows, but when I got o my router it does not see those MAC addresses so I cannot block them. I pay a lot of money for my internet and I have a strong password on it, within 8-10 hours no matter what password I put on the SSID and WIFI I get new devices which are not mine popping up in my network. Also I always see them from Windows under Network with a Mac address, but no IP address. How can I stop this. I am using WPA2-PSK encryption this is a PITA changing my WIFI password because I have about 10 IOT devices including Lights and other devices and Every time I change the password I have to spend about 2 hours setting them back up to connect, please help.
This will show passwords for only those wifi networks who had connected in past but how to crack passwords for some new networks?
can this only be run through command prompt? Sorry, I'm still very new.
Any help. Mine printed the passwords and names and so on but did not save to the txt file. I've checked my code 3 times. I cant find the issue. Is there something I need to do.
How do i run it and also create the files
Awesome tutorial. It's also interesting to learn about netsh.
End of the ad : 1:45
Which Linux software are you using??
Please respond! Can I do this mousepad command on ISH SHELL???
At the end of September we went to a country fair in our city out in the country. The only Wi-Fi was locked down, so I found a point of sale terminal that was unlocked went in control panel and got the Wi-Fi password. :D
I'm only 16 years old and still learning python, I'm not a master at it yet
@@basit2737 English is BS
How and where do i find and open the xml file
?
Title - Steal wifi passwords in seconds
video - 20 mins💁♂
You have to go through the entire process before it takes seconds.
very good video, but i understand the code show you the password files do you have in your computer, this it's correct? but i dont understand if using this code you can steel password to an network wifi who you dont have the .xml file
i did everything s you said and write but it didnt work for me for some reason...
😕
how can be use for unix boxes too?
cool video but what about Mac users??? got one for us?
would this work on most Windows systems though? they don't have python by default do they? guessing you could do a similar process with a batch file or powershell. Cheers for activating the neurons late on a Friday.
You are correct. That or some c# executable. You can also convert python to a .exe, but I’m not sure if windows defender would like it much
Tested with powershell, it works really well
@@alexpetrean827 did you re-write the script using PowerShell?
His using windows
we do only one yime just beacuse every time show same profiles...
sorry for the noob question , whare are the xml stored in windows?
You can search in the search bar by writing .xml and then can click on the desired file to see its file location
How do you get the customized linux environment in kali? Also, most of my xml files do not contain the line. Not sure why.
it means the wifi networks you connected to did not require authentication to connect with, ie. they were open wifi
How to do this on mac as these commands are not working there
So you need RCE to get the password?
Just curious about how to make script like this which runs on Android?
Back in the 80,s was learning computer programming basics , hated it , now I got so much more respect for it , wish I payed attention back then lol. Ps liked and subscribed. 👍
my dad did basic in college.
Is This attack works only if the credentials saved before in my system?
Yes. If your computer automatically connects to wifi on startup, it means the password is stored there, so this attack will work.
But this only work for wifi that you have connected
Please do more Python scripting videos like this
hi, anyone knows how to execute a windows command in Mac, specially this command in the video thanks.
Hi I followed all of you video please am just knew in cyber securite please where should I start from zero ? Help me please
czcams.com/video/rpm_V_88wds/video.html
no , only we do this only one time just because of when i do again this ,this show me again same wifi profiles thats i conneted
doesn't working, no display ssid and passsword and idk why
how did he find the xml file
my file is just opening in Pycharm, bro...
What if I I’m not connect to that WiFi?
Hi can some one steal my wpa supplicant in android
Root directory
By Sending such scripts through Email or online web links to hack my WiFi password?
Or the android root directory Encrypted = unaccessible?
Thanks
Is it use as payload?
Very good video, but wouldn't you get every ssid and password multiple times if there was more than 1 ssid? Because of the for loop at line 29 you append to list then go through the whole list if there was a second ssid it would do all the things to the first ssid as well or am i wrong? I would have seperated the stuff after line 28 into a new line.
You're right, the for loop at 29 should be outside the first for loop, so no indent
I had this issue. Resolved by creating a dictionary for the wifi profiles
@@0baakFPV I don't think that's the problem that the comment was talking about, but I think you mean that a dictionary solves the problem of multiple equal SSID's
Oh wait, a dictionary actually wouldn't allow multiple equal SSID'S
@@boradagdelen3846 i had a bunch of duplicate instances.. i think it was from my passwords being changed.. not sure. but the dictionary made my output file nice and organized with no dups
my "sys" command in python wasnt defined
Hey my python stealer .py is just not opening its showng no directory can anybody help??
it is showing NO MODULE NAMED SUBPROCESS
This is unrelated (and probably illegal), but, a while ago, I was put in a refuge for children out of town because my mom was in the hospital as a result of medical negligence during a surgery. Anyway... to get to the point... I wrote a keylogger in python so I could get their wifi password when they typed it in because they wouldn't tell us what it was.
it keeps saying wlan not recognized
what an excellent tutorial> thank you SO MUCH 🤩
I would be good if i ask you for normal reason, other app they can get passwords from unknown ssid/wife routers ..i used kali linus and aircrack but other apps that i wanna say more safe for normal use..
like i got in a vacation, but i don't have the password for the airbnb how do i hack it? without use any of the above hacking programs/apps?
Bro you run python program in
Which application?
Is it IDLE
But where the location of .xml file
How do you open an xml file?
Were you able??
with editor/.txt
see that as an example of using 'subprocess'
How do i open the xml file i don't understand plz explain someone plz plz
Search in the search bar by typing .xml u should be able to see the files . After clicking on the file you can see its file location
This was a good one. Thanks a lot. Would be nice if you went into the possible payloads one could use with this so that people know what to avoid. Thanks again
Sounds like someone is asking for a friend ;p
Amazing! Thank you...
While u were there. Why u didn't add aline of code to download ur favourite rat [troji] to the unwatched pc 😉
Nice video 👍
Do we have to do all this process to hack password
It just shows the password from your already connected devices .. we cannot hack other unknown wifi connections through this code
Can I use the same method on windows
Yes
can i please get the copy paste cuz im lazy you know
Thank you sar...!
please upload videos regularly sir
Absolutely loved it
Hi Heath, thank you for another great tutorial. May I ask, How do you get your Windows command prompt to see the python code, please? Thank you.
So simple just type python and file name Python file.py
@@MuhammadImran-uz6vz I tried recently one to download youtube videos and it did not work in windows. it required to install python and then the modules . so I dont think python just work out of the box in windows in my short experience
nice tutorial.. I followed along using VScode. I triple checked and compared codes. the code works, but the output is a huge list.. mostly repeating username and passwords.. i believe about 8 xml files were found. i received a ton of repeats and some files weren't in the output.. not sure what the heck happend.. anyways... I'm about a month in on teaching myself Python. thanks again
It's really badly written code.
Every time a filename is added to the list it opens every file in the list and processes it before processing the new file.
Same here, I have basic experience in python but not enough to be able to know how to fix this while keeping the code working, are there any basic solutions?
it did not work. Pls help me out
this tutorial is not hacking, this guy is playing with your minds