Saturday, November 19, 2005

Scapy On OpenBSD 3.8

Quick Installation Guide

Below are all the packages/sources that need to be installed in order to get Scapy run properly.

python-2.3.5p2
libpcap-0.9.4.tar.gz
py-libpcap-0.3.1p0
libdnet-1.10
py-libdnet-1.10
py-crypto-2.0
gnuplot-4.0.0
py-gnuplot-1.7
PyX-0.8.1.tar.gz
graphviz-1.16p1

Installing libpcap from source

libpcap-0.9.4(Packet Capture Library)

shell>wget http://www.tcpdump.org/release/libpcap-0.9.4.tar.gz
shell>tar xvzf libpcap-0.9.4.tar.gz
shell>cd libpcap-0.9.4
shell>./configure
shell>make && make install

Depends on which shell you are using, the default is ksh

shell>export PKG_PATH=\ http://public.www.planetmirror.com/pub/OpenBSD/3.8/packages/i386/

Or if you are using csh

shell>setenv PKG_PATH \ http://public.www.planetmirror.com/pub/OpenBSD/3.8/packages/i386/

Note: You can find lots of mirrors from the this url, check one nearby your location -> http://www.openbsd.org/ftp.html#http

Now you can just install all the packages easily with

shell>pkg_add ${PKG_PATH}libdnet-1.10

shell>pkg_add ${PKG_PATH}python-2.3.5p2.tgz

shell>pkg_add ${PKG_PATH}py-libpcap-0.5.3p0.tgz

shell>pkg_add ${PKG_PATH}py-crypto-2.0.tgz

shell>pkg_add ${PKG_PATH}gnuplot-4.0.0.tgz

shell>pkg_add ${PKG_PATH}py-gnuplot-1.7.tgz

shell>pkg_add ${PKG_PATH}graphviz-1.16p1.tgz

Installing PyX-0.8.1 from source - for psdump() and pdfdump() to function properly

There's a slightly issue since PyX requires teTeX including font Type 1 and I have problem installing teTeX through package since I get mismatch md5 checksum. However you can still install PyX and use psfont.cmz instead.

PyX-0.8.1(Python Graphic Package)

Choose any PyX download mirror -> http://prdownloads.sourceforge.net/pyx/PyX-0.8.1.tar.gz?download

shell>wget http://optusnet.dl.sourceforge.net/sourceforge/pyx/PyX-0.8.1.tar.gz
shell>tar xvzf PyX-0.8.1.tar.gz
shell>cd PyX-0.8.1
shell>python setup.py build
shell>python setup.py install

To use font psfonts.cmz

shell>python
>>>from pyx import *
>>>text.set(fontmaps="/usr/local/share/texmf-dist/fonts/map/dvips/ams/psfonts.cmz")
>>>

To avoid informational message "Can't Open Ethertypes Files" when you run Scapy,

Download the ethertypes file that from this url ->
http://pierre.droids-corp.org/scapy/ethertypes
and put it into /etc directory.

Get the latest Scapy now!

shell>wget http://www.secdev.org/projects/scapy/files/scapy.py

Now you can just run Scapy by typing ./scapy.py -s new.session

Finally I can get this writing done, next will be quick installation guide on FreeBSD, Stay tuned!

No comments: