Jump to content

MITM TCP request injection


fiveworlds

Recommended Posts

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. 

Link to comment
Share on other sites

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 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

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.