Jasager and BackTrack

The beautiful part of using Jasager as opposed to airbase-ng for KARMA, is that by running karma as its own seperate module, we can keep the clutter out of BackTrack. So all the dhcp and karma stuff is taken care by Jasager running on fon, while BT can freely be used for sslstrip, hamster, middler and metasploit. The setup runs smooth and works great. So here is how you set it up:

Once you got Jasager running on fon, edit the /etc/config/dhcp and /etc/config/network files like this


config dnsmasq
option domainneeded     1
option boguspriv        1
option filterwin2k      '0'  #enable for dial on demand
option localise_queries 1
option local    'lan'
option domain   'lan'
option expandhosts      1
option nonegcache       0
option authoritative    1
option readethers       1
option leasefile        '/tmp/dhcp.leases'
option resolvfile       '/tmp/resolv.conf.auto'

config dhcp lan
option interface        lan
option start    100
option limit    150
option leasetime        12h
option ignore 0
list dhcp_option 3,
list dhcp_option 6,,
list dhcp_option 6,,

config dhcp wan
option interface        wan
option start 100
option limit 150
option leasetime 12h
option ignore 1
list dhcp_option 3,
list dhcp_option 6,,
list dhcp_option 6,,

Where is the ip address of eth0 on backtrack. and will be the ip address of fonera

Configure accordingly.


config interface loopback
option ifname   lo
option proto    static
option ipaddr
option netmask

config interface lan
option ifname   eth0
option type bridge
option netmask
option proto    static
option ipaddr
option gateway
option dns

Again, is the ip address of eth0 on backtrack, while is ip address of fonera
Once you have configured dhcp and network files, restart the networking on fonera or reboot it.
Now, we should configure backtrack machine to forward traffic to and from fonera

Issue these commands in backtrack.

ifconfig eth0 netmask
echo '1' > /proc/sys/net/ipv4/ip_forward
iptables -X
iptables -F
iptables -A FORWARD -i wlan0 -o eth0 -s -m state --state NEW -j ACCEPT
iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A POSTROUTING -t nat -j MASQUERADE
route del default
route add default gw wlan0

Where wlan0 is the interface that is connected to internet. is the gateway for the interface connected to internet. Change it accordingly
If you are using your phone’s internet connection tethered to BT, then replace the above interface wlan0 with ppp0.
Gateway in that case will be the ip address of ppp0 , which can be found by ifconfig. Change accordingly.
Fon should now have internet and so are the clients connected to it. Now we can start our favorite tools on BT.
You can troubleshoot by pinging your way bottom up.
SSH into fonera, and ping

ping (The wlan0 IP address)
ping (The GW address)
ping google.com

Tags: , , ,