Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: BT4, ALFA card, Reverting to ieee drivers, and installing mdk3 "fakeap"

Hybrid View

  1. #1
    Member imported_vvpalin's Avatar
    Join Date
    Apr 2009
    Posts
    442

    Default BT4, ALFA card, Reverting to ieee drivers, and installing mdk3 "fakeap"

    So all this info can be found other places but rather than making someone search and search for it like i had to i figured id make everyone's life a little easier and combine it all here. BIG thanks to "timstewart" and "secure_it" Please keep in mind that im less than 2 weeks into linux so there might be some mistakes, but pm me and ill edit this.

    My goal from the get go was to make fake AP's as it had just interested me for some time. You could always use my method here haha you gotta give me an A for effort atleast. But anyways i found mdk3 and that works MUCH better.

    First thing we are going to want to do is switch to the old ieee drivers, i have no clue if they where used in bt3 but im thinking yes, I also have no idea what the existing bt4 alfa drivers are ... there mac something "mac8187 maybe" anyways fill me in if you know ill update this.

    We need to switch the drivers for a few reason but the most important is that they just seem to work better. They seem to have much more power and can pick up many more networks than before the switch. However i sit next to my AP for testing so that doesnt matter much. Also mdk3 is NOT going to work without the old drivers which means if you want fakeap's then youll need to make the switch. "please note the ieee drivers WILL NOT CONNECT TO WPA/WPA2's WITHOUT NDISWRAPPER or you could revert to the mac drivers"

    I am also going to say this rite now as mdk3 is some powerfull shit
    DONT USE IT FOR EVIL!!!

    Ok so first things first open up bash and type this. You can also navigate to the location and open it with kate but doing it in bash makes you just feel smarter.

    nano /etc/modprobe.d/blacklist
    A quick note, the blacklist file is basically a list of the drivers that are installed but that we dont want to load. Nano is a bash text editor btw.

    Scroll down to the bottom and paste this line in there.

    blacklist rtl8187
    Now that we have told BT4 not to use the current drivers on the next reboot we need to install the ones we want it to use, the ieee ones.

    Ok there is a way to do this all in bash but for whatever reason i cant get wget to work rite now so just download these 2 files manually.

    http://patches.aircrack-ng.org/rtl8187_2.6.27.patch
    http://dl.aircrack-ng.org/drivers/rt...ux_26.1010.zip

    You might have to right click and choose save as for the first one as it doesnt want to automatically save.

    We need to extract whats inside the zip so make sure your in the same directory as your files in bash and do

    unzip rtl8187_linux_26.1010.zip
    There are also 2 tar files that need to be extracted so do

    cd rtl8187_linux_26.1010.0622.2006/
    tar xzf drv.tar.gz
    tar xzf stack.tar.gz
    You can do all this in Konqueror but its good to learn bash and it's also easer to explain.

    There is one file that needs to be edited before we can start so once everything is extracted do

    nano beta-8187/r8187.h
    You need to scroll down to lines 46 and 47 and change 'asm' to 'linux' it should look like this

    #include <asm/io.h>
    #include <asm/semaphore.h>

    and needs to be changed to

    #include <linux/io.h>
    #include <linux/semaphore.h>
    Now we need to move the .patch file into the rtl8187_linux_26.1010.0622.2006 folder, I just do it through the GUI but you can also do it through bash, either way when its there we can start patching the file

    Making sure your in the rtl8187_linux_26.1010.0622.2006 folder and rtl8187_2.6.27.patch is in there also do

    patch -Np1 -i rtl8187_2.6.27.patch
    now all we need to do is give it the make commands so do

    make
    make install
    After that we just do a simple reboot, when your back up to make sure its working and do

    airmon-ng start wlan0
    If it says r8187 under driver it worked, if it still says rtl8187 make sure you followed everything exactly and that you wrote blacklist rtl8187 in the blacklist file.

    Now to switch back and forth between drivers just edit the blacklist file to contain blacklist "blacklist rtl8187" or "blacklist r8187" respectively "Im sure there is a better way than rebooting so if someone wants to fill me in im all ears"


    Assuming you got that installed correctly lets move along to mdk3, I had originally wrote this with easy to follow steps but im having second thoughts. This way atleast total n00bs wont get it ... or atleast i hope.

    apt-get install gcc-4.2
    Grab the mdk3 package from here

    http://homepages.tu-darmstadt.de/~p_...dk3-v5.tar.bz2

    Edit the mdk3-v5/osdep/common.mak

    CC = $(TOOL_PREFIX)gcc
    needs to be changed to

    CC = $(TOOL_PREFIX)gcc-4.2
    then

    make
    make install
    Thats it your now finished have fun and let me make this suggestion, if your planning on using this for "evil" DONT! You will be caught and you will get in trouble and i personally hope you end up in jail.


    "this is my little search engine hack lets see if it works"

    mdk3 backtrack alfa card reverting alfa drivers ieee alfa drivers alfa fakeap bt4 alfa drivers bt4 alfa fakeap fakeap.pl alfa bt4 fakeap installing backtrack 4 fakeap alfa mdk3 bt4 mdk3 alfa drivers backtrack4
    Using backtrack for the first time is like being 10 years old again with the keys to a Ferrari.

  2. #2
    Member imported_onryo's Avatar
    Join Date
    Apr 2009
    Posts
    109

    Default

    Now to switch back and forth between drivers just edit the blacklist file to contain blacklist "blacklist rtl8187" or "blacklist r8187" respectively "Im sure there is a better way than rebooting so if someone wants to fill me in im all ears"
    With your blacklist you will boot into r8187
    If you don't want to reboot just do this to go back and forth:

    rmmod r8187 && modprobe rtl8187 ( to rtl8187)
    rmmod rtl8187 && modprobe r8187 (to r8187)

    If your Alfa hangs unplug the USB and do then just a modprobe ie of the device you want. Lot faster then a reboot.

    Best to ya
    Let me explain officer, I am not a hacker. I am a security tester of sorts!

  3. #3
    Member imported_vvpalin's Avatar
    Join Date
    Apr 2009
    Posts
    442

    Default

    Quote Originally Posted by onryo View Post
    With your blacklist you will boot into r8187
    If you don't want to reboot just do this to go back and forth:

    rmmod r8187 && modprobe rtl8187 ( to rtl8187)
    rmmod rtl8187 && modprobe r8187 (to r8187)

    If your Alfa hangs unplug the USB and do then just a modprobe ie of the device you want. Lot faster then a reboot.

    Best to ya
    Cool that works, i had actually tried it before and wasnt able to pick up anything in monitor mode, silly me should have figured all you need to do is a unplug... modprobe what you want and your back up. It also doesnt matter what you have loaded in your blacklist file so you can leave that to whatever you want for a reboot.

    Thanks a bunch onryo
    Using backtrack for the first time is like being 10 years old again with the keys to a Ferrari.

  4. #4
    Senior Member
    Join Date
    Jan 2010
    Posts
    126

    Default

    i was primarily interested in your tutorial because, as you stated; the older driver just seemed to be a bit more capable... rather than the fake ap portion. driver patch portion works perfectly, so thanks.

    i'm afraid you are probably correct,however. the mdk3 info is probably a bit too powerful a tool to make this easily accessible to those who might abuse such a tool... other than perhaps deliberately inserting a glaring error into your walk-through. (which is flawless)

    the only slightly odd thing i encountered was during the driver patching and this was just due to directory name length. i was getting a "is not a number" error in nano. so I edited beta-8187/r8187.h in kate, where lines 46,47 were 47 and 48 ;-)

    thanks again,
    c

  5. #5
    Member
    Join Date
    Jan 2010
    Posts
    140

    Default

    Quote Originally Posted by vvpalin View Post
    Edit the mdk3-v5/osdep/common.mak
    Code:
    CC = $(TOOL_PREFIX)gcc
    needs to be changed to
    Code:
    CC = $(TOOL_PREFIX)gcc-4.2
    then
    Code:
    make
    make install
    You don't actually have to edit any files. You can condense the section I've highlighted down to this.
    Code:
    # make CC=gcc-4.2
    # make install

  6. #6
    Just burned his ISO
    Join Date
    May 2009
    Posts
    1

    Smile but first install gcc-4.2

    apt-get install gcc-4.2

  7. #7
    Member alacrityathome's Avatar
    Join Date
    Jan 2010
    Posts
    248

    Smile Excellent job

    vvpalin,

    Very nicely done. Your process also works well on Ubuntu Jaunty 9.04 with a 2.6.28 kernel.

    A

  8. #8
    Very good friend of the forum Virchanza's Avatar
    Join Date
    Jan 2010
    Posts
    863

    Default

    Hey I'm curious about why you install gcc version 4.2.

    I downloaded the source code for MDK3, and then I compiled it simply by typing "make", but I got compile errors.

    The latest version of GCC gives extra warnings which it didn't give in previous versions:
    1) A warning if a function declared "warn_unused_result" is called with having its result discarded.
    2) Some other warning to do with string formatting.

    Anyway, these are warnings, nothing more. Warnings are not errors, they are not fatal, it's just the compiler's way of pointing out that it thinks you might have made a mistake.

    Warnings don't result in a compilation failure unless you explicitly tell the compiler that you want warnings to be treated as errors, and it seems that this "feature" is all the rage nowadays in source code that's distributed for Linux. It's absolute bullshit to specify this flag in source code that's distributed for other people to compile (it's bullshit even to display the warnings on-screen).

    So anyway, instead of installing a previous version of GCC, just disable the stupid "Treat warnings as errors" thing in the MDK3 makefile. Here it is in a nutshell:

    Code:
    wget http://homepages.tu-darmstadt.de/~p_larbig/wlan/mdk3-v5.tar.bz2
    tar xjf mdk3-v5.tar.bz2
    cd mdk3-v5
    
    sed -i 's|-Wall|-w|g' ./Makefile
    sed -i 's|-Wextra||g' ./Makefile
    
    sed -i 's|-Wall||g' ./osdep/common.mak
    sed -i 's|-Wextra||g' ./osdep/common.mak
    sed -i 's|-Werror|-w|g' ./osdep/common.mak
    sed -i 's|-W||g' ./osdep/common.mak
    
    make
    make install
    By the way, why isn't MDK3 included in BT4?
    Ask questions on the open forums, that way everybody benefits from the solution, and everybody can be corrected when they make mistakes. Don't send me private messages asking questions that should be asked on the open forums, I won't respond. I decline all "Friend Requests".

  9. #9
    Member
    Join Date
    Jan 2010
    Posts
    83

    Default

    Awesome tutorial, just what I am looking for.

    I have a few questions though. If rtl8187 is black listed and r8187 is replacing rtl8187 then wouldn't a reboot after you make/make install be necessary? And also, when I rebooted it did not reconize the card at all after words. I'm no linux guru, what am I doing wrong?

  10. #10
    Very good friend of the forum Virchanza's Avatar
    Join Date
    Jan 2010
    Posts
    863

    Default

    The driver is fine in BT4-PreFinal, no need to go playing with it.
    Ask questions on the open forums, that way everybody benefits from the solution, and everybody can be corrected when they make mistakes. Don't send me private messages asking questions that should be asked on the open forums, I won't respond. I decline all "Friend Requests".

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •