Exact step that i followed to jail bind user in ubuntu12.04.You can use following steps for almost any debian system.To known more about what is jailing ?? go to this link.
To known more about how to break a jail follow this link
- echo "/named/jail is our jail directory"
- echo "inside it create a linux filesystem environment"
- ls -l
- cd dev
- mknod null c 1 3
- mknod zero c 1 5
- mknod random c 1 8
- ls -lk
- clear
- cd ..
- cd /etc/
- ls -l
- cd /named/jail/
- cd etc
- ls -l
- echo"move bind folder from /etc/bind to /named/jail/etc/bind"
- echo "move bind folder from /etc/bind to /named/jail/etc/bind"
- clear
- nano /etc/default/bind9
- clear
- ls -l
- cd bind/
- ls -l
- /etc/init.d/bind9 restart
- echo "it didnt started...lets troubleshoot"
- cat /var/log/syslog | tail -30
- /etc/init.d/apparmor stop
- clear
- /etc/init.d/bind9 restart
- cat /var/log/syslog | tail -30
- cd ..
- cd var
- mkdir cache
- cd cache/
- mkdir bind
- chown root:bind bind
- /etc/init.d/bind9 restart
- echo "something is still wrong"
- cat /var/log/syslog | tail -30
- cd ..
- mkdir run
- cd run/
- mkdir bind
- chown root:bind bind
- cd bind/
- mkdir run
- cd run
- /etc/init.d/bind9 restart
- echo "again failed to start"
- cat /var/log/syslog | tail -30
- cd ..
- ls -l
- chown root:bind run
- ls -l
- /etc/init.d/bind9 restart
- cat /var/log/syslog | tail -30
- ls -l
- chmod 770 run
- cd ..
- ls -l
- chmod 770 bind
- /etc/init.d/bind9 restart
- netstat -unlp | grep 53
- netstat -unlp | grep -iw 53
- echo "now we have successfully jailed our bind server and its user bind "
- echo "for more info goto my youtube channel http://www.youtube.com/hack0xf4"
- echo ";-)"
If you have any query or problem regarding above steps then just leave a comment below.HAPpY Holidays ;-)
Comments
Post a Comment