Ethical Hacking using Python | Steal Wi-Fi Passwords in Seconds
Вставка
- Опубліковано 28 лип 2022
- 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-sec.com
Get Certified: certifications.tcm-sec.com
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/thecybermentor
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: ua-cam.com/video/POgrNo4xRko/v-deo.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.
Dope content Heath! Super informative too! Please keep the great content coming!
How you go about covering your trail? Deleting process files? Great vid! You've earned my sub!
My first time watching one of ur vids, I'm not familiar with coding, quit impressive and interesting
Do you know when I try to the run the file on command prompt it says “no such file or directory”?
So informative! Thanks so much ❤️
Awesome tutorial. It's also interesting to learn about netsh.
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
Very well you're explained, but we re needed to kali Linux video, thanks 🧐
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?
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
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.
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.
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
Is webhooksite safe? They can collect all passwords as a word Dict ..
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.
"Hello sir!" is a nice touch. Thanks - I'll be going on my first wifi engagement next month.
are you a pentester?
can this only be run through command prompt? Sorry, I'm still very new.
Can this be done remotely without hosting any site??
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 ;)
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
Does not work for me it says that there is not file that has that name. Wasted a lot of my time on this.
it is showing alot of numbers in the password place, can you fix that?
what an excellent tutorial> thank you SO MUCH 🤩
how can be use for unix boxes too?
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
Please respond! Can I do this mousepad command on ISH SHELL???
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
Please do more Python scripting videos like this
Absolutely loved it
How do i run it and also create the files
Just curious about how to make script like this which runs on Android?
How to do this on mac as these commands are not working there
Which Linux software are you using??
Amazing! Thank you...
Hi, Can you share this code?
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
i did everything s you said and write but it didnt work for me for some reason...
😕
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.
So you need RCE to get the password?
When I open the mousepad my keyboard it’s Putin other keywords
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
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.
Is this works for those wifi which were not even connected before.. With your laptop?..
No, you must connect first.
Hey my python stealer .py is just not opening its showng no directory can anybody help??
This will show passwords for only those wifi networks who had connected in past but how to crack passwords for some new networks?
While u were there. Why u didn't add aline of code to download ur favourite rat [troji] to the unwatched pc 😉
Nice video 👍
how did you open file after typing commands in cmd ?
put the the link of the file in the cmd
please upload videos regularly sir
Thank you sar...!
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.
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?
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
So first I need to have internet to download Linux and python?
use the same internet as u used to watch the video
hi, anyone knows how to execute a windows command in Mac, specially this command in the video thanks.
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
how to hack nearby wifi passwords? instead of saved wifi in our system!!
This tutorial is kid stuff, like stealing something inside your home?
How and where do i find and open the xml file
?
is this helped for unknown wifi, if we didn't connect earlier before
No
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 to do this in notepad++
cool video but what about Mac users??? got one for us?
I'm only 16 years old and still learning python, I'm not a master at it yet
@@basit2737 English is BS
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
WHICH COMPILER?
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
Mine gave this problem "command = subprocess.run(["netsh" , "wlan" , "export" , "profile" , "key=clear"] , capture_output=True).stdout.decode()
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x88 in position 70: invalid start byte" . I don't know how to solve that. I don't know if the problem is because my keybord is "utf-8" or any other reason.
Had the same issue
Add 'Windows-1251' in decode()
Should be like this .decode('Windows-1251')
@@heilagr945 Now show me a new problem: sys.stdout = open("passwords.txt", "a")
PermissionError: [Errno 13] Permission denied: 'passwords.txt'
@@heilagr945 When the "password.txt" opens show me repeatedly the same SSID and Password
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.
Thank you for the informative video , may Allah Bless you
brother don’t use this for haram reasons pls
this is funny somehow
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?
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()
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.
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) =)
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
doesn't working, no display ssid and passsword and idk why
we do only one yime just beacuse every time show same profiles...
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.
Is it use as payload?
Bro you run python program in
Which application?
Is it IDLE
What if I I’m not connect to that WiFi?
my "sys" command in python wasnt defined
we can only hack our password what about other's
it keeps saying wlan not recognized
Hi I followed all of you video please am just knew in cyber securite please where should I start from zero ? Help me please
ua-cam.com/video/rpm_V_88wds/v-deo.html
Hey fellow hackers. I'm new to this world but I love it. I would love to copy the code in this video, but I'm just confused about one thing. I don't have Linux, I have windows. Am I supposed to be writing this code in the command prompt on my computer? Will it be able to import subprocess? Will the same codes work? Mouse pad didn't work, am I supposed to be writing this code in whichever coding program then? Like VSCode where I usually work? Thanks if anyone can take the time to respond to this comment.
if u want to learn about this world first step is probably changing to linux. Codes in cmd may be different so i am not entirely sure and sorry it was not the answer to ur questions.
cool video, cant wait to try with my brother
Have fun!
But this only work for wifi that you have connected
How do you open an xml file?
Were you able??
with editor/.txt
Hi? I do this in Kali using Vmware to execute that look what I am see:
'phyton' it is not recognized as an internal or external command an operable program or a file in lots.
how can I fix that?
You misspelled python it would seem.
Can I use the same method on windows
Yes
But where the location of .xml file
Could you provide source code in the description? I'd like to play around with the code a little to try and make it more efficient/faster. (I'm not going to use it maliciously, don't worry, Im studying to be a white hat hacker lol)
Check this updated video and the source code is in the description ua-cam.com/video/POgrNo4xRko/v-deo.html
@- Prophess-or-X lol
XD don't worry am not gonna hurt you, said the serial killer
can i please get the copy paste cuz im lazy you know
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
I get this error front = stripped[13:]
TypeError: 'builtin_function_or_method' object is not subscriptable
if 'keyMaterial' in line:
stripped = line.strip()
front = stripped[13:]
back = front[:-14]
wifi_password.append(back)
see that as an example of using 'subprocess'
Title - Steal wifi passwords in seconds
video - 20 mins💁♂
End of the ad : 1:45