Thursday, January 7, 2016

Evade monitoring by IP spoofing in Kali Linux with torsocks

http://www.blackmoreops.com/2015/12/28/ip-spoofing-in-kali-linux-with-torsocks

torsocks allows you to use most applications in a safe way with TOR. It ensures that DNS requests are handled safely and explicitly rejects any traffic other than TCP from the application you’re using. In this post we will cover IP spoofing in Kali Linux with torsocks which will allow users to connect to certain services that is banned to them. torsocks is an ELF shared library that is loaded before all others. The library overrides every needed Internet communication libc function calls such as connect() or gethostbyname().
This process is transparent to the user and if torsocks detects any communication that can’t go through the Tor network such as UDP traffic, for instance, the connection is denied. If, for any reason, there is no way for torsocks to provide the Tor anonymity guarantee to your application, torsocks will force the application to quit and stop everything.  In this article I will guide you to IP spoofing in Kali using torsocks.
Many applications do not directly support the use of SOCKS proxy. torsocks enables such applications to use the tor SOCKS proxy.
Shell wrapper to simplify the use of the torsocks library to transparently allow an application to use a SOCKS proxy.

Installation

torsocks gets installed along with the tor package on Kali Linux or Ubuntu for example:
root@kali:~# apt-get install tor
(or)
user@ubuntu:~$ apt-get install tor
IP spoofing in Kali Linux with torsocks - blackMORE Ops - 1

Building from source code

Requirements

  • autoconf
  • automake
  • libtool
  • gcc

Installation

./configure
make
sudo make install
If you are compiling it from the git repository, run ./autogen.sh before the configure script.

Using torsocks

Now all network connections s made by the telnet programs shall be routed through the tor proxy. There was many ways to get Public IP from Linux Terminal. To see the proxy effect try opening the the URL http://icanhazip.com/ through curl. The URL echos the public IP of the requesting user. Without proxy it would look something like this:
root@kali:~# curl icanhazip.com
123.123.93.36
root@kali:~#
IP spoofing in Kali Linux with torsocks - blackMORE Ops - 2
That means my Public IP address is 123.123.93.36. Now using it with torsocks.
root@kali:~# torsocks curl icanhazip.com
[Dec 28 20:20:26] PERROR torsocks[2979]: socks5 libc connect: Connection refused (in socks5_connect() at socks5.c:185)
curl: (6) Could not resolve host: icanhazip.com
root@kali:~#
Opps, that just means I forgot to start tor service. Start tor application using the following command:
root@kali:~# service tor start
root@kali:~#
Now try again:
root@kali:~# torsocks curl icanhazip.com
197.231.221.211
root@kali:~# 
IP spoofing in Kali Linux with torsocks - blackMORE Ops - 3
Sweet as, now my Public IP changed to 197.231.221.211 because the URL was opened through the TOR proxy.
You should be able to use different application via torsocks using the following command:
root@kali:~# torsocks [application]
For example we want to use telnet and ssh command to connect through a SOCKS proxy. This can be done by wrapping the telnet command with torify/usewithtor.
root@kali:~# torsocks ssh username@some.ssh.com
root@kali:~# torify telnet google.com 80
root@kali:~# usewithtor telnet google.com 80
root@kali:~# torsocks iceweasel
For more details, please see the torsocks.1, torsocks.8 and torsocks.conf.5 man pages. Also, you can use -h, --help for all the possible options of the torsocks script.
A configuration file named torsocks.conf is also provided for the user to control some parameters.
You can also use the torsocks library without the script provided:
LD_PRELOAD=/full/path/to/libtorsocks.so your_app

Security

