Giter Site home page Giter Site logo

susmithkrishnan / torghost Goto Github PK

View Code? Open in Web Editor NEW
842.0 55.0 278.0 71 KB

TorGhost is an anonymization script. TorGhost redirects all internet traffic through SOCKS5 tor proxy. DNS requests are also redirected via tor, thus preventing DNSLeak. The scripts also disables unsafe packets exiting the system. Some packets like ping request can compromise your identity.

License: GNU General Public License v3.0

Python 90.65% Shell 9.35%

torghost's Introduction

What is TorGhost ?

TorGhost is an anonymization script. TorGhost redirects all internet traffic through SOCKS5 tor proxy. DNS requests are also redirected via tor, thus preventing DNSLeak. The scripts also disables unsafe packets exiting the system. Some packets like ping request can compromise your identity.

Build and install from source

git clone https://github.com/SusmithKrishnan/torghost.git

cd torghost

chmod +x build.sh

./build.sh

How to install ?

New kali update is causing permission error, please build and install from source

TorGhost can be installed by downloading the latest release using debian package manager

Download

wget -c https://github.com/SusmithKrishnan/torghost/releases/download/v3.0.2/torghost-3.0.2-amd64.deb

In the downloaded folder use dpkg to install

sudo dpkg -i torghost-*-amd64.deb

Alternate method (support for previous install script)

The install.sh script also does the same. Its for users following old tutorials.

git clone https://github.com/SusmithKrishnan/torghost.git

cd torghost

chmod +x install.sh

./install.sh

Usage

Torghost v3.0 usage:

-s --start Start Torghost

-r --switch Request new tor exit node

-x --stop Stop Torghost

-h --help Print this help and exit

-u --update Checks for updates

torghost's People

Contributors

bgoncharuck avatar dennisfeldbusch avatar fds546431251 avatar gmkbenjamin avatar kranercc avatar nandandesai avatar nautilus567 avatar susmithkrishnan avatar wantafanta avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

torghost's Issues

