Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - spark

Pages: [1] 2
1
Anonymity and Privacy / Re: SSH Tunneling still relevant?
« on: October 08, 2013, 10:50:28 pm »
If by obfuscation you mean white-box cryptography, i don't know if this is the appropriate solution since obfuscation is meant to hide the decryption key even from the legitimate user.

2
Anonymity and Privacy / Re: SSH Tunneling still relevant?
« on: October 08, 2013, 10:00:46 pm »
if we suppose that RSA 1024 is no more reliable as well as ssh tunnels. How would ssh tunneling through http proxies improves encryption ?

3
Anonymity and Privacy / Re: Get traffic out of the tunnel
« on: September 20, 2013, 08:36:41 pm »
Thx for the feedback  :D

4
Anonymity and Privacy / Get traffic out of the tunnel
« on: September 19, 2013, 12:27:29 am »
Hi everyone
I have followed EZ for quite a while now and i have been mostly a spectator.
So now that i can afford more free time, i hope i can be more active/productive and contribute to the development of this lovely community.
Sorry for my bad English, am not a native speaker.

Introduction
This topic deals with openvpn tunneling and how one may want to do some online tasks out of the tunnel, this have occurred to me and wanted to share the idea with you and get some feedback.
When using a vpn connection all the traffic goes through the vpn tunnel which is great to prevent leaks. But on the other hand it is not cautious to use the same connection to do the bad guy and then connect to your twitter or gmail account. Anything related to your true identity should go out of the tunnel.
First idea that comes to mind is setting multiple vpn connections but many people who have tried this, have stumbled on issues with packets being redirected to the wrong vpn.
Although one way to maintain different connections is to use vpn in Virtual Machines, i think that it is not interesting to  start a VM for the sole purpose of running Firefox and checking personal stuff.
So here is a workaround that involves linux routing and this works with layer 3 tunneling using openvpn.

Openvpn tunneling
Actually what openvpn does to establish layer 3 tunneling is creating a virtual-network device TUN, then all packets sent by the system to the vpn server go through the TUN device.
The TUN interface provides packet reception and transmission for user space programs. It can be viewed as a simple Point-to-Point or Ethernet device, which instead of receiving packets from a physical media, receives them from user space program and instead of sending packets via physical media writes them to the user space program.[learn more]

Network interfaces before and after tunnel creation:
Code: [Select]
$ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: wlp8s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT qlen 1000
    link/ether 02:09:90:02:ad:c5 brd ff:ff:ff:ff:ff:ff
Code: [Select]
$ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: wlp8s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT qlen 1000
    link/ether 02:09:90:02:ad:c5 brd ff:ff:ff:ff:ff:ff
6: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN mode DEFAULT qlen 100
    link/none

Network routes before and after tunnel creation:
Code: [Select]
$ip route show
default via 192.168.1.1 dev wlp8s0  proto static
192.168.1.0/24 dev wlp8s0  proto kernel  scope link  src 192.168.1.10  metric 9
Code: [Select]
$ip route show
default via 10.10.36.97 dev tun0  proto static
10.10.0.1 via 10.10.36.97 dev tun0  proto static
10.10.36.97 dev tun0  proto kernel  scope link  src 10.10.36.98
151.0.49.13 via 192.168.1.1 dev wlp8s0  proto static
192.168.1.0/24 dev wlp8s0  proto kernel  scope link  src 192.168.1.10  metric 9

As indicated in the last routes listing, after tunnel creation all the traffic goes through the tunnel gateway"10.10.36.97" (accessible through the TUN interface), so in order to get the job done we should redirect certain packets (twitter, gmail,..) back to the normal gateway "192.168.1.1" (accessible through the wireless interface wlp8s0).
Now this is the delicate part, how are we gonna route specific packets through a different path?

Packets routing
This can be done by configuring linux routing policy. In fact, the default behavior is sending all packets through the default gateway which in this case is the tunnel gateway. What we can do is adding a new rule stating that packets having a certain criteria will take a different path. The simplest criteria would be the source address. Normally, the source address is only selected at the network layer but application may as well select the source address explicitly with bind().
Finally two types of packets will hit the network layer, the default ones with no source address explicitly selected that will go through the default configured gateway (which is the tunnel since vpn connection is on) and the others ones, with explicitly selected source address at application layer, will take a different path.

