NDIS Wrapper For FSCKing IDIOTS - PowerPoint PPT Presentation

1 / 21
About This Presentation
Title:

NDIS Wrapper For FSCKing IDIOTS

Description:

If we correctly loaded a working driver we should now have some blinking lights ... Now that our card is loaded, it's time to get connected. ... – PowerPoint PPT presentation

Number of Views:151
Avg rating:3.0/5.0
Slides: 22
Provided by: php4
Category:

less

Transcript and Presenter's Notes

Title: NDIS Wrapper For FSCKing IDIOTS


1
NDIS Wrapper For FSCKing IDIOTS
2
What is an Ndiswrapper?
NdisWrapper Some vendors do not release
specifications of the hardware or provide a linux
driver for their wireless network cards. This
project provides a linux kernel module that loads
and runs Ndis (Windows network driver API)
drivers supplied by the vendors.
http//ndiswrapper.sourceforge.net/
3
Duhs that mean any Windows Compatible card will
work in Linux?
It Doesn't!!!
HELL!
NO
Checkout http//ndiswrapper.sourceforge.net/ for
a complete listing of compatible hardware.
From experience the Broadcom BCMXXXX is the most
popular card and it IS supported!
4
Lets get down to business
Kinda like these guys
5
Start NOW
I'm expecting everyone to understand the commands
given. If not understood, bloody scream and ask
questions. Don't be an idiot and not understand
anything when you leave.
Hardware Needed
  • Wireless card....flippin' idiots

Software Needed
  • Linux Installed (You choose the flavor of the
    week)
  • Using a recent kernel of 2.6.6 or 2.4.26 with
    source
  • The ndiswrapper package

6
Retrieving the packages
Currently we don't have an Internet connection
configured for wlan0 or anything other than our
LAN line eth0
SO...
We will continue to use our LAN line to retrieve
the packages until we get the wireless configured.
If you want to be super cool and get the latest
snapshot, checkout the following cvs and go get
it!
cvs -z3 -dpserveranonymous_at_cvs.sourceforge.net/
cvsroot/ndiswrapper co ndiswrapper
7
But Daniel, I aint got no sources
For all the Fedora, Redhat, and other
non-kernel-source owning fools, here's how to get
it.
  • Redhat
  • kernel-source.rpm
  • Make sure the link exist between your modules and
    your current kernel sources
  • ln -s /usr/src/linux-
    /lib/modules/VERSION/build

8
Obtaining the Fedora Sources
To create an exploded source tree, perform the
following steps (note that refers to
the version specification for your currently-runni
ng kernel) 1. Obtain the kernel-.src.rp
m file from one of the following sources o The
SRPMS directory on the appropriate "SRPMS" CD iso
image o The FTP site where you got the kernel
package o By running the following
command up2date --get-source kernel
9
This is getting long
2. Install kernel-.src.rpm (given the
default RPM configuration, the files this package
contains will be written to /usr/src/redhat/) 3.
Change directory to /usr/src/redhat/SPECS/, and
issue the following command rpmbuild -bp
--target kernel.spec (Where is the
desired target architecture.) On a default RPM
configuration, the kernel tree will be located in
/usr/src/redhat/BUILD/. 4. In resulting tree,
the configurations for the specific
kernels shipped in Fedora Core 3 are in the
/configs/ directory. For example, the i686 SMP
configuration file is named /configs/kernel-
on-i686-smp.config. Issue the following command
to place the desired configuration file in the
proper place for building cp
./.config
10
And it just got longer....
5. Issue the following command make
oldconfig6 6. Make sure that link exists ln -s
/usr/src/linux-
/lib/modules/VERSION/build
That was about as long as this line of hackers.
(don't worry, it's the back of their heads, no
faces)
11
Installing the ndiswrapper
From here I'm following the ndiswrapper wiki
instrutions at http//ndiswrapper.sourceforge.net/
mediawiki/index.php/Installation
Start From the Source Directory (Must be root
to perfrom the installation) pelesmk_at_smk /
su Password smk / smk / make
distclean smk / make smk / make install
This should compile and install both the
kernel module and the userspace utilities
12
Building the Windows Driver
Important Do NOT use drivers on your CD. They
may work, but you may experience kernel crashes
etc., if the driver on your CD has not been
tested. Instead, you need to download appropriate
Windows XP driver for your card from the Wiki
entry List. To identify the driver that you need,
first identify the card you have with 'lspci' and
note the first column such as 0000000c.0 and
then find out the PCI ID of the card that with
'lspci -n' corresponding to the first column of
'lspci' output. The PCI ID is third column or
fourth in some distributions and of the form
'104c8400'. Now you need to get the Windows
driver for this chipset. In the List, find out an
entry for the same PCI ID and download the driver
corresponding to it. Unpack the Windows driver
with unzip/cabextract/unshield tools and find the
INF file (.INF or .inf extension) and the SYS
file (.SYS or .sys extension).
  • Because I am using a BroadcomXXX I'll use the
    BroadcomXX.inf file.

