pass app http trafic through a proxy installed on my pc - Android Software/Hacking General [Developers Only]

Hi everybody,
I am tring to debug an android app. I need to pass all the http trafic of my htc desire s through a proxy server( Paros, WebScarab, etc.) that i have on my pc. I need to intercept the http messages.
I have rooted the phone and installed a proxy on it. I have connected the phone and the pc to the same wifi so that they will be in the same network. After this i have put the pc's ip in the Proxy Host: "192.168.1.2" and the port "8080" on the Proxy Port field because Paros Proxy uses 8080.
I cant find a way to do make this work.. can someone help me? Is there another way or am i doing it wrong?

If you just need to intercept messages, why don't you run a sniffer directly on the phone ? There are a lot, and most use the tcpdump binary, that is very handy ! They output a .pcap file that can be handled by programs like Wireshark, NetMiner, ...
Otherwise you could sniff the traffic with a pc that has a wireless card that can be put in monitor mode (old eeepc FTW !). Then filter out only the traffic from<->to device.
If you really need to pass thru a proxy... well, have you tried connecting your own pc to the proxy, or any other pc in your lan? Does it work ? I don't know if Paros has this feature, but have you checked that the relay is open for all hosts on LAN or just loopback connection ?

Related

Internet Sharing+VPN WM6 problem

I cant figure it out, I just installed the latest v. WM6 Rom (http://forum.xda-developers.com/showthread.php?t=297256)
Internet Sharing via Bluetooth works but... when i start my vpn either via ssl or ipsec (on laptop) NOGO. something is in between dont know what...so workaround:
Internet sharing via USB: the device tells me "connected", the new Network connection in control panel/xp tells me "connected" but there is no Internet connection. I try to ping 192.168.0.1 which it made gateway and this is not found. nothing nada. firewall off. nogo. repair. nogo.
*argh* I realize it are 2 different problem but in short: I can not connect as I usually did under the wm5 dialer (and I miss the status lights).
Anyone has a clue?
Hi !
I have the same problem with the same ROM. I didn't found any solution yet.
I didn't try Internet connection shring with Bluetooth. But your problem sounds as a proxy setting problem on your PDA connexion. You should take a look at those settings...
Let us know if you find anything.
edit :
Finally it's working, I re-installed ActiveSync 4.5 and now it's OK.
I reinstalled activesync, modded down to wm5, then again wm6 ...
and magic usb is working but...
My VPN connection on both BlueTooth or Usb is not working. I use the AT&T client to connect to our network but authentication fails with all vpn servers in the list.
That's a shame because this is really the only basic functionality i need to check my e-mail and stuff "on the road". Hmmm... down to WM5!
Unless someone has got VPN working?
I reinstalled activesync, modded down to wm5, then again wm6 ...
and magic usb is working but...
My VPN connection on both BlueTooth or Usb is not working. I use the AT&T client to connect to our network but authentication fails with all vpn servers in the list.
That's a shame because this is really the only basic functionality i need to check my e-mail and stuff "on the road". Hmmm... down to WM5!
Unless someone has got VPN working? Heres my errorlog:
21:24:55.190 Logon request sent to VPN server 111.11.111.222...
21:24:55.190 Wait for asynchronous action to complete.
21:24:55.230 A VPN logon message 1 was received.
21:24:55.230 Accessing digital certificate...
21:25:00.818 A VPN logon message 2 was received.
21:25:00.818 Negotiating encryption keys with the VPN server (111.11.111.222)...
21:25:02.290 A VPN logon message 3 was received.
21:25:02.290 Authenticating with the VPN server (111.11.111.222)...
21:25:22.349 The VPN logon response was received.
21:25:22.349 The local address is 192.168.1.78.
21:25:22.349 Last login error set to 118.
21:25:22.349 'LogonToIPSecTunnelServer' failed.
21:25:22.349 FSM error in state 'AuthenticatingTunnel'.
21:25:22.349 !Error 118 No response from IPSEC terminator during authentication. (error 118).
21:25:22.349 ---------- Change state to 'BeforeTunneling'. ----------
ah... I have it... stupid me.
sorry. stupid. forgot the checkmark on the authentication tab on the auto-created controlpanel > networkconnections > Windows Mobile 6 Connection > Authentication.
Great!
For reference, using the Cisco VPN client, with Bluetooth and internet sharing, does not work. With WM6, a Bluetooth PAN adapter is created on the PC, and the Cisco VPN doesn't bind to this type of adapter.
Using the same config, but with the USB cable, and the wireless modem, does work.
Unfortunately It does NOT work anymore.
Whatever I try I can not get connection to the Internet
- I start "connect"
- Plugin the usb cable
- The new network connections icon appears under network connections
- It pops up it is connected
- It has an assigned 192.168.0.2
But no internet connection, ping 192.168.0.1 can not be reached, etc...
I turned off the firewall to see if this was the problem. not.
Is there ayone who has got a clue? This is really frustrating.
For what it's worth, I'm using WM6 Black 2.5 on a Hermes (Cing 8525) and I'm able to use WM6 Internet Sharing via BT to connect my laptop to the internet and I am able to use my Cisco VPN client on my laptop to connect to my company's intranet. No problems here so I don't think it's a WM6 problem.... rather a configuration problem... either on your company's VPN concentrator side or your client side.You may want to chat with your IT/Ops dept for configuration settings.
No problems here nither. I use Vista on PC. I need to connect to several networks and just have made some tests. I could reach all of them. The fact is that most of them are built on Draytek routers not Cisco, but they also use IPSec and so on.
Yep I'm having the same problem, my VPN's worked fine with WM5, but went to Black 2.5 and now when I VPN, it connects, assignes me an IP, but wont let me ping the network.
I _think_ it's becuase now the fone shows up as a network rather than a modem, and assigns me a 192.168.0.x address, and the home network is in this too... any suggestions?
share internet connection with ppc
Can i use my ppc as the wireless adapter? do i need to use "wireless modem" or "activesync" to do this? For more detail, if my computer do not have wireless adapter, and now i want to use the wireless adapter on my ppc to connect to the internet. Is it posible?

can someone explain the ICM to me please?

Hi there!
Maybe I'm just too stupid, but I've benn trying for weeks now to setup the network parameters for my University's Campus network and failed miserably, so could someone please explain to me how this darn "Internet Connection Manager" works?
What I need in brief:
How can I setup a proxy to use with and only with
- HTTP(S) and FTP(S)
for a WiFi-Network that
- is NOT encrypted
- does NOT require dialing a number / accessing a modem
- does NOT use a VPN
??
Whenever I try this it always results in the connection dying completely.
In other words: When I select my standard UMTS-uplink as "default connection for programs connecting automatically" and then manually establish a WiFi-connection I can reach all computers available on the campus network get ping responses and everything, but I cannot use a proxy, hence not load off-campus pages.
When I define a new connection and enter my settings (just WiFi-name and the proxy details) I can still establish a WiFi-connection, but get a ping timeout even on the access point and the intranet servers usually available through the WiFi. No SSH login, no intranet, nothing (but I do get an IP assigned & stuff)
Here's what I would like to do in theory:
=> Manually connect to a WiFi-Network called "tuwlan".
. -open network
. -no encryption
. -IP, netmask, gateway, nameserver etc provided automatically by DHCP
=> Establish a SSH2 (SecureShell) connection to our on-campus proxy server and tunnel some ports to get through the Subnets (extremely restrictive) firewall.
. -SSH including port forwarding done with PockeTTY, works like a charm
=> Use Opera Mobile to surf web pages and FTP Sites through the proxy "localhost:40081" (which is forwarded to our campus proxy server through SSH2).
=> The Proxy only knows HTTP(S) and FTP(S), so all other programs (ICQ, Skype etc) are not to use it!
This setup used to work great with older Opera versions, but they removed the proxy setting dialog in favor of directly using the ICM settings.
So now I'm stuck with Microsofts Internet Connection Manager
Can anyone please help me to get this working?

Tunnel Internet over Vpn or ssh?

Hi people i'm here for asking you a thing..
I got the g1 android .. But in italy there are some restriction about internet carrier offers..
Right now i can only surf HTTP internet.. But if i try to go over an https connection (gmail , greader .... ) I cannot surf..
So i thought to put a vpnserver on port 80 and then tunnel every connection there...
Maybe easier could be tunnel every connection through an ssh ( port 80 ) connection...
Any other suggestion?
Another approach would be to develop this:
http://en.wikipedia.org/wiki/Ethernet_over_USB
Then you would hook up the phone to the computer, which would see another ethernet card (with the proper host USB-ethernet drivers). Once this is set, you just run iptables on the phone to nat the network connection... much cleaner than going through a wifi setup or through a special proxy... or dialing through the phone to get a connection and disabling the phone's networking, no?
Uhm , i think that it is wow..
But i need another thing.. What i need is tunnel every connection via ssh or vpn..
I'm trying that but that app should be used only for the phone...
vekexasia said:
Hi people i'm here for asking you a thing..
I got the g1 android .. But in italy there are some restriction about internet carrier offers..
Right now i can only surf HTTP internet.. But if i try to go over an https connection (gmail , greader .... ) I cannot surf..
So i thought to put a vpnserver on port 80 and then tunnel every connection there...
Maybe easier could be tunnel every connection through an ssh ( port 80 ) connection...
Any other suggestion?
Click to expand...
Click to collapse
Ah... now if I READ your request...
sigh.
You should try this:
http://openhandsetmagazine.com/2007/11/tips-howto-connect-android-emulator-behind-proxy/
Hopefully, that will tell Android to connect via a proxy somewhere that you either find or setup on a host at port 80, since that's the only port allowed for you.
Unfortunately it does not work ( i cant use sqlite3) .. I'm excluded from every https traffic

Proxy PC Web Sessions Through Phone/SSH/Remote HTTP via USB

Synopsis:
Need to bypass corporate web proxy for unfiltered Internet access. Google Chrome is the preferred and tested browser, but Firefox should work as well. Corporate environment utilizes an automated global proxy setting, which must be bypassed using run-time arguments. Since I have a Squid proxy running at home on my cable connection, all I need to do is establish a port-forwarding tunnel from my phone to my house, then another from my laptop to my phone. This will allow me to browse the web and proxy any traffic through my phone to my proxy server at home, around our corporate proxy and firewall. The phone utilizes a DSL connection typically used for testing and other non-business traffic and is isolated from the corporate LAN.
Requirements:
A Web Proxy (Squid instance or other third-party available)
Atrix 2 Rooted (others not tested)
SSHDroid from Google Play
BusyBox (with ssh binary)
Google Chrome or Firefox
Putty SSH Client for Windows or other SSH client software AND a familiarization with SSH tunneling.
Procedure
On the Atrix 2, be sure 'Motorola Phone Portal' mode is configured for the USB connection. This will tell the phone to assign an IP address to the USB interface of the phone. In my case, it is 192.168.16.2. Once that is done, connect your phone to your PC via the USB cable. This may auto-launch IE on your desktop to your phone to the web portal on port 8080 and is not necessary.
On the Atrix 2, launch SSHDroid to enable inbound SSH connections. No special settings were configured in that app for any of this to work.
On your PC, manipulate your Chrome shortcut to use different proxy settings than the default. By default Chrome utilizes the Internet Settings on the PC, so this is necessary if you already have a proxy defined at the OS level. To do this, you must create a new shortcut to Chrome, then right-click on that shortcut, go to properties, and change the 'Target' field to include this information:
--proxy-server="localhost:3128" (don't forget the quotes)
Be sure to use this shortcut to launch Chrome or you will continue to use the OS-level Internet Settings.
Now, launch the Putty SSH client and create a new SSH session to your Android device. Enter the appropriate connection information, and under the Connection/SSH/tunnel section, define the port forward information for the web proxy. In my case I set it to port 3128 forwarding to 192.168.16.2:3128. Save this session. This will tell your PC when the SSH session is established to set up local TCP port 3128 to listen for requests, then forward them to the Android phone across the USB connection on the same port.
Try to connect to your SSH server on your phone. By default, the username is 'root' and password is 'admin' for SSHdroid. You should now be successfully logged into your phone.
In the Putty SSH session on your phone, you will now have to launch a command-line SSH session where you will establish the real tunnel to the real proxy server. Enter 'ssh <REMOTE SSH USERNAME>@<REMOTE SSH HOST> -L <IP OR HOSTNAME OF PROXY>:<PROXYPORT>:<USB NETWORK IP ADDRESS>:<LOCAL PROXY PORT>' (without quotes) to establish the SSH tunnel. Here is what my connection (sanitized) looks like. You can also run 'ssh -?' to get an idea of command-line options for the ssh binary.
ssh [email protected] -L 192.168.1.1:3128:192.168.16.2:3128
This will set your phone to listen on TCP port 3128 on the 192.168.16.2 interface and forward any requests to 192.168.1.1 on the same port. It is important to specify the USB interface as by default it will only set up connections on the localhost (127.0.0.1) interface, which won't accept connections from other remote hosts.
Finally, launch Chrome using the shortcut you created and you should now be sending all web traffic out the USB interface and through your phone to your remote proxy server. You can verify this by connecting to a resource such as your home Internet router on the LAN interface to verify. If you are running Squid at home, you should also be able to view your /var/log/squid/access.log and see your requests.
I have not tested remote web proxies or other methods, but in principle it should work.
Feedback and ideas for improvement are welcome!
I just USB tether and use Tunnelier (because putty does not have auto reconnect) and Proxifier (so I don't have to set the proxy settings in each application I want proxied)

[Q] [HELP] SSH Tunnelling

Hello.
I need some help about my problem connecting to my work lan.
I have a PC in office connected to work LAN. I can connect to my pc from remote usign SSL VPN.
I have installed Junos Pulse on my Galaxy Note 10.1 and with it I can connect to my VPN and then, using port 3389, I can connect to my PC using RDC.
If I need to access my work network, I need to make some tunnel using port 3389.
I installed SSH server listening on port 3389 on my pc and, after VPN connection has been established, I try to use SSHtunnel to configure connection to my ssh server (working ok) and then starting Global Application routing. When I start SSH tunnel it connect to my ssh server and it works (for ex. using internet browser from android) but only using IP addresses.
If I try to use names instead of IP it is unable to resolve DNS, also if I set DNS option ON in SSHtunnel.
I cannot understand how to accomplish that kind of connection. I tried proxydroid, sshtunnel, autoproxy but they does not work (or I am not able to make them work).
I don't know if it is some problem using tunnelling with Junos pulse.....
Any help for me?
Thank you
No help?

Categories

Resources