How to anonymously use Kali OS for hacking

Anonymity is always a biggest concern for hacker or for doing black box on some organization. We all are familiar with TOR browser, which is used to surf internet anonymously. Today we will talk about 2 tools, which will help you to make your Kali machine anonymous on internet, with some exception to Hostname and MAC Address security risks. According to ethical hacking expert of International Institute of Cyber Security, there are many ways to prevent accidental connections and DNS leaks. In this Tutorial, we will talk about two tools one is Kalitorify and Nipe separately.

Kalitorify Introduction

Kalitorify is a tool that uses iptables to set transparent proxy via TOR network. This kalitorify sends all your outgoing traffic through the TOR network. Coming back to some basics:

What is Tor?

TOR (The onion router). We use this network to protect ourselves, from outside world and to be safe on the internet by using this TOR network. We can use this browser on our computers and mobile phones.

What is transparent proxy?

A transparent proxy is placed between users and the internet. This proxy doesn’t modify the users’ request, response and sends it to a web server without user knowing about it. A transparent proxy is also called an inline proxy, intercepting proxy, or forced proxy server. We also have a nontransparent proxy, which modifies the users’ requests and responses.

Kalitorify Environment

  • OS: Kali Linux 2019.3 64 bit
  • Kernel version: 5.2.0

Kalitorify Installation Steps

root@kali:/home/iicybersecurity# git clone https://github.com/brainfucksec/kalitorify
 Cloning into 'kalitorify'...
 remote: Enumerating objects: 35, done.
 remote: Counting objects: 100% (35/35), done.
 remote: Compressing objects: 100% (24/24), done.
 remote: Total 496 (delta 17), reused 25 (delta 11), pack-reused 461
 Receiving objects: 100% (496/496), 184.44 KiB | 464.00 KiB/s, done.
 Resolving deltas: 100% (264/264), done. 
  • Now, use the cd command to enter into the kalitorify directory.
    • cd /kalitorify
 root@kali:/home/iicybersecurity#cd kalitorify/
 root@kali:/home/iicybersecurity/kalitorify# 
  • Next, use command kalitorify -h ,to find the help options.
kalitorify Help
kalitorify Help
  • Now, use command kalitorify -v, to check the kalitorify tool version
kalitorify Version
kalitorify Version
  • Next, use command kalitorify -t. To start transparent proxy through TOR network
Transparent Proxy Fig 1
Transparent Proxy Fig 2
  • Next, type ifconfig.me in our browser. It will display details about your browser and your Public IP.
Ifconfig.me
Ifconfig.me
  • Use command to kalitorify -s ,to check the status of the TOR network connection and your exit node details. For every 5-10 mins it will change your IP address and TOR node exit country.
IP Status
  • Now, Let’s try login to your Gmail account. As we know that when we try to login to any Gmail account, which has security checked for Two-step authentication.
  • We will receive 2-step authentication step screen.
  • On your Gmail mail box you will receive alert or if you are having android mobile mobile with that email configured, you will get alert that somebody is trying to login from Austria (which is TOR exit Node) as shown below:
Gmail
  • Now, Let’s check the mobile phone.
Verification
  • Now, use command kalitorify -r. To restart the TOR services and changes the exit node.
Restart Connection
  • Next, use command kalitorify -c , To stop transparent proxy through TOR
Stop Transparent

Nipe Introduction

Nipe is a tool, developed for the people who want to work anonymously. By using this tool we can hide our details and our Kali machine will be connected to the TOR network.

Nipe Environment

  • OS: Kali Linux 2019.3 64 bit
  • Kernel-Version: 5.2.0

Nipe Installation Steps

root@kali:/home/iicybersecurity# git clone https://github.com/GouveaHeitor/nipe
 Cloning into 'nipe'...
 remote: Enumerating objects: 45, done.
 remote: Counting objects: 100% (45/45), done.
 remote: Compressing objects: 100% (28/28), done.
 remote: Total 1261 (delta 16), reused 35 (delta 11), pack-reused 1216
 Receiving objects: 100% (1261/1261), 189.49 KiB | 415.00 KiB/s, done.
 Resolving deltas: 100% (667/667), done.
  • Next, use cd command to enter into nipe directory