Now let's translate this into linux commands:
1/
First we're going to create a new routing table "offTunnel" which will be used to route packets out of the tunnel. It's simply a copy of the main routing table before the vpn connection was enabled.
Code: [Select]
# echo 200 offTunnel >>  /etc/iproute2/rt_tables
# ip route add table offTunnel 192.168.1.0/24 dev wlp8s0  proto kernel  scope link  src 192.168.1.10  metric 9
# ip route add table offTunnel default via 192.168.1.1 dev wlp8s0  proto static
# ip route show table offTunnel
default via 192.168.1.1 dev wlp8s0  proto static
192.168.1.0/24 dev wlp8s0  proto kernel  scope link  src 192.168.1.10  metric 9
2/
Now we're going to add the policy routing rule which states that packets with explicitly selected source address at application layer, will be routed using the "offTunnel" routing table in order to reach the internet gateway without getting through the TUN device.
Code: [Select]
# ip rule add from 192.168.1.10 lookup offTunnel
# ip rule show
0:    from all lookup local
32765:    from 192.168.1.10 lookup offTunnel
32766:    from all lookup main
32767:    from all lookup default
"192.168.1.10" is the ip of the wifi interface (with internet connection).
3/
The last thing to do is to start the involved application or process and explicitly select the source address of its packets. But generally, end-user programs, with few exceptions like ping (-I param), do not provide  this option.
So the trick is to use LD_PRELOAD variable to hijack the bind() function used by the program.
Here is a nice code snippet that makes this possible: Binding application to specific ip, and that i used next.
Code: [Select]
$ BIND_ADDR="192.168.1.10" LD_PRELOAD=./bind.so firefox -no-remote
BIND_ADDR : the source ip address and should be the ip assigned  to a network interface with internet connection.
LD_PRELOAD: library containing the alternative bind() function.
firefox -no-remote: starting a new instance of firefox (supposing that there already is an instance of firefox running)

Finally, we have two firefox instances, one with traffic going through vpn connection (private and anonymous navigation) and the second one not using tunneling. If We check the ip online, we will find different addresses.

Conclusion
Well.. that was a little bit too longer than what i expected. Just some details that i could not have skipped.Anyway, i think that once those commands are assimilated and scripted this will make the transition between the two connections easy and practical.
Hope that this can be useful for you.

5
News and Announcements / Re: EvilZine issue 1; 2013.04.05
« on: April 08, 2013, 04:34:41 pm »
Great job, thank you guys

6
Hacking and Security / Re: Strange results with nmap ping scan
« on: September 23, 2012, 06:36:50 pm »
Thank you for your help, the problem was the with the virtualbox networking configuration
seems that when it is set to NAT (defualt) , The VirtualBox NAT device reset the connection for some reason..

7
Hacking and Security / Re: Strange results with nmap ping scan
« on: September 19, 2012, 05:28:30 pm »
Already 28 views and not an answer yet..  ::)
well it is either  a noob question  ;D , or a vague one..
Anyone to give a feedback in both cases?

8
Hacking and Security / Strange results with nmap ping scan
« on: September 18, 2012, 06:29:19 pm »
Hi everyone

I have performed a ping scan with nmap from backtrack5 under virtualbox 4.1.10, and it shows all hosts in request as up!



and trying the same thing with Fedora, i get a correct result:



anyone can help and tell me from where i get the spoofed RST packages (in bt5) when the host i not up?

In both cases i use nmap version 6.01

EDIT: Fedora is the host OS

9
Operating System / Re: Video card problems on Fedora
« on: September 17, 2012, 04:01:36 am »
no catalyst packages?  (egrep -i "kernel|catalyst")

otherwise consider downgrading to F16  ;D , works like a charm for me

10
Anonymity and Privacy / Re: Tor project
« on: September 17, 2012, 03:47:56 am »
Ok then i think i should only keep this for accessing country-specific content, hiding address and anything else than malicious activities

11
Anonymity and Privacy / Re: Tor project
« on: September 17, 2012, 03:18:48 am »
Hi
i have a question about Tor and i thought it would be better to ask here than creating a new topic.

What do you think of this combination: One Tor node(for speed improvement) + SSL
Does it grant anonymity ? if No how technically it can be corrupted?



12
Operating System / Re: Video card problems on Fedora
« on: September 17, 2012, 02:48:00 am »
Maybe you have an HD4xxx video card or below which is not supported in F17 as stated in the tutorial.

Anyway post output of : rpm -qa | egrep -i "kernel|catalyst"
just to check the installed packages.

13
Operating System / Re: Video card problems on Fedora
« on: September 17, 2012, 12:51:38 am »
Follow this HOWTO http://forums.fedoraforum.org/showthread.php?t=155503
if it doesn't work, post errors output

14
Operating System / Re: Video card problems on Fedora
« on: September 16, 2012, 10:57:48 pm »
but why is it using the VESA driver instead of the open source ATI driver?
Because Linux ships with a generic  VESA Xorg video driver for VESA-compatible video cards (Video Electronics Standards Association)
it is not possible to have driver support for every video card manufacturer  :P you have to pick the right driver and install it by yourself

15
Android / Re: Why rooting Android depends on phone and manufacturer?
« on: September 16, 2012, 05:41:04 pm »
Since you are uploading files from Linux (your PC) to the android phone, the permissions are copied to the android.
No, consider for instance copying file with 4405 permissions (setuid flag on) to the android file system, and you will find that permissions have changed  (no setuid flag)..
Also the destination file is naturally not owned by the same user as the source file.
In fact you need to adjust permissions from a shell instance of your device.


Pages: [1] 2