deanmao / xtend

MITM attack http proxy
http://www.deanmao.com/2012/08/28/modify-a-site-you-dont-own/
7 stars 2 forks source link

Requests to gaug.es generates an internal server error #2

Closed camwest closed 12 years ago

camwest commented 12 years ago

https://secure-gaug-es.myapp.dev/track.gif?h[site_id]=4f5634b5613f5d0429000010&h[resource]=https%3A%2F%2Fgithub-com.myapp.dev%2Flogin%3Freturn_to%3D%252Fplans&h[referrer]=https%3A%2F%2Fgithub-com.myapp.dev%2Fplans&h[title]=Sign%20in%20%C2%B7%20GitHub&h[user_agent]=Mozilla%2F5.0%20(Macintosh%3B%20Intel%20Mac%20OS%20X%2010_8_2)%20AppleWebKit%2F537.4%20(KHTML%2C%20like%20Gecko)%20Chrome%2F22.0.1229.94%20Safari%2F537.4&h[unique]=0&h[unique_hour]=0&h[unique_day]=0&h[unique_month]=0&h[unique_year]=0&h[screenx]=2560&h[browserx]=1278&h[browsery]=939&timestamp=1350065802309

While

https://secure.gaug.es/track.gif?h[site_id]=4f5634b5613f5d0429000010&h[resource]=https%3A%2F%2Fgithub-com.myapp.dev%2Flogin%3Freturn_to%3D%252Fplans&h[referrer]=https%3A%2F%2Fgithub-com.myapp.dev%2Fplans&h[title]=Sign%20in%20%C2%B7%20GitHub&h[user_agent]=Mozilla%2F5.0%20(Macintosh%3B%20Intel%20Mac%20OS%20X%2010_8_2)%20AppleWebKit%2F537.4%20(KHTML%2C%20like%20Gecko)%20Chrome%2F22.0.1229.94%20Safari%2F537.4&h[unique]=0&h[unique_hour]=0&h[unique_day]=0&h[unique_month]=0&h[unique_year]=0&h[screenx]=2560&h[browserx]=1278&h[browsery]=939&timestamp=1350065802309

works fine.

deanmao commented 12 years ago

is there more context to this error? I don't know how to reproduce it.... or it "works for me"?

camwest commented 12 years ago

Give me a minute I'll try to get you more context =)

camwest commented 12 years ago

@deanmao

So there are too many variables right now that I'm not sure what the exact issue is.

It could be a problem with my express app not being configured correctly, or it could be an issue with the library. Are you saying you're able to proxy the second url in your dev environment correctly?

It's going to take me a few tries before I can give you really good bug reports.

camwest commented 12 years ago

Here are the details of the request that is generating an error:

URL:

https://secure.gaug.es/track.gif?h%5Bsite_id%5D=4f5634b5613f5d0429000010&h%5Bresource%5D=https%3A%2F%2Fgithub-com.myapp.dev%2Flogin%3Freturn_to%3D%252Fplans&h%5Breferrer%5D=https%3A%2F%2Fgithub-com.myapp.dev%2Fplans&h%5Btitle%5D=Sign%20in%20%C2%B7%20GitHub&h%5Buser_agent%5D=Mozilla%2F5.0%20(Macintosh%3B%20Intel%20Mac%20OS%20X%2010_8_2)%20AppleWebKit%2F537.4%20(KHTML%2C%20like%20Gecko)%20Chrome%2F22.0.1229.94%20Safari%2F537.4&h%5Bunique%5D=0&h%5Bunique_hour%5D=0&h%5Bunique_day%5D=0&h%5Bunique_month%5D=0&h%5Bunique_year%5D=0&h%5Bscreenx%5D=2560&h%5Bbrowserx%5D=1278&h%5Bbrowsery%5D=939&timestamp=1350065802309

GET /track.gif?h%255Bsite_id%255D=4f5634b5613f5d0429000010&h%255Bresource%255D=https%253A%252F%252Fgithub-com.myapp.dev%252Flogin%253Freturn_to%253D%25252Fplans&h%255Breferrer%255D=https%253A%252F%252Fgithub-com.myapp.dev%252Fplans&h%255Btitle%255D=Sign%2520in%2520%25C2%25B7%2520GitHub&h%255Buser_agent%255D=Mozilla%252F5.0%2520(Macintosh%253B%2520Intel%2520Mac%2520OS%2520X%252010_8_2)%2520AppleWebKit%252F537.4%2520(KHTML%252C%2520like%2520Gecko)%2520Chrome%252F22.0.1229.94%2520Safari%252F537.4&h%255Bunique%255D=0&h%255Bunique_hour%255D=0&h%255Bunique_day%255D=0&h%255Bunique_month%255D=0&h%255Bunique_year%255D=0&h%255Bscreenx%255D=2560&h%255Bbrowserx%255D=1278&h%255Bbrowsery%255D=939&timestamp=1350065802309 HTTP/1.1 Host: secure.gaug.es User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_82) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/_;q=0.8 accept-charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3 Referer: https://github.com/deanmao/xtend/issues/2 Accept-Language: en-US,en;q=0.8 Cookie: s_pers= s_getnr=1349899570664-New|1412971570664; s_nrgvo=New|1412971570665;; s_sess= s_cc=true; s_sq=;; km_ai=+7BwVehJwdrKetZ3qiiEyaY7ICU=; km_uq=undefined; kvcd=1349900075527; km_lv=1349900076; loopfuse=1f906e77-e09b-b23f-c7ae-50f53e4a842c; ptca=135006574.9aqBJzzsI392.1349915012.1349915012.1349915012.1; ptv_4qh98s=9aqBJzzsI392; __pti_4qh98s=9aqBJzzsI392; ptcc=1; ptcz=135006574.1349915012.1.0.ptmcsr=(direct)|ptmcmd=(none)|ptmccn=(direct) Accept-Encoding: gzip,deflate,sdch Connection: close Cache-Control: max-age=0

I pulled that from my proxy. This is happening in development with a self signed certificate.

camwest commented 12 years ago

Here is a short video showing the problem: http://f.cl.ly/items/0Y0d2w1T2J0Q2E2z1M2O/proxy-get-gaug-es.mov

deanmao commented 12 years ago

Hm, I tried loading up the same url as you, and it seems like it is able to get the tracking gif just fine.

Here's mine: http://i.imgur.com/ydZGs.png

Is mongodb running locally? That's where cookies are set & used. You should have a bunch of documents in your database, so if it's empty, that might be an issue.

camwest commented 12 years ago

I have mongo installed version 2.2.0, the xtend database is getting created and populated.

http://f.cl.ly/items/3f3V0m1a0l3R1O2x2c3t/mongo_db.mov

What else do you think it could be?

deanmao commented 12 years ago

I can't tell from here. Can you find the root cause?

camwest commented 12 years ago

I'm not sure, what version of mongo are you running?

deanmao commented 12 years ago

I have 2.2 as well. are you sure it's a mongo related issue?

camwest commented 12 years ago

I managed to get it working: http://cl.ly/image/0W023N3E361u

I used the xtend.dev domain name and reset everything. I'll do some research to figure out the root cause.

camwest commented 12 years ago

This was a problem on my environment.