root@kali:/home/iicybersecurity# cd nipe/
 root@kali:/home/iicybersecurity/nipe#
  • Now, use the command to install all the configuration files, sudo cpan install Switch JSON Config::Simple
root@kali:/home/iicybersecurity/nipe# sudo cpan install Switch JSON Config::Simple
 Loading internal logger. Log::Log4perl recommended for better logging
 Reading '/root/.cpan/Metadata'
   Database was generated on Tue, 17 Mar 2020 05:41:03 GMT
 Fetching with LWP:
 http://www.cpan.org/authors/01mailrc.txt.gz
 Reading '/root/.cpan/sources/authors/01mailrc.txt.gz'
 ............................................................................DONE
 Fetching with LWP:
 http://www.cpan.org/modules/02packages.details.txt.gz
 Reading '/root/.cpan/sources/modules/02packages.details.txt.gz'
   Database was generated on Sat, 28 Mar 2020 04:29:02 GMT
 .............
   New CPAN.pm version (v2.27) available.
   [Currently running version is v2.22]
   You might want to try
     install CPAN
     reload cpan
   to both upgrade CPAN.pm and run the new version without leaving
   the current session.
  
  
 ...............................................................DONE
 ===================================================================================================================================SNIP========================================================================================================================
 Running make install for SHERZODR/Config-Simple-4.58.tar.gz
 Manifying 1 pod document
 Installing /usr/local/share/perl/5.30.0/auto/Config/Simple/FIRSTKEY.al
 Installing /usr/local/share/perl/5.30.0/auto/Config/Simple/autosplit.ix
 Installing /usr/local/share/perl/5.30.0/auto/Config/Simple/dump.al
 Installing /usr/local/share/perl/5.30.0/auto/Config/Simple/param_hash.al
 Installing /usr/local/share/perl/5.30.0/auto/Config/Simple/write_string.al
 Installing /usr/local/share/perl/5.30.0/auto/Config/Simple/import_names.al
 Installing /usr/local/share/perl/5.30.0/auto/Config/Simple/block.al
 Installing /usr/local/share/perl/5.30.0/auto/Config/Simple/FETCH.al
 Installing /usr/local/share/perl/5.30.0/auto/Config/Simple/import_from.al
 Installing /usr/local/share/perl/5.30.0/auto/Config/Simple/STORE.al
 Installing /usr/local/share/perl/5.30.0/auto/Config/Simple/verbose.al
 Installing /usr/local/share/perl/5.30.0/auto/Config/Simple/vars.al
 Installing /usr/local/share/perl/5.30.0/auto/Config/Simple/hashref.al
 Installing /usr/local/share/perl/5.30.0/auto/Config/Simple/TIEHASH.al
 Installing /usr/local/share/perl/5.30.0/auto/Config/Simple/errstr.al
 Installing /usr/local/share/perl/5.30.0/auto/Config/Simple/NEXTKEY.al
 Installing /usr/local/share/perl/5.30.0/auto/Config/Simple/CLEAR.al
 Installing /usr/local/share/perl/5.30.0/auto/Config/Simple/EXISTS.al
 Installing /usr/local/share/perl/5.30.0/auto/Config/Simple/error.al
 Installing /usr/local/share/perl/5.30.0/auto/Config/Simple/DELETE.al
 Installing /usr/local/share/perl/5.30.0/Config/Simple.pm
 Installing /usr/local/man/man3/Config::Simple.3pm
 Appending installation info to /usr/local/lib/x86_64-linux-gnu/perl/5.30.0/perllocal.pod
   SHERZODR/Config-Simple-4.58.tar.gz
   /usr/bin/make install  -- OK 
  • Use this command to install the dependencies, perl nipe.pl install.
 <!--  /* Font Definitions */  @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:0; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:-536869121 1107305727 33554432 0 415 0;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-469750017 -1073732485 9 0 511 0;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin-top:0in; margin-right:0in; margin-bottom:8.0pt; margin-left:0in; line-height:107%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri",sans-serif; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; font-family:"Calibri",sans-serif; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} .MsoPapDefault {mso-style-type:export-only; margin-bottom:8.0pt; line-height:107%;} @page WordSection1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.WordSection1 {page:WordSection1;} --> 
 root@kali:/home/iicybersecurity/nipe# perl nipe.pl install
 Reading package lists... Done
 Building dependency tree Reading state information... Done
 The following packages were automatically installed and are no longer required:
   cython dh-python finger fonts-glyphicons-halflings freeglut3 libglu1-mesa liblinear3 libmng1 libqscintilla2-qt4-l10n libxdot4 python-alembic python-autobahn python-babel
   python-babel-localedata python-backports-abc python-bottle python-cbor python-chameleon python-concurrent.futures python-cssselect python-deprecation python-django python-django-common
   python-editor python-elixir python-filedepot python-flask-babelex python-flask-classful python-flask-login python-flask-mail python-flask-principal python-flask-restless
   python-flask-security python-flask-session python-flask-sqlalchemy python-flaskext.wtf python-formencode python-hupper python-ipy python-lz4 python-marshmallow
   python-marshmallow-sqlalchemy python-mimeparse python-mimerender python-mysqldb python-nplusone python-openid python-packaging python-passlib python-paste python-pastedeploy-tpl
   python-plaster python-png python-psycopg2 python-pydot python-pyparsing python-pyqrcode python-pyquery python-repoze.lru python-scgi python-selenium python-singledispatch python-sip
   python-slugify python-snappy python-speaklater python-sqlalchemy python-sqlalchemy-ext python-sqlalchemy-schemadisplay python-sqlparse python-tempita python-tornado python-tqdm
   python-translationstring python-trie python-trollius python-twisted python-txaio python-tz python-u-msgpack python-ubjson python-unidecode python-venusian python-waitress python-webob
   python-websocket python-wsaccel python-wtforms python-zope.component python-zope.deprecation python-zope.event python-zope.hookable python3-opengl qtchooser qtcore4-l10n rwho rwhod
   x11-apps xsltproc zsh zsh-common
 Use 'sudo apt autoremove' to remove them.
 The following additional packages will be installed:
   libip4tc2 libip6tc2 libnftnl11 libxtables12 netbase
 ============================================================================================================SNIP=================================================================================================================
 Installing new version of config file /etc/services ...
 Setting up iptables (1.8.4-3) ...
 Processing triggers for systemd (241-7) ...
 Processing triggers for man-db (2.8.6.1-1) ...
 Processing triggers for libc-bin (2.29-10) ...
 Scanning processes...
 Scanning candidates...
 Scanning linux images...
 Running kernel seems to be up-to-date.
 Restarting services...
  systemctl restart systemd-journald.service
 Service restarts being deferred:
  systemctl restart systemd-logind.service
 No containers need to be restarted.
 User sessions running outdated binaries:
  Debian-gdm @ user manager service: systemd[584]
  iicybersecurity @ user manager service: systemd[1513]
  root @ user manager service: systemd[1007] 