The tables below list applications that usewithtor /torsocks will send through Tor. At the moment a 100% guarantee of safe interoperability with Tor can only be given for a few of them. This is because the operation of the applications and the data they transmit has not been fully researched, so it is possible that a given application can leak user/system data at a level that neither Tor nor torsocks can control.
The following administrative applications are known to be compatible with usewithtor:
Application100% SafeDNSComments
sshMYPotential for identity leaks through login.
telnetMYPotential for identity leaks through login and password.
svnMY
gpgMYgpg --refresh-keys works well enough.
The following messaging applications are known to be compatible with usewithtor:
Application100% SafeDNSComments
pidginMYPotential for identity leaks through login and password.
kopeteMYPotential for identity leaks through login and password.
konversationMYPotential for identity leaks through login and password.
irssiMYPotential for identity leaks through login and password.
silcMYPotential for identity leaks through login and password.
The following email applications are known to be compatible with usewithtor:
Application100% SafeDNSComments
claws-mail**Use TorBirdy (Tor Button for Thunderbird) instead!
thunderbird**Use TorBirdy (Tor Button for Thunderbird) instead!
The following file transfer applications are known to be compatible with usewithtor:
Application100% SafeDNSComments
wgetNNProbable identity leaks through http headers. Leaks DNS and connects directly in certain cases when used with polipo and torsocks. http://pastebin.com/iTHbjfqM http://pastebin.com/akbRifQX
ftpMYPassive mode works well generally.
Table legend:
DNS: DNS requests safe for Tor?
           N - The application is known to leak DNS requests when used with torsocks.
           Y - Testing has shown that application does not leak DNS requests.
100% Safe: Fully verified to have no interoperability issues with Tor?
           N - Anonymity issues suspected, see comments column.
           M - Safe enough in theory, but either not fully researched or anonymity can be compromised 
               through indiscreet use (e.g. email address, login, passwords).
           Y - Application has been researched and documented to be safe with Tor.
Check the project homepage to find out what applications work well with torsocks . For example pidgin works with torsocks . Just launch it with the usewithtor command
usewithtor pidgin

Conclusion

TOR or torsocks is free, somewhat secure, allows you to bypass proxies, Firewall, monitoring and content filtering. Though, it can be natively blocked in Firewalls and Proxies. Its sometime is slow and sometime is not that secure you’d think. If you find that using torsocks or tor is just too slow for you, then you can always use VPN services like PrivateInternetAccess which is deemed one of the best and most secured. Find a great and lengthy article on setting up VPN services which I recommend for serious users.
Users from Iran, Pakistan, Egypt, China, Bangladesh, North Korea etc. where content filtering is done in National Level maybe it’s a way to get the voice out. I do not want to discuss the legality of that and will leave that to you. Using proxy is another way for spoofing IP addresses.
On a similar note, I’ve previously covered issues where you can DoS using spoofed IP Address, install and use TOR, creating hidden services in TOR like DarkNet or SilkRoad etc.

References

  1. https://trac.torproject.org/projects/tor/wiki/doc/torsocks
  2. https://github.com/dgoulet/torsocks

Sunday, January 3, 2016

OS.js Is A New Javascript Based Open Source Operating System Running In Your Browser

http://fossbytes.com/os-js-is-a-new-open-source-javascript-based-operating-system-running-on-your-browser

os.js javascript browser open source
Image | fossBytes
Short Bytes: OS.js is a free and open source operating system that runs in your web browser. Based on Javascript, this operating system comes with a fully-fledged window manager, ability to install applications, access to virtual filesystems and a lot more. Read more to know about the OS in detail.
Did you ever wish to use an operating system that ran just like a website inside your web browser? OS.js, a JavaScript-based open source operating system designed for the cloud, is here to provide you this facility.
On its website, OS.js describes itself as a Javascript web desktop implementation for you browser. As a preconceived notion, you might assume that a browser-based operating system won’t be of any use as it would lack some basic functionalities. However, OS.js is here to surprise you. This browser-based OS comes with a fully-fledged window manager, GUI toolkits, filesystem abstraction, and Application APIs.
The simple and neat homepage of the operating system has many complex things going in the backyard. Using drag and drop, multitasking is a smooth process.
OS.js comes with a range of applications to help you write, paint, listen to music and watch videos, play a couple of games, use the calculator, and write emails. Adding new applications through repositories is always an option in OS.js with extra applications like PDF viewer, XMPP Chat, Google Mail, Google Contacts, Tetris, and Wolfenstein3D.
os.js open source javascript os
Oh, and also it just takes 3-4 seconds to load.
OS.js is completely free and open source. This means you can add your own contributions and customize it according to your need.  Using the Virtual Filesystem, uploading, downloading, and modifying files using Google Drive, Dropbox, and OneDrive is made possible. The operating system also comes with support for Google API Javascript, and Windows Live API.
Watch the demo video below:
This operating system works in any modern browser and all platforms.
To know more about the OS and for using it right now, visit their website – OS.js

