TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Reverse-engineering the Kayak app with mitmproxy

73 pointsby shbhrsahaover 10 years ago

9 comments

101914over 10 years ago
Note that mitmproxy, which requires a Python install, is not necessary to monitor what is being sent out from your computing device.<p>The same results can be achieved using only socat and the openssl binary.<p>While I understand the terminology is popular, I would not call this &quot;reverse-engineering&quot;; to me this is simply viewing your own traffic.<p>I believe users have a right to see the traffic they (or the apps they use) are sending, and for security reasons alone they should monitor what is being sent. https plus third party CA usage complicates such transparency, making proxying techniques necessary.<p>I wish more users would view their own traffic.<p>Keep up the good work.
评论 #8778600 未加载
评论 #8779476 未加载
评论 #8778942 未加载
chrisanover 10 years ago
Another great mitm proxy is Charles Proxy <a href="http://www.charlesproxy.com/" rel="nofollow">http:&#x2F;&#x2F;www.charlesproxy.com&#x2F;</a>.<p>It has a really nice UI for looking at JSON responses such as the Kayak. Sometimes a collapsible tree is invaluable in looking through a response.<p>The easy filtering and formatting is primarily why I like it so much. Here is how it handles SSL for various ways <a href="http://www.charlesproxy.com/documentation/using-charles/ssl-certificates/" rel="nofollow">http:&#x2F;&#x2F;www.charlesproxy.com&#x2F;documentation&#x2F;using-charles&#x2F;ssl-...</a><p>Here is a screen shot of my iPhone Kayak app request for comparison <a href="http://imgur.com/gvKB6fr" rel="nofollow">http:&#x2F;&#x2F;imgur.com&#x2F;gvKB6fr</a>
评论 #8779554 未加载
评论 #8779232 未加载
ketralnisover 10 years ago
I don&#x27;t know about Kayak&#x27;s economics, but at least at Hipmunk we pay our data providers per search and it&#x27;s really quite expensive. If they aren&#x27;t offering an API anymore, it&#x27;s probably because it was too pricey to operate.<p>You could easily cost a travel search company thousands of dollars very very quickly using an API they don&#x27;t want you to use. I don&#x27;t know if it&#x27;s illegal or not, but it&#x27;s certainly immoral.
评论 #8778892 未加载
评论 #8778940 未加载
评论 #8779519 未加载
dthakurover 10 years ago
&gt; From that folder, get the mitmproxy-ca-cert.pem file onto your mobile device by emailing it to yourself, for example. Then follow certificate installation steps for iOS or Android.<p>You can just go to <a href="http://mitm.it" rel="nofollow">http:&#x2F;&#x2F;mitm.it</a> on the device. It&#x27;s a &#x27;magic domain&#x27; for the proxied host. See <a href="http://mitm.it/doc/certinstall/webapp.html" rel="nofollow">http:&#x2F;&#x2F;mitm.it&#x2F;doc&#x2F;certinstall&#x2F;webapp.html</a>
评论 #8779557 未加载
vertakover 10 years ago
Does anyone know the possible legal repercussions open-sourcing a web service&#x27;s API when the company doesn&#x27;t explicitly grant permission? This is really neat, but could also raise the ire of a service that doesn&#x27;t offer an API for a reason.
评论 #8779291 未加载
评论 #8779615 未加载
评论 #8779569 未加载
xrjnover 10 years ago
Great writeup, there&#x27;s definitely potential to do something cool, especially if it&#x27;s possible to get around any tracking and the following price manipulation. I tried installing your demo client, however on running it I got the following error:<p><pre><code> root@kayak:~&#x2F;kayak-mobile-client# python client.py Departure airport code: LBG Destination airport code: HAM Departure date (MM&#x2F;DD&#x2F;YY): 12&#x2F;26&#x2F;14 Traceback (most recent call last): File &quot;client.py&quot;, line 56, in &lt;module&gt; searchid = json.loads(r.text)[&quot;searchid&quot;] KeyError: &#x27;searchid&#x27;</code></pre>
评论 #8778590 未加载
ianlevesqueover 10 years ago
A useful technique for sure. The only technique I know to slow this down is to use certificate pinning, but it&#x27;s probably pointless. Some of your users are probably extremely motivated (like ours [1]) and it&#x27;s obvious to them that what they are doing is unsupported.<p>1. <a href="http://difm.eu/dox/" rel="nofollow">http:&#x2F;&#x2F;difm.eu&#x2F;dox&#x2F;</a>
评论 #8779564 未加载
javiercrover 10 years ago
Interesting! We&#x27;ve used a similar technique to reverse-engineering mobile apps from different banks in order to create a Ruby gem to fetch bank data (balance and transactions).<p><a href="https://github.com/ismaGNU/bankScrap" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;ismaGNU&#x2F;bankScrap</a>
nndover 10 years ago
I wouldn&#x27;t call this reverse-engineering.<p>How are UUID and HASH are generated? Are they unique to every installation?