Nipe Tool Execution Steps

  • Use command to view the tool options  perl nipe.pl
root@kali:/home/iicybersecurity/nipe# perl nipe.pl
 Core Commands
Command       Description                                                      -------       -----------                                                  install       Install dependencies                                          start         Start routing                                                stop          Stop routing                                                  restart       Restart the Nipe process                                     status        See status
  • Now, use this command to start the services, perl nipe.pl start.
root@kali:/home/iicybersecurity/nipe# perl nipe.pl start
 root@kali:/home/iicybersecurity/nipe#
  • Now, use this command to view the status of nipe services, Perl nipe.pl status
root@kali:/home/iicybersecurity/nipe# perl nipe.pl status
 [+] Status: activated.
 [+] Ip: 209.141.45.189
  • Now, open the search engine and type ifconfig.me. This will displays browser details and TOR exit details.
Ifconf.me
  • Next, use command to restart the services perl nipe.pl restart
root@kali:/home/iicybersecurity/nipe# perl nipe.pl restart
 root@kali:/home/iicybersecurity/nipe# perl nipe.pl status
 [+] Status: activated.
 [+] Ip: 185.220.101.28
  • Now, use this command to stop the services perl nipe.pl stop and check the status of the services.
root@kali:/home/iicybersecurity/nipe# perl nipe.pl stop
 root@kali:/home/iicybersecurity/nipe# perl nipe.pl status
 [+] Status: disabled.
 [+] Ip: 112.196.159.40

Conclusion

Kalitorify and Nipe are the best tools to hide from outside world and to be safe on the internet by sending the outgoing traffic via TOR network.