error again :(

i installed stem but i still get the error
Traceback (most recent call last):
File "/usr/bin/torghost", line 9, in
from stem import Signal
ImportError: No module named stem

Job for tor.service failed. See 'systemctl status tor.service' and 'journalctl -xn' for details.

-OS : Linux $user 4.0.0-kali1-amd64 #1 SMP Debian 4.0.4-1+kali2 (2015-06-03) x86_64 GNU/Linux
-Issue : Can't connect to Tor Service.
Returns this Error while starting TorGhost.

[22:54:27] Torrc file already configured
[22:54:27] Configuring DNS resolv.conf file.. [done]
Job for tor.service failed. See 'systemctl status tor.service' and 'journalctl -xn' for details.
[22:54:27] Starting tor service.. [done]
[22:54:27] setting up iptables rules [done]
[22:54:27] Fetching current IP...
[22:54:27] CURRENT IP :

Also, It returns DNS Error in Browser.

Even I tried removing TorGhost. Still not Resolved.

Error message

root@kali:~/Desktop/torghost# torghost start
Traceback (most recent call last):
File "/usr/bin/torghost", line 9, in
from stem import Signal
ImportError: No module named stem

Any fix?

Thanks

No module named stem

HI guys!
have an issue when start torghost:

torghost start Traceback (most recent call last): File "/usr/bin/torghost", line 9, in <module> from stem import Signal ImportError: No module named stem

how can I fix it?

Can't install it on Mac

Hi there,

it doesn't install on Mac. Please see below transcript from terminal.

me:torghost-master y0d$ chmod +x install.sh
me:torghost-master y0d$ ./install.sh

******* Torghost installer ********

=====> Installing tor bundle
Password:
sudo: apt-get: command not found
=====> Installing dependencies
The directory '/Users/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting stem
Downloading stem-1.6.0.tar.gz (2.0MB)
100% |████████████████████████████████| 2.1MB 592kB/s
Installing collected packages: stem
Running setup.py install for stem ... done
Successfully installed stem-1.6.0
=====> Installing TorGhost
cp: /usr/bin/torghost: Operation not permitted
chmod: /usr/bin/torghost: No such file or directory
=====> Done
=====> Open terminal and type 'torghost' for usage
me:torghost-master y0d$ torghost
-bash: torghost: command not found
me:torghost-master me$ torghost start
-bash: torghost: command not found
me:torghost-master me$

arm64 not supported

dpkg: error processing archive torghost_3.0_amd64.deb (--install):
package architecture (amd64) does not match system (arm64)
Errors were encountered while processing:
torghost_3.0_amd64.deb
done

API integration issues

I've written a wrapper that implements torghost as a systemd service and ... (sigh) .. torghost is very unstable; it breaks more often than it works. One would expect certain things to be simple; like if it's not running and you tell it to stop, it should just not do anything, maybe even exit(0) immediately .... but no, apparently it needs to hang indefinitely for some reason.

  • when it's not running and you tell it to stop .. it hangs
  • when it's running and you tell it to start .. it either starts (again) or .. hangs
  • when it's running and you tell it to switch .. it either switches (in due time) or .. hangs
  • when it's not running and you tell it to switch .. it hangs
  • when it's not running and you tell it to start, it either hangs or starts (in due time)

.. we need to talk

Bridging

Hi,

How am I able to bridge through TorGhost?

Regards,
Jet

Torghost + WiFi AP?

If I setup my raspberry pi to be an access point and then install Torghost will my AP be going through tor.

no internet connection upon start

when I start torghost it fetches, and reads current ip is blank. and no internet connection at all. i stop torghost and it displays the proper IP and network is back.

Error in torghost start in manjaro

hi
i download torghost and install it. but i have problem in start it with this error

File "/usr/bin/torghost", line 30
print ""
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("")?

JSON Decode Error

App no longer starts - model change?

Traceback (most recent call last):
File "torghost.py", line 238, in
File "torghost.py", line 226, in main
File "torghost.py", line 104, in start_torghost
IOError: [Errno 13] Permission denied: '/etc/tor/torghostrc'
[10262] Failed to execute script torghost

Error: version `GLIBC_2.29' not found

Installed tor.
Installed torghost.
Running command torghost -s will result:
[27338] Error loading Python lib '/usr/share/torghost/libpython2.7.so.1.0': dlopen: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /usr/share/torghost/libpython2.7.so.1.0)

I could not find the solution in previous issues.

Lock Problem

E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
every time i try to install torghost, this is what it says..plz help

Connect torghost via bridge

tor is censored in my country.

how can i force torghost use BridgeDB IPs?

or enter manually the bridge IP that i know.

torghost error

Traceback (most recent call last):
File "/usr/bin/torghost", line 9, in
from stem import Signal
ImportError: No module named stem

How can I solve this issue....???

apt-get install tor already updated........

Stuck on Fetching current IP...

when running, it gets stuck on Fetching current IP...
I think the tor relays some how is blocked, I am in saudi arabia, they do that
is there any solution?

[3491] Failed to execute script pyi_rth_multiprocessing

File "PyInstaller/loader/rthooks/pyi_rth_multiprocessing.py", line 72, in <module> File "/tmp/pip-install-3QUnwZ/PyInstaller/PyInstaller/loader/pyimod03_importers.py", line 391, in load_module File "multiprocessing/__init__.py", line 84, in <module> ImportError: No module named _multiprocessing [3491] Failed to execute script pyi_rth_multiprocessing
I try to install on Kali and it give me this issue.

Fetching IP Address Constantly

Whenever I run sudo torghost start it gets stuck at Fetching current IP but for some reason when I run sudo torghost stop it fetches the ip fairly quickly

Issue when Fetching current IP

torghost -s
[08:36:43] Always check for updates using -u option [08:36:44] Torrc file already configured
[08:36:44] Configuring DNS resolv.conf file.. [done]
[08:36:44] Stopping tor service [done]
[08:36:44] Starting new tor daemon [done]
[08:36:44] setting up iptables rules [done]
[08:36:44] Fetching current IP...
[08:36:44] CURRENT IP :




<title>Application Error</title>
<style media="screen">
html,body,iframe {
margin: 0;
padding: 0;
}
html,body {
height: 100%;
overflow: hidden;
}
iframe {
width: 100%;
height: 100%;
border: 0;
}
</style>


<iframe src="//www.herokucdn.com/error-pages/application-error.html"></iframe>

Also after rebooting my OS I have no internet at all. (messed up my DNS?) I have to restart torghost just to get back online.

Can't Fetching IP

hi, i use kali linux 2019.4 x64 and installed torghost 3.0
i can connect to tor (with bridge) but torghost can't

torghost can't fetching ip.
does it because relay ips are censored in my country and torghost try to connect relay?

? how can i force torghost to use bridge????

Error Torghost v2.0 in Kali Linux

[00:48:19] Torrc file already configured
[00:48:19] Configuring DNS resolv.conf file.. [done]
[00:48:19] Starting tor service.. [done]
[00:48:20] setting up iptables rules [done]
[00:48:20] Fetching current IP...
[00:48:20] CURRENT IP :

Server not found

Firefox can’t find the server at www.google.com.br.

torghost switch
[00:49:23] Please wait...
[00:49:30] Requesting new circuit...
Traceback (most recent call last):
File "/usr/bin/torghost", line 188, in
switch_tor()
File "/usr/bin/torghost", line 169, in switch_tor
with Controller.from_port(port = 9051) as controller:
File "/usr/local/lib/python2.7/dist-packages/stem/control.py", line 1026, in from_port
control_port = stem.socket.ControlPort(address, port)
File "/usr/local/lib/python2.7/dist-packages/stem/socket.py", line 376, in init
self.connect()
File "/usr/local/lib/python2.7/dist-packages/stem/socket.py", line 247, in connect
self._socket = self._make_socket()
File "/usr/local/lib/python2.7/dist-packages/stem/socket.py", line 405, in _make_socket
raise stem.SocketError(exc)
stem.SocketError: [Errno 111] Connection refused

[3644] Error loading Python lib

I've had torghost run 1 time without issue but now I get ;

[3644] Error loading Python lib '/usr/bin/libpython2.7.so.1.0': dlopen: /usr/bin/libpython2.7.so.1.0: cannot open shared object file: No such file or directory

I have also tried reinstalling using all 3 mothods provided. Any ideas what is wrong?

Warning : leaks when using Nessus

@SusmithKrishnan Hi,
I am having leak issues when running a scan with Nessus : wireshark shows that the packets go directly to the target without passing through tor guard ip.It seems Nessus is able to bypass iptables.

Traceback

Traceback (most recent call last):
File “/usr/bin/torghost”, line 183, in
start_torghost()
File “/usr/bin/torghost”, line 95, in start_torghost
if TorrcCfgString in open(Torrc).read():
IOError: [Errno 2] No such file or directory: ‘/etc/tor/torrc’

Please help

libpython 2.7 and GLIBC 2.29

Hi!
while torghost runs smoothly on Kali (except for the small ip retrieving problem), this is what happens on Ubuntu 18.04.4 server:

root@ubuntu:~/git/torghost# torghost -s
[31690] Error loading Python lib '/usr/share/torghost/libpython2.7.so.1.0': dlopen: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /usr/share/torghost/libpython2.7.so.1.0)

tried installing *.deb package but problem remains the same.
Thank-you!

NameError: global name 'urllib2' is not defined

i have this msg

Traceback (most recent call last):
File "/usr/bin/torghost", line 164, in
start_torghost()
File "/usr/bin/torghost", line 135, in start_torghost
print t()+" CURRENT IP : "+bcolors.GREEN+ip()+bcolors.ENDC
File "/usr/bin/torghost", line 65, in ip
except urllib2.URLError:

...but its run good.

wont start

root@anonymous-device:~/Desktop/Git/torghost# torghost
Traceback (most recent call last):
File "/usr/bin/torghost", line 9, in
from stem import Signal
ImportError: No module named stem

switch never timeouts

When sending the Signal.NEWNYM to the controller, the command never timeouts and can get stuck forever.

Also, probably would be safer to check is_newnym_available before sending the signal, and just quit otherwise.

traceback error FIXED AND IP error

i know how to solve the problem for the trace back error you have to type this in sudo apt-get install tor -y

and with ip error when it does not work if have to cep typing torghost start until it gives you a ip do it 15 times to see if that works

Torghost on Debian ?

Hello,

I would like to put my connection under Debian Stretch 9 Tor, Torghost starts but I have nothing that goes through the Internet.

Is there a way to transform its file to make it work under Debian? Kali is based on Debian.

Best regards, James

When I try to run torghost ImportError: No module named stem

when I try to run Pip install stem

Traceback (most recent call last): File "/usr/bin/pip", line 9, in <module> load_entry_point('pip==1.5.6', 'console_scripts', 'pip')() File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 572, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2752, in load_entry_point return ep.load() File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2405, in load return self.resolve() File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2411, in resolve module = __import__(self.module_name, fromlist=['__name__'], level=0) File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 74, in <module> from pip.vcs import git, mercurial, subversion, bazaar # noqa File "/usr/lib/python2.7/dist-packages/pip/vcs/mercurial.py", line 9, in <module> from pip.download import path_to_url File "/usr/lib/python2.7/dist-packages/pip/download.py", line 25, in <module> from requests.compat import IncompleteRead ImportError: cannot import name IncompleteRead

can be use it with metasploit or empire?

I was checking your website and i saw a post about backdoor factory, and i remembered that Josh Pitts, the autor of BDF made a post about using tor and empire, so i was asking myself, Is it possible use torghost with metasploit or empire and how this can be done?

Or can you point me the right direction in this particular topic?

Torghost over VPN

Hi,
I connect to VPN first and then I start torghost on my linux machine but when I do that the internet stops working. Is it not compatible with vpn?

Error torghost not working

root@kaali:~# torghost --start
[14:26:00] Checking for update...
Traceback (most recent call last):
File "torghost.py", line 232, in
File "torghost.py", line 222, in main
File "torghost.py", line 107, in start_torghost
File "torghost.py", line 202, in check_update
File "dist-packages/requests/models.py", line 897, in json
File "dist-packages/simplejson/init.py", line 518, in loads
File "dist-packages/simplejson/decoder.py", line 370, in decode
File "dist-packages/simplejson/decoder.py", line 400, in raw_decode
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
[5597] Failed to execute script torghost

Randomly starts on Debian Jessie, 100% CPU utilization

As per title, top command randomly reports a 'tor' process in my laptop that uses up to 100% of CPU.
This is several reboots after the last use of torghost.
Torghost has been cleanly stopped via command line (torghost stop) last time it was used.

Mac--Request for Password for Tor Bundle Instalation

Hi guys,

I followed the steps of the installation and while running ./install.sh I got an error asking for the password for tor bundle. Therefore I need that password in order to complete the installation.

I am using the tor on a Mac/OS system and therefore I need help for this installation.

Cheers,
IonutC

Some network commands like ping, traceroute fail

Some network related commands fail when torghost is active. However, when using without active torghost or routing traffic through tor using proxychains the commands run without issues.

Examples below:

$ ping www.google.com
PING www.google.com (216.58.212.196) 56(84) bytes of data.
From 192.168.1.117 (192.168.1.117) icmp_seq=1 Destination Port Unreachable
ping: sendmsg: Operation not permitted
From 192.168.1.117 (192.168.1.117) icmp_seq=2 Destination Port Unreachable
ping: sendmsg: Operation not permitted
From 192.168.1.117 (192.168.1.117) icmp_seq=3 Destination Port Unreachable
ping: sendmsg: Operation not permitted
^C
--- www.google.com ping statistics ---
3 packets transmitted, 0 received, +3 errors, 100% packet loss, time 2014ms

$ traceroute www.google.com
traceroute to www.google.com (216.58.212.196), 30 hops max, 60 byte packets
send: Operation not permitted

I suspect this may have something to do with the iptables commands in the torghost script?

Since these commands work fine through tor when used with proxychains, I guess the issue lies within torghost rather than icmp traffic not going through tor?

Also nmap fails similarly since it uses ping and traceroute.

Just some thoughts behind my reasoning, please correct and pardon me if I may be wrong. I am just a novice student.

update and start error

sudo torghost -s
[03:11:53] Checking for update...
Traceback (most recent call last):
File "torghost.py", line 232, in
check_update()
File "torghost.py", line 222, in main
for (o, a) in opts:
File "torghost.py", line 107, in start_torghost
print bcolors.GREEN + '[done]' + bcolors.ENDC
File "torghost.py", line 202, in check_update
if choice in yes:
File "dist-packages/requests/models.py", line 897, in json
File "dist-packages/simplejson/init.py", line 518, in loads
File "dist-packages/simplejson/decoder.py", line 370, in decode
File "dist-packages/simplejson/decoder.py", line 400, in raw_decode
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
[2113] Failed to execute script torghost

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.