I'm trying to start learning about pentesting, and for my first self-learning project, I want to intercept communication between a client (Laptop) and a server (Ubuntu). They are communicating through TCP using JSON-RPC objects.

The client sends something like:

    "jsonrpc": "2.0", 
    "method": "Valid?", 
    "params": {
        "Version": 4.2,
        "Release Date": 10/23/17 
    "id": 3

and the server response is something like:

     "jsonrpc": "2.0",
     "result": 0, 
     "id": 3

Now what I want do is to intercept the communication, modify the JSON objects they pass to each other.

I've been googling around and I found MitM, but I don't know if I can use it in this case, because MitM needs a MAC address and it can only be done if you are on the same network. But not in my case, the Laptop is on a separate network from the server and PC that I'll be using.

  • please do not add an answer and extra questions to your post.
    – Rory Alsop
    Mar 7, 2018 at 19:48

2 Answers 2


Ok, so in order to modify stuff on the fly, you can't just be observing. You have to set up shop in between the server and the client.

server/client diagram

In other words, the communication has to go through you. You can do this by pretending to be a router...

netsh wlan set hostednetwork

... etc etc etc

However, I think the best tool for you might be Charles. Set up the proxy and you're good to go. The problem with Charles is it isn't really a free tool. Older versions of it are free though if memory serves.

  • I thank you, for a very fast reply and effort in working with MS paint, But a question will it work too even in not the same network? I found this: synthsec.com/2016/03/05/… it seems like that's what your recommending, but I don't know if it will work if your not on the same network. Anyway you made me clear my mind thank you
    – user171988
    Mar 3, 2018 at 2:40
  • Just being on the same network is NOT enough to perform edits. Additionally, you can only listen in when you're on the same network if it is wireless. The reason you can't listen in on wired networks is because networks these days use switches instead of hubs, so you never even see the traffic. Think of it this way: when you're on the same network, it is like watching two people talk. The only way to change what they say to each other is to make yourself look like the person they're talking to in order to intercept the message and change it.
    – Kelvin
    Mar 3, 2018 at 16:14

There are several tools to do a man in the middle. Practically need you show to the laptop that you are the server and then show to the server that you are the laptop. In the middle of reactiving and sending back the data you modify it. Search bettercap on Google

  • 1
    Hi, and welcome. Please do not post answers saying to search for something on Google when you can include the actual link to what you are talking about.
    – schroeder
    Mar 7, 2018 at 19:41
  • 2
    your suggestion that you can tell the server that you are the laptop does not apply when the nodes are on different networks
    – schroeder
    Mar 7, 2018 at 19:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .