Skip to main content

Jailing Bind(Named) User in Ubuntu




          


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
          

  1.      echo "/named/jail is our jail directory"
  2.      echo "inside it create a linux filesystem environment"
  3.      ls -l 
  4.      cd dev
  5.      mknod null c 1 3
  6.      mknod zero c 1 5
  7.      mknod random c 1 8
  8.      ls -lk
  9.      clear
  10.      cd ..
  11.      cd /etc/
  12.      ls -l
  13.      cd /named/jail/
  14.      cd etc  
  15.      ls -l
  16.      echo"move bind folder from /etc/bind to /named/jail/etc/bind"
  17.      echo "move bind folder from /etc/bind to /named/jail/etc/bind"
  18.      clear
  19.      nano /etc/default/bind9 
  20.      clear
  21.      ls -l
  22.      cd bind/
  23.      ls -l
  24.      /etc/init.d/bind9 restart
  25.      echo "it didnt started...lets troubleshoot"
  26.      cat /var/log/syslog | tail -30
  27.      /etc/init.d/apparmor stop
  28.      clear
  29.      /etc/init.d/bind9 restart
  30.      cat /var/log/syslog | tail -30
  31.      cd ..
  32.      cd var
  33.      mkdir cache
  34.      cd cache/
  35.      mkdir bind
  36.      chown root:bind bind
  37.      /etc/init.d/bind9 restart
  38.      echo "something is still wrong"
  39.      cat /var/log/syslog | tail -30
  40.      cd ..
  41.      mkdir run
  42.      cd run/
  43.      mkdir bind
  44.      chown root:bind bind
  45.      cd bind/
  46.      mkdir run
  47.      cd run
  48.      /etc/init.d/bind9 restart
  49.      echo "again failed to start"
  50.      cat /var/log/syslog | tail -30
  51.      cd ..
  52.      ls -l
  53.      chown root:bind run
  54.      ls -l
  55.      /etc/init.d/bind9 restart
  56.      cat /var/log/syslog | tail -30
  57.      ls -l
  58.      chmod 770 run
  59.      cd ..
  60.      ls -l
  61.      chmod 770 bind
  62.      /etc/init.d/bind9 restart     
  63.      netstat -unlp | grep 53
  64.      netstat -unlp | grep -iw 53
  65.      echo "now we have successfully jailed our bind server and its user bind "
  66.      echo "for more info goto my youtube channel http://www.youtube.com/hack0xf4"
  67.      echo ";-)"



If you have any query or problem regarding above steps then just leave a comment below.HAPpY Holidays ;-)

Comments

Popular posts from this blog

Hacking Windows 10 UWP App: DLL Injection & common Vulnerabilities

I recently started working on  widows 10 Apps( Apps not Applications) security. Before diving deep in hacking terms lets try to understand what's new in Windows 10 UWP( Universal Platform) as compared to old Apps. Lets begin with how apps actually work on windows 10(desktop/tablet). Now windows 10 comes with a container only for running apps inside the isolated environment. By default, /APPCONTAINER(Linker Flag) is off. This option modifies an executable to indicate whether the app must be run in the appcontainer process-isolation environment. Specify /APPCONTAINER for an app that must run in the appcontainer environment—for example, a Windows Store app. (The option is set automatically in Visual Studio when you create a Windows Store app from a template.) For a desktop app, specify /APPCONTAINER:NO or just omit the option. The /APPCONTAINER option was introduced in Windows 8. Now there is no registry entry concept for these app in the System HIVE rather they install they own hiv

Installing vmware-11.0 on Ubuntu 15.04 Using kernel Patch

curl http://pastie.org/pastes/9934018/download -o /tmp/vmnet-3.19.patch cd /usr/lib/vmware/modules/source tar -xf vmnet.tar patch -p0 -i /tmp/vmnet-3.19.patch tar -cf vmnet.tar vmnet-only rm -r *-only vmware-modconfig --console --install-all References: http://askubuntu.com/questions/605530/vmware-player-7-1-0-on-ubuntu-15-04-kernel-3-19-0-10-generic-app-loading http://askubuntu.com/questions/617704/failed-to-build-vmnet-for-kernel-3-19

SSI Injection Attack

SSIs are directives present on Web applications used to feed an HTML page with dynamic contents. They are similar to CGIs, except that SSIs are used to execute some actions before the current page is loaded or while the page is being visualized. In order to do so, the web server analyzes SSI before supplying the page to the user. The Server-Side Includes attack allows the exploitation of a web application by injecting scripts in HTML pages or executing arbitrary codes remotely. It can be exploited through manipulation of SSI in use in the application or force its use through user input fields. It is possible to check if the application is properly validating input fields data by inserting characters that are used in SSI directives, like:  Code: < ! # = / . " - > and [a-zA-Z0-9] Another way to discover if the application is vulnerable is to verify the presence of pages with extension .stm, .shtm and .shtml. However, the lack of these type of pages does not mean that th