HowTo: Speedup ping and traceroute Command Responses under Linux / Unix

http://www.cyberciti.biz/faq/unix-linux-bsd-appleosx-speedup-ping-traceroute-command-probs

The following question was asked in the Unix networking exam:

     How do you speed up ping and traceroute command responses under Unix or Linux operating systems?
How can I speed up my ping or traceroute commands on a Linux?

The ping command line utility act as a computer network tool. It used to test whether a particular host is reachable across an IP network. The traceroute command also act as a computer network diagnostic tool for displaying the route (path) and measuring transit delays of packets across an Internet Protocol (IP) network.

Speedup ping command

The syntax is:
 
ping -n -W VALUE -i VALUE host
 
Where,
  1. -n : Disable DNS lookup to speed up queries.
  2. -W NUMBER : Time to wait for a response, in seconds. The option affects only timeout in absense of any responses, otherwise ping waits for two RTTs.
  3. -i SECONDS : Wait interval seconds between sending each packet. The default is to wait for one second between each packet normally, or not to wait in flood mode. Only super-user may set interval to values less 0.2 seconds.
The default command will produce output as follows:
$ ping -c 5 www.cyberciti.biz
Sample outputs:
PING www.cyberciti.biz (75.126.153.206) 56(84) bytes of data.
64 bytes from www.cyberciti.biz (75.126.153.206): icmp_req=1 ttl=55 time=293 ms
64 bytes from www.cyberciti.biz (75.126.153.206): icmp_req=2 ttl=55 time=295 ms
64 bytes from www.cyberciti.biz (75.126.153.206): icmp_req=3 ttl=55 time=293 ms
64 bytes from www.cyberciti.biz (75.126.153.206): icmp_req=4 ttl=55 time=294 ms
64 bytes from www.cyberciti.biz (75.126.153.206): icmp_req=5 ttl=55 time=294 ms
--- www.cyberciti.biz ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4005ms
rtt min/avg/max/mdev = 293.571/294.170/295.158/0.869 ms
Now optimize the ping command:
$ ping -c 5 -n -i 0.2 -W1 www.cyberciti.biz
Sample outputs:
PING www.cyberciti.biz (75.126.153.206) 56(84) bytes of data.
64 bytes from 75.126.153.206: icmp_req=1 ttl=55 time=293 ms
64 bytes from 75.126.153.206: icmp_req=2 ttl=55 time=294 ms
64 bytes from 75.126.153.206: icmp_req=3 ttl=55 time=293 ms
64 bytes from 75.126.153.206: icmp_req=4 ttl=55 time=293 ms
64 bytes from 75.126.153.206: icmp_req=5 ttl=55 time=294 ms
--- www.cyberciti.biz ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 810ms
rtt min/avg/max/mdev = 293.279/293.955/294.522/0.799 ms, pipe 2
Here is another output showing the difference between two command line options:
Fig.01: Unix and Linux speedup ping command
Fig.01: Unix and Linux speedup ping command

Speedup traceroute command

The syntax is:
 
traceroute -n -w SECONDS -q NUMBER host
 
Where,
  1. -n : Disable DNS lookup to speed up queries.
  2. -w seconds : Set the time (in seconds) to wait for a response to a probe (default 5.0 sec).
  3. -q NUMBER : Sets the number of probe packets per hop. The default is 3.
The following example will wailt 3 seconds (instead of 5), only send out 1 query to each hop (ineader of 3):
$ traceroute -n -w 3 -q 1 www.cyberciti.biz
The -N option specifies the number of probe packets sent out simultaneously. Sending several probes concurrently can speed up traceroute considerably. The default value is 16:
$ traceroute -n -w 3 -q 1 -N 32 www.cyberciti.biz
Please Note that some routers and hosts can use ICMP rate throttling. In such a situation specifying too large number can lead to loss of some responses. You can also limit the maximum number of hops to 16 before giving up (instead of default 30) using the -m option:
$ traceroute -n -w 3 -q 1 -N 32 -m 16 www.cyberciti.biz
Sample outputs:
Fig.02: Unix and Linux speedup traceroute command
Fig.02: Unix and Linux speedup traceroute command
References: