Jmeter and vpn connection - http

I have an app on mobile which runs through VPN connection . I am doing performance testing using jmeter on desktop for which I have done necessary configurations but http proxy server does not record my http requests
Can anyone help on this

JMeter and mobile device need to be on the same network in order for JMeter to be able to capture mobile device traffic. So the easiest option would be connecting desktop to the same VPN and using VPN-originated IP addresses.
You will also need to install JMeter's self-signed certificate, the relevant file is ApacheJMeterTemporaryRootCA.crt, it's being generated in JMeter's "bin" folder when you start HTTP(S) Test Script Recorder. The easiest way to get the certificate installed onto mobile device is sending it to yourself by email, opening the email on the mobile device and following system dialog to install the certificate.
References:
HTTPS recording and certificates
JMeter Proxy Step by Step
There is also an alternative solution for recording native and hybrid mobile applications traffic. Using it you won't have to bother about proxies and certificates. As a little bonus, this 3rd-party JMeter Cloud recorder has "SmartJMX" mode with automatic correlations of any dynamic parameters so you won't have to extract them yourself. See How to Cut Your JMeter Scripting Time by 80% guide for details.

Related

How to forward data from desktop application through fiddler or mitmproxy?

I am using a win10 desktop app for which I know it is sending TCP packets in order to communicate with the server. The payloads are encrypted. There is a chance that if the app is using TLS, a proxy like mitmproxy or fiddler will be able to decrypt the data.
The app also gets assigned different port every time it launches. So far the only promising information was to use netsh:
netsh interface portproxy add v4tov4 listenport=appPort listenaddress=appLocalIP connectport=fiddlerListeningPort connectaddress=fiddlerLocalIP
I ran this command after the app was already running because I can not determine its local port beforehand. But that did nothing. I was unable to find any other way to force the app to route the traffic through fiddler / mitmproxy.

I can run tcpdump on the router, but how can I decoding the traffic real-time?

We develop APPs, and sometimes we want to see the traffic of the APP.
Now we use Charles, AnyProxy, or Fiddler, but all these tools need manually settings on the Mobile Device, and not easily to share the traffic.
So I am thinking about a solution:
1. on the router run tcpdump, or make a port-traffic-mirror to a specific machine, so I can get all the traffic
2. there will be a program, decoding the traffic stream to pure http/https package, and show them on a webpage.
3. anyone who want to see the http/https(based on the APP, or may be protobuf) requests and responses. and can do some search or filter.
4. yes, these works like Wireshark, but how to make Wireshark run on a web?

Sockets server that handles system commands and http requests

i've been searching and trying for weeks now to find a solution to my issue that I can understand and easily implement but I had no joy. So i would be very grateful if someone could put me out of my misery.
I'm building an iphone app similar in functionality to apps like "Air Video" and "Air Playit". The app should communicate with a server running on a remote host. This server should be able to execute a command sent by the iphone to encode a video and stream it over http.
In my case, my iphone app sends commands to be executed on a remote host. the remote host is running a python socket server listening for example on port 3333.
On the iphone, i'm simply using
"CFStreamCreatePairWithSocketToHost", "CFWriteStreamOpen" and
"CFReadStreamOpen"
to connect, write and read data.
My remote host, successfully intercepts the commands and starts the encoding.
To serve the contents, I'm having to run a separate http server (i'm using Python simpleHTTPServer) which is listening on another port.
What I would like to do is use the same port for both system commands and http requests.
The apps I've mentioned above seem to do it that way and I've noticed they have their own build-in web server.
I'm sure I'm missing something but please bear with me this is my first attempt at building an app.
Encode your system commands into special HTTP requests. Decide which thing to do (execute command or serve the contents) based on HTTP request, not on the incoming port. If you need to use separate http servers (like you told), consider having a layer that receives everything from the devices and dispatches to other servers (or ports) based on the request.

How does web filtering software hook into outbound browser requests without browser configuration?

I would like to duplicate the functionality of some web filtering software, however I don't want the user to have to configure their browser. Some other products on the market do this without any apparent configuration in the browser settings.
The user would be installing this for themselves, so air-tight filter security is not a priority. But ease of installation and the ability to apply to an arbitrary browser would be important.
Since the vision is standalone desktop software, inserting a filter on another upstream machine is not really an option.
You will need software that runs on a network node that all internet flows through, and it will have to intercept HTTP requests and redirect them accordingly.
Some routers have this sort of capability, it can also be accomplished with linux routers using iptables and a squid proxy.
Install your program as a proxy for all HTTP traffic.
Windows Filtering Platform
Windows Filtering Platform (WFP) is a set of API and system services that provide a platform for creating network filtering applications. The WFP API allows developers to write code that interacts with the packet processing that takes place at several layers in the networking stack of the operating system. Network data can be filtered and also modified before it reaches its destination.
http://msdn.microsoft.com/en-us/library/aa366510%28VS.85%29.aspx

How do I test my TCP protocol app?

When creating apps that interface on various TCP protocols (apart from HTTP), we need to test our app and how it communicates with a real server.
Now typically with shared hosting you can't install any low level service to talk protocols like POP3, IMAP for email, SIP or XMPP and for instant messaging.
So are there "test" servers that exist (like example.com) that help you debug or test if you app is speaking that protocol correctly?
Or maybe its easy enough to install some email/IM protocol server on another local PC and then we can use Wireshark to test with that?
I think wireshark is probably your best bet. I have never heard of publicly available test servers, I would install a server on your LAN and use that for testing.
Windows Server comes with a built in SMTP server. Try here for some information
There is a list of XMPP servers here, I have personally used OpenFire on Windows.

Resources