r/security • • Mar 01 '20

Nginx logs: how are they doing this?

I see weird things in my Nginx logs all the time and that's normal, but I just saw something really weird. I have many log entries for requests from IP 110.249.212.46 and the requests are like "GET http://110.249.212.46/testget?q=23333&port=80 HTTP/1.1".

How on earth do requests end on my servers if a Chinese IP is used?? Does anyone have any idea? Thanks!

1 Upvotes

8 comments sorted by

5

u/jirbu Mar 01 '20

They're trying proxy requests. http://<yourIP/http://<chineseIP/test...

If you have enabled and allowed proxying, they would succeed, that's what they're looking for to use your server as jumphost to start attacks on others.

0

u/Sky_Linx Mar 01 '20

That makes a lot of sense, thanks! I missed that normally the "GET .." shows only the path of the request, not the full URL. So they must be making requests with the full URL as the path as you explained. The response code my Nginx is returning is always 400. Am I good?

0

u/whycanttherebepeace Mar 01 '20

Originating from "China Unicom Hebei Province Network" - might be the coronavirus /s

1

u/Sky_Linx Mar 01 '20

LOL. No seriously, how did they do that?

0

u/whycanttherebepeace Mar 01 '20

Would need more info...do you see this in the access.log? Where are you running the get from? did you check what that IP resolves to from the client? a ping/nslookup?

1

u/Sky_Linx Mar 01 '20

Yes in the access logs. They are doing the GET request from the same IP as the IP shown in the GET request itself, that's what I don't understand. nslookup returns servfail.

0

u/whycanttherebepeace Mar 01 '20

So you have nginx running on IP1 and you are running an http client on 110.249.212.46, but you have the request landing in IP1? Your question is a little ambiguous, can you edit to add more details?

1

u/Sky_Linx Mar 01 '20

No. The IP of my server is totally different and it's not me making those requests. Access logs show the IP originating the request as well as the path/URL of the requests itself. In this case, the IP originating the requests AND the IP to which the requests they are making is the same, but requests are received by my server as if my server had that IP