感谢:
Snax (AirSnort的作者)
Daniel Walther (以下英文文章的作者)
以及所有为开放源代码,做出贡献的人们
请关注以下连接:
http://www.gimp.org/~tml/gimp/win32/index.html
http://ms.blogger.cn/tohigh/Default.aspx
请先下载:
http://www.michiganwireless.org/tools/Airsnort/
airsnort-0.2.2b.tar.tar 源代码
airsnort.zip win32 可执行文件
开始步骤如下:(我不翻译了,请照着做就可以编译通过,但是不能跟踪调试,要想单步跟踪调试,请跟我做:))先让我们啃一下英文。
AirSnort Installation on Windows
#--- [ Tutorial AirSnort on Windows ] ---#
(c) 2003 by d.walther (d.walther@wireless-bern.ch) - Wireless-Bern.ch
-- Introduction --
- - - - - - - - - - - - -
AirSnort is a wireless LAN (WLAN) tool which recovers encryption keys (WEP).
AirSnort operates by passively monitoring transmissions, computing the encryption
key when enough packets have been gathered.AirSnort requires approximately 5-10 million
encrypted packets to be gathered. Once enough packets have been gathered,
AirSnort can guess the encryption password in under a second.
This tutorial will show you, how you are able to intall this tool on a windows-based machine.
Attention: This installation isn't so easy as a "normal" windows application.
If you find some errors or you are missing something, please contact me.
-- Requirements --
- - - - - - - - - - - - - -
Download the AirSnort source code. A windows makefile is included.
>> http://sourceforge.net/projects/airsnort
AirSnort for Windows uses the Windows ports of GNU libiconv, GNU gettext runtime for Win32, GLIB and GTK+1.3, you have also to download
the developer packages (e.g. gtk+-1.3.0-20030717.zip, glib-2.2.3.zip, gtk+-dev-1.3.0-20030115.zip, glib-dev-2.2.3.zip,
gettext-runtime-0.12.1.bin.woe32.zip, libiconv-1.9.1.bin.woe32.zip).
>> http://www.gimp.org/~tml/gimp/win32/index.html
>> http://www2.arnes.si/~sopjsimo/gimp/ (binary packages of GIMP and GTK+1.3)
Unfortunately, the AirSnort for Windows distribution don't contains any drivers. so you have to download them
by yourself. You have to download a demo version of AiroPeek or AiroPeek NX from WildPackets.
>> http://www.wildpackets.com
-- Installation --
- - - - - - - - - - - -
Now you should have the following files (Filenames are depending on the programversion):
airsnort-0.2.2.tar.gz
gtk+-1.3.0-20030717.zip
glib-2.2.3.zip
gtk+-dev-1.3.0-20030115.zip
glib-dev-2.2.3.zip
gettext-runtime-0.12.1.bin.woe32.zip
libiconv-1.9.1.bin.woe32.zip
demo version of AiroPeek or AiroPeek NX from WildPackets
First you have to unpack the following files:
airsnort-0.2.2.tar.gz
gtk+-1.3.0-20030717.zip
glib-2.2.3.zip
gtk+-dev-1.3.0-20030115.zip
glib-dev-2.2.3.zip
gettext-runtime-0.12.1.bin.woe32.zip
libiconv-1.9.1.bin.woe32.zip
Now you have to copy some directories to another places:
X:\gtk+-dev-1.3.0-20030115\include\gdk ---> X:\airsnort-0.2.2\gdk
X:\gtk+-dev-1.3.0-20030115\include\gtk ---> X:\airsnort-0.2.2\gtk
X:\glib-dev-2.2.3\include\glib-2.0\glib ---> X:\airsnort-0.2.2\glib
X:\glib-dev-2.2.3\include\glib-2.0\gobject ---> X:\airsnort-0.2.2\gobject
Now you have to copy some files to another place: X:\glib-dev-2.2.3\include\glib-2.0\*.* ---> X:\airsnort-0.2.2\src (3 files)
X:\glib-dev-2.2.3\lib\glib-2.0\include\glibconfig.h ---> X:\airsnort-0.2.2\src\glibconfig.h
X:\gtk+-dev-1.3.0-20030115\lib\gtk+\include\gdkconfig.h ---> X:\airsnort-0.2.2\src\gdkconfig.h
Libraries:
X:\glib-dev-2.2.3\lib\glib-2.0.lib ---> X:\Program Files\Microsoft Visual Studio\VC98\Lib\glib-2.0.lib
X:\gtk+-dev-1.3.0-20030115\lib\gdk.lib ---> X:\Program Files\Microsoft Visual Studio\VC98\Lib\gdk.lib
X:\gtk+-dev-1.3.0-20030115\lib\gtk.lib ---> X:\Program Files\Microsoft Visual Studio\VC98\Lib\gtk.lib
If you have installed the MS Visual Studio 6.0 Libraries in another directory than X:\Program Files\Microsoft Visual Studio\VC98\Libs, then you have to change the Value of the variable "VC_LIBS" in the "windows.mak" file in the following directory X:\airsnort-0.2.2 .
After you have copied all diretories and files, your able to compile AirSnort.
To compile AirSnort, please enter the following command (in the Command Line Interface or Dos-Box):
X:\airsnort-0.2.2> nmake /f windows.mak
There will be created some directories during the compilation (e.g. bin).
After the compilation you have to copy some other files into the bin directory from AirSnort:
X:\gettext-runtime-0.12.1.bin.woe32\bin\intl.dll ---> X:\airsnort-0.2.2\bin\intl.dll
X:\libiconv-1.9.1.bin.woe32\bin\iconv.dll ---> X:\airsnort-0.2.2\bin\iconv.dll
X:\glib-2.2.3\bin\libglib-2.0-0.dll ---> X:\airsnort-0.2.2\bin\libglib-2.0-0.dll
X:\glib-2.2.3\bin\libgmodule-2.0-0.dll ---> X:\airsnort-0.2.2\bin\libgmodule-2.0-0.dll
X:\gtk+-1.3.0-20030717\lib\libgdk-0.dll ---> X:\airsnort-0.2.2\bin\libgdk-0.dll
X:\gtk+-1.3.0-20030717\lib\libgtk-0.dll ---> X:\airsnort-0.2.2\bin\libgtk-0.dll
X:\Program Files\WildPackets\AiroPeek\Peek3.vxd ---> X:\airsnort-0.2.2\bin\Peek3.vxd
X:\Program Files\WildPackets\AiroPeek\Peek4.sys ---> X:\airsnort-0.2.2\bin\Peek4.sys
X:\Program Files\WildPackets\AiroPeek\Peek5.sys ---> X:\airsnort-0.2.2\bin\Peek5.sys
Now you're able to start the AirSnort (X:\airsnort-0.2.2\bin\airsnort.exe)
The names of the network devices are the registrykeys from these devices. If you want to know which
key is corresponding to which device, you have to have a look into the registry:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\NetworkCards
I've compiled AirSnort under WinXP (with MS Visual Studio 6.0), but it should work under Win2k, WinNT and Win9x too.
-- Disclaimer --
- - - - - - - - - - - -
These informations are supplied without liability. I take no respnsibility for any errors
and blue screens!
You will make this installation at your own risk.
-- References --
- - - - - - - - - - - -
- http://airsnort.shmoo.com
- http://www.gimp.org/~tml/gimp/win32/index.html
hinzugefügt: Mittwoch, 08. Oktober 2003
von: Daniel Walther
Wertung:
Hits: 10491
Sprache : deu
假设你已经完成了以上步骤,并且取得成功(一般是可以的。)用vc6建立一个win32 console Applicantion的空项目,名称取AirSnort。把上面步骤里的X:\airsnort-0.2.2全部拷贝到你建立的空项目文件夹下,呵呵,开始了。
把bssidlist.c callbacks.c capture.c crack.,c crc-32.c
display.c interface.c main.c Packet.c PacketSource.c RC4.c support.c添加到新建立的项目的sources files里。
把所有的.h除了wlancap.h全部添加到header files里。(请仔细研究作者提供的windows.mak,AIRSNORT_LINK32_OBJS)
Project Settings :选定AirSnort, LinkàCategory选Customize, Project Options 把kernel32.lib user32.lib shell32.lib gtk.lib gdk.lib glib-2.0.lib替换掉vc生成的那些.lib,(参照windows.mak 里的AIRSNORT_LINK32_FLAGS)点ok .
寻找config.h.in文件,在AirSnort文件夹里,把文件改为config.h,呵呵,不这样做的话,编译的时候会报告找不到config.h。
ToolsàOptionsàDirectories, 在include files 添加你的项目路径,如C:\DOCUMENTS AND SETTINGS\ADMINISTRATOR\桌面\AIR\TEST\AIRSNORT_TRY
添加你项目里的src路径如C:\DOCUMENTS AND SETTINGS\ADMINISTRATOR\桌面\AIR\TEST\AIRSNORT_TRY\SRC
点ok。
编译,一般会出来找不到<unistd.h>文件的错误,把它改成io.h就可以了。
这样做,一般能编译通过,假如有其他细微的错误,哈哈,我想凭你的编程经验,应该能够轻松搞定。
Add New Project to workspace
建立一个win32 Dynamic-Link Library ,Add to current workspace ,dependency of打钩。
名字取wlancap
添加wlancap.c wlancap.h
根据windows.mak里WLANCAP_LINK32_FLAGS
Project Settings :选定wlancap, LinkàCategory选Customize, Project Options,用kernel32.lib user32.lib advapi32.lib替换掉vc生成的那些.lib,ok。编译。
照着老外说得做,把需要的dll考进去,运行airsnort.exe
After the compilation you have to copy some other files into the bin directory from AirSnort:
X:\gettext-runtime-0.12.1.bin.woe32\bin\intl.dll ---> X:\airsnort-0.2.2\bin\intl.dll
X:\libiconv-1.9.1.bin.woe32\bin\iconv.dll ---> X:\airsnort-0.2.2\bin\iconv.dll
X:\glib-2.2.3\bin\libglib-2.0-0.dll ---> X:\airsnort-0.2.2\bin\libglib-2.0-0.dll
X:\glib-2.2.3\bin\libgmodule-2.0-0.dll ---> X:\airsnort-0.2.2\bin\libgmodule-2.0-0.dll
X:\gtk+-1.3.0-20030717\lib\libgdk-0.dll ---> X:\airsnort-0.2.2\bin\libgdk-0.dll
X:\gtk+-1.3.0-20030717\lib\libgtk-0.dll ---> X:\airsnort-0.2.2\bin\libgtk-0.dll
X:\Program Files\WildPackets\AiroPeek\Peek3.vxd ---> X:\airsnort-0.2.2\bin\Peek3.vxd
X:\Program Files\WildPackets\AiroPeek\Peek4.sys ---> X:\airsnort-0.2.2\bin\Peek4.sys
X:\Program Files\WildPackets\AiroPeek\Peek5.sys ---> X:\airsnort-0.2.2\bin\Peek5.sys
这个生成的版本,可以单步跟踪调试,可以帮助我们更好的理解这个开源代码的设计思路,以及除bug,这个代码有很大的bug,希望高手能帮助解决掉,抓包的时候超过1000多个,机器就会蓝屏,抓包后退出,也会蓝屏。我大略的看了一下处理退出的代码,好像有问题,他只是简单的return。作者也说过,他对win32的驱动不了解,有这方面经验的朋友,请看一下。有进展的话,希望公开你的成果哦。呵呵,linux那个版本应该还是比较稳定的。
图片: