Jump to content

MITM TCP request injection

Featured Replies

I would like to implement man-in-the-middle to modify sent mongodb tcp requests and add a http header so I can use a dns-redirect on my server. Does anybody know of software that will allow me to do so?

2 hours ago, fiveworlds said:

I would like to implement man-in-the-middle to modify sent mongodb tcp requests and add a http header so I can use a dns-redirect on my server. Does anybody know of software that will allow me to do so?

You want to redirect database requests? What are you trying to do exactly? It sounds like using some sort of proxy setup would be simpler. 

Wtf gave good advice to try proxy +1. But if it's truly yours server, on Windows you can simply edit local DNS records in c:\WINDOWS\system32\drivers\etc\hosts file, on Unix /etc/hosts file.

 

  • Author
Quote

You want to redirect database requests? What are you trying to do exactly? It sounds like using some sort of proxy setup would be simpler. 

It is a proxy. More specifically I want to proxy mongodb tcp requests. Problem is I can only use nginx and port 8080.

Quote

But if it's truly yours server, on Windows you can simply edit local DNS records in c:\WINDOWS\system32\drivers\etc\hosts file, on Unix /etc/hosts file.

It isn't my server it is a college network they want students to be able to access mlab.com over port 8080 using nginx (only http is allowed over college wifi). I can only send tcp data by using mongo and nginx won't support dns vhosts over tcp. 

So what I want to do is work around this by putting the mongo requests into a http request with DNS info like mongo.college.edu:8080 and send the http request to the college's Nginx server. The Nginx server would then route the http packet to the local port being used for TCP. I would then man in the middle the packet again removing the http headers and send the TCP packet to mlab.com. All while never exposing port 27017 

Archived

This topic is now archived and is closed to further replies.

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.