Wireless MiTM Attacks

简介:

 Collecting Log In Info Through MITM { Man In The Middle } Attack


Ok so I've been reading online and there is quite a lot of tutorials on MiTM attacks but they mostly consist of overall general idea of it. Well today we'll be focusing on a certain type of MiTM attack using some specific tools. Yes, the same result can be achieved by using an automated tool such as ettercap ( I think ) for sniffing out log in credentials. 

So lets begin with the tools that you will need to accomplish this attack.

  • Any Linux Distro
  • Netstat
  • IPTables
  • Arpspoof
  • SSLStrip



** You can easily find these tools through apt-get or yum, if not then you always have Google on your side **

Overview

So, this type of attack will be focused on ARP { Address Resolution Protocol } Spoofing. You ask what IS ARP Spoofing? Good question. 
ARP Spoofing is also known as

  • ARP Flooding
  • ARP Poisoning
  • ARP Poison Routing



ARP Spoofing is technique used to attack an Ethernet wired/wireless network. It may allow the attacker to sniff data frames, in this case the log in information, on a local area network. The attacker can also modify or redirect traffic, or even stop the traffic. 

Generally, the aim is to associate the attacker's MAC address with the IP address of another node , such as the default gateway. Any traffic meant for that IP address would be mistakenly sent to the attacker instead. The attacker could then choose to forward the traffic to the actual default gateway (passive sniffing) and everything is untouched or modify the data before forwarding it (MiTM attack).


The Attack

[+] To be able to do ARP poisoning, first the attacker, in which case is you, would need to run some commands in terminal:

echo '1' > /proc/sys/net/ipv/ip_forward

This will your computer to forward any packets that weren't intended for your machine.



[+] Find which of the systems is the router on your network

netstat -nr

The out of that command will show you which IP is your gateway, in most cases it should be 192.168.1.1, unless configured differently.



[+] Use ARPSpoof to put yourself between the router and all other systems on the network, hens Man-In-The-Middle  .

arpspoof -i wlan0 192.168.1.1

You are gonna need to change wlan0 to your wireless interface. You can easily figure which are you using by typing iwconfig into the terminal.



Under heavy loads, using arpspoof on an entire network can cause the network to crash, making the internet unavailable to all users. This makes it pretty obvious that something is up, and sysadmins will be doing what they can to fix the problem. Should this ever occur, stop the arpspoof process using 'ctrl-c' and wait a moment. The network should start working again, once the router informs everyone of its MAC. Then you can start your attack again

So what now, that we are connected and everything running smooth? Well here comes the sniffing part...

Sniffing Out Login Info With SSL Strip

What exactly is SSL Strip?

SSL Strip is a tool written by Moxie Marlinspike and released at Black Hat DC 2009. It reroutes encrypted HTTPS requests from network users to plaintext HTTP requests, effectively sniffing all credentials passed along the network via SSL. The way it does this is it lets users connect via HTTP, logs their information, then redirects their connection to the originally-intended HTTPS server on the internet.

So How Exactly Do we Accomplish This?

[+] First we need to set up a firewall rule via iptables to redirect requests from port 80 to port 8080, this will ensure that our outgoing connections (from SSL Strip) get routed to the proper port.

iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-port 8080


[ + ] Now we need to execute the MITM commands earlier in the Tut.
echo '1' > /proc/sys/net/ipv4/ip_forward
arpspoof
-i wlan0 192.168.1.1


[ + ] When arpspoof starts, open a new terminal and start SSL Strip.
sslstrip -k -l 8080

The "-k" designator tells the system to kill all currently active sessions, forcing users to re-login to their websites.



Now that we've started our MITM attack and got SSL Strip actively intercepting packets, all we have to do is sit and wait. SSL Strip will run as long as you want it to, and it will log all captured information in a file called sslstrip.log. If you want to watch this file as it grows, you can use the 'tail' command. This is a fun tool that helps you watch logfiles as they're modified in real-time.

tail -f sslstrip.log

The "-f" modifier tells tail to follow the file until you tell it to stop.




Once you're done with your attack, use the ctrl-c key to kill the 'tail,' 'sslstrip,' and 'arpspoof' processes. The sslstrip.log file will remain, and the system will stop being the MITM.

After shutting down all processes and disconnecting from the network, you can safely analyze the logfile. It might look like a bunch of garbage something like so:

2010-06-27 20:38:24,482 SECURE POST Data (login.facebook.com):
charset_test
=%E2%82%AC%2C%C2%B4%2C%E2%82%AC%2C%C2%B4%2C%E6%B0%B4%2C%D0%94%2C%D0%84&locale=en_US&email=user%40email.com&pass=password&charset_test=%E2%82%AC%2C%C2%B4%2C%E2%82%AC%2C%C2%B4%2C%E6%B0%B4%2C%D0%94%2C%D0%84&lsd=H2cF2


BUT! If you look through all that garbage you will notice that the email (username log in) and password are in plain text!!!!
I know if the file is REALLY big you would hate to search through all that just for a line or two. One way you can make it easier for you just search for keywords like username or password, or something as such.

And that would be the end of the tutorial! Have fun, and try not to get caught  