13
Installing the Driver
Use the 'ndiswrapper' tool to install the
driver smk / ndiswrapper -i ''filename.inf'' Th
is copies all necessary files to /etc/ndiswrapper
and creates the config files for your card. After
installing you can run smk / ndiswrapper
-l to see the status of your installed drivers.
If you have installed the correct driver you
should see something like this smk /
Installed ndis drivers bcmwl5 driver present,
hardware present Where 'present' means that
you have a card that can be used with the driver
installed. In this case, broadcom driver bcmwl5
is used.
14
Load the module
To load the module type smk / modprobe
ndiswrapper Our windows driver is now loaded!
Get your wallets ready, because I'm about to get
paid. Lets double check our work and make sure
the correct version of ndswrapper is
running. smk / dmesg tail Looking for a line
equivelent to ndiswrapper version
loaded Make sure the version here
matches the version of ndiswrapper package that
you downloaded and installed. If you get a
different version, you have old version of
package, which you should Uninstall and go back
to step 1.
15
Those blinking Green things
If we correctly loaded a working driver we should
now have some blinking lights on our wireless
card. If not remove and reinsert your card.
Now that our card is loaded, it's time to get
connected.
  • Lets check for some goods in our syslog
  • ndiswrapper driver ''driver1'' added
  • wlan0 ndiswrapper ethernet device
    xxxxxxxxxxxx

16
Hey! I aint got no lights!
If this sounds like you, then something is fscked
up. If you don't see messages in your syslog, it
usually means that there are no usable drivers
installed in /etc/ndiswrapper directory. Check
if the /etc/ndiswrapper directory has one
sub-directory for each driver and if in each
driver's directory there are inf, sys and conf
files. Otherwise, repeat step 2.
17
By Golly I think it's working! Configuring the
Card to connect
A suite of utilities can be used to configure
your wireless card to talk to your Access Point.
The Wireless Tools package has a beauty of tools
and here they are being used.
To find wireless interfaces issue the command smk
/ iwconfig To search for access points smk /
iwconfig wlan0 scan To configure your card to
connect to a specified access point smk /
iwconfig wlan0 essid ESSID
18
Got WEP?
We all know we have modes for our wireless, but
how do I tell Linux about them? If you're using
Managed, which most of us are smk / iwconfig
wlan0 mode Managed For those using WEP you can
enter your key with smk / iwconfig wlan0 key
restricited XXXXXXXXX Back to the Basics The
command I issue here at UAT to connect to a
tsunami network is smk / iwconfig wlan0
essid tsunami Supa Hackers who don't broadcast
an ESSID can be connected to via smk /
iwconfig wlan0 essid MAC ADDRESS HERE Keeping
the quotes also allows you to enter spaces and
other non standard characters as the ESSID.
But that ain't it, Billy, we need to order us an
IP!
19
Retrieving an IP
Our card is now configured and ready to retrieve
an ip address from our configured access point.
Here's how we receive a dhcp for our wlan0
interface. Every distribution has its own way of
doing this. Here are more than enough ways to
rock your world. For my tried and true who use
Gentoo (That totally rhymed) smk / dhcpcd
wlan0 For the rest of you, try one of these
smk / ifconfig wlan0 up smk / dhclient
wlan0
If you made it to the end of this presentation I
salute you! You should now be able to ping some
stuff! Stay away from the porno.

20
The Secret Slide Loading ndiswrapper at boot
I forget how to do things everyday, and some
things I don't use for months at a time, so how
will I ever remember what order to load what
module and what module to load and what modules
load at module time and what options did I give
modprobe and what did I .....WTF can't I just
create a script or something to rock my world?
The answer is, this is Linux my babe be cool,
anything can be done.
Create a quick line for loading with smk /
ndiswrapper -m Now use your distributions
preferred technique to load modules. I'm super
hardcore and the following command works for
me smk / rc-update add ndiswrapper default
21
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com