Thanks to z3ros3c for the help 














本文转hackfreer51CTO博客,原文链接:http://blog.51cto.com/pnig0s1992/519559,如需转载请自行联系原作者

相关文章
|
3月前
|
机器学习/深度学习 算法 前端开发
发动机故障诊断智能体(二):基础时序压缩与长短期记忆编码网络
在智能体完成气路多航段时序数据的采集与规整后,高维度的原始时序信号需要经过深度表征与降维处理,以消除高频测量噪声并提炼本质物理趋势。采用长短期记忆自编码器架构,在脱离人工标签监督的情况下,利用海量正常运行数据进行自监督重构训练,构建出能够压缩并表征发动机稳态工况与退化趋势的时序特征提取模型。
|
2月前
|
人工智能 数据可视化
影刀RPA证书题库来了, 选择题收录加操作题可复制,解放双手
影刀RPA证书题库:免注册、五步即用(打开→授权→选课→搜题→练操作),支持关键词/粘贴/题型搜索,含可视化流程图与原题配图,覆盖2025/2026双版本课程,操作题可一键复制指令,答案经官方核对,刷题高效精准。
|
10月前
|
人工智能 弹性计算 自然语言处理
2026年阿里云一键部署使用OpenClaw详细教程
本文将详细介绍如何通过阿里云轻量应用服务器实现OpenClaw的一键部署,助力大家快速拥有专属AI数字员工。
838 2
|
4月前
|
人工智能 运维 IDE
零成本AI编程实战|Qoder CN免费社区版全解,额度规则、多端部署与CLI实操命令完整指南
AI赋能研发已经成为软件开发领域的主流趋势,AI编码助手可以极大降低重复编码工作量,提升学习与开发效率。但市面上大量高质量AI编程工具普遍采用订阅付费模式,对于编程学生、业余爱好者、初级开发者来说,长期订阅会带来不小的经济负担,抬高了AI编程的入门门槛。为了普惠广大基层开发群体,降低AI编程落地门槛,原通义灵码完成品牌迭代升级,正式更名为Qoder CN,并且推出永久可用的免费社区版本。该版本配套独立Credits额度体系,普通用户不需要付费订阅,就可以使用专业级AI编码智能体能力,覆盖代码学习、脚本编写、小型项目开发、代码调试等轻量化开发场景。
1354 0
|
5月前
|
存储 固态存储 安全
电脑为什么要分C盘、D盘?硬盘分区真的有必要吗?
C盘、D盘等并非多块硬盘,而是同一块SSD(或HDD)划分出的逻辑分区。C盘默认装系统,D/E盘用于存储数据——分区核心价值是**数据隔离与管理便利**,非提速。SSD时代虽非强制,但合理分区(如C盘120GB+、D盘存资料)可大幅降低重装系统风险,提升长期使用效率。(239字)
|
8月前
|
SQL 人工智能 运维
公众号-4/7活动预告
4月11日北京,OpenClaw「企业实战专场」重磅来袭!告别玩具标签,龙虾进化出铁钳:支持TB级自进化记忆、VM级安全隔离、专家级业务理解。现场技能闪电秀+擂台赛,直击运维巡检、SSO接入、Vibe Coding等真实生产痛点。80席限量预约,共探AI Agent如何成为企业智能中枢。
252 3
|
7月前
|
机器学习/深度学习 人工智能 算法框架/工具
好用的推理训练引擎横向评测:主流MLOps平台深度对比
本文横向评测五大主流AI基础设施平台(博云AIOS BMP、AWS SageMaker、Google Vertex AI、Azure ML、阿里云PAI),聚焦推理训练引擎,从功能完整性、异构算力支持、私有化能力、易用性及性价比五大维度深度对比,助力企业精准选型。
|
数据采集 存储 NoSQL
用Redis实现爬虫URL去重与队列管理:从原理到实战的极简指南
本文详解Redis在爬虫中的核心应用:利用SET与BloomFilter实现高效URL去重,结合LIST、BRPOP与ZSET构建高性能任务队列,并支持分布式协作。通过代码示例与实战优化技巧,助你打造亿级规模、高并发的智能爬虫系统,显著提升抓取效率与稳定性。
625 0
|
Python
Python中Cp、Cpk、Pp、Ppk的计算与应用
总的来说,Cp、Cpk、Pp、Ppk是衡量过程能力的重要工具,它们可以帮助我们了解和改进生产过程,提高产品质量。
2494 13
|
机器学习/深度学习 自然语言处理 API
大模型应用框架-LangChain(一)
LangChain由 Harrison Chase 创建于2022年10月,它是围绕LLMs(大语言模型)建立的一个框架,LLMs使用机器学习算法和海量数据来分析和理解自然语言,GPT3.5、GPT4是LLMs最先进的代表,国内百度的文心一言、阿里的通义千问也属于LLMs。LangChain自身并不开发LLMs,它的核心理念是为各种LLMs实现通用的接口,把LLMs相关的组件“链接”在一起,简化LLMs应用的开发难度,方便开发者快速地开发复杂的LLMs应用。 LangChain目前有两个语言的实现:python、nodejs。