WEBVTT

00:00.000 --> 00:10.300
All right, I would like you all to give me, put your hands together and welcome to the stage our next presenters, Nix and Charlie.

00:10.760 --> 00:12.540
I am so sorry.

00:17.290 --> 00:24.050
Hey, yeah, so today we are talking about hacking corporate banking for fun and profit.

00:24.050 --> 00:30.870
So introducing myself, I'm a full-time bug bounty hunter for, uh, for SNAC.

00:30.870 --> 00:37.590
Uh, uh, I also recognized, uh, uh, in 2021 as, uh, and as one of the legend hacker.

00:37.710 --> 00:40.290
And, uh, I will, sorry.

00:40.650 --> 00:41.430
Okay.

00:41.430 --> 00:50.750
Uh, I'm also, I'm also founder of, uh, B-Sides Ahmedabad and, uh, uh, I am advisor at, uh, riskprofiler.io.

00:50.950 --> 00:53.830
Hey guys, my name's Charlie Waterhouse.

00:53.830 --> 00:59.170
Um, I am a security analyst and was on the back side of this, helping triage these vaults as they came in.

00:59.170 --> 01:02.410
And we kind of worked together to go a little further and figure out some stuff on this.

01:02.550 --> 01:05.970
Um, I have spent non-traditional and pen testing background.

01:05.970 --> 01:11.830
I spent 22 years as an airline flight attendant, international, uh, manager and speaker and translator.

01:12.070 --> 01:20.550
In the meantime though, I've also done over 2,400 engagements, uh, based on OWASP and reviewed about 25, 30,000 reports from a lot.

01:20.550 --> 01:23.730
Some of you guys out here, uh, that have seen me on the back end of that.

01:23.990 --> 01:28.110
Um, I work with a lot of our large corporate clients to help them understand the flaws.

01:28.550 --> 01:34.710
And as I like to say, translate the geek side to non-geek so that the guys who are not technical understand what we're looking at.

01:36.550 --> 01:40.070
So to start, we're going to give you guys a little bit about this.

01:40.170 --> 01:46.610
Um, during the bounty hunt on this, we were kind of looking at, this was a private program for a large, large bank.

01:46.830 --> 01:50.310
Um, and the scope was our corporate banking application.

01:50.310 --> 01:53.210
This is the back end where they're doing transfers and setting up stuff.

01:53.510 --> 02:01.130
Um, after exploring a bit, we found that there was a third party application that was running and, uh, claimed to be used by 60% of the banks.

02:01.130 --> 02:03.870
So this was like, okay, now we can start digging a little more.

02:05.510 --> 02:07.150
The program has three roles.

02:07.150 --> 02:08.770
We have a maker, verifier and checker.

02:08.770 --> 02:10.510
The maker initiates a transaction .

02:10.690 --> 02:13.650
Uh, the checker ensures everything's in place and ready to go.

02:13.750 --> 02:16.010
Verifier is the final checkbox.

02:16.350 --> 02:17.850
And so the app has corporate groups.

02:17.850 --> 02:23.050
Each was managed by different branches and they're all separate and not linked to each other, recognized by GCIF.

02:23.050 --> 02:29.190
Now, one of the things we found out from my end, when we started looking, louder, louder, always.

02:29.190 --> 02:29.630
Okay.

02:29.670 --> 02:34.190
So when we started looking, we found that the GCIF is actually kind of a unique thing.

02:34.190 --> 02:36.350
I just, we started poking around.

02:36.430 --> 02:39.830
This is a Google patent for linking your bank accounts together.

02:39.970 --> 02:42.410
So let's say that you have a large corporate bank.

02:42.410 --> 02:46.810
You have a loan that's for your house, for your car, for your bank, for your credit cards.

02:46.870 --> 02:48.730
They all link you through your GCIF.

02:48.730 --> 02:53.090
So it's your universal identifier across different divisions within the same bank.

02:53.470 --> 02:55.910
So let's keep that in mind when we're going through this.

02:56.970 --> 02:58.330
And next slide.

02:58.350 --> 03:03.430
So we can see what each role looks like with the maker, the verifier and the authorizer.

03:03.430 --> 03:05.950
These are pretty standard and look pretty similar.

03:06.490 --> 03:10.330
So at this point, um, Nick, so you want to take it over where you were at on this.

03:11.230 --> 03:11.870
Yeah.

03:11.870 --> 03:18.850
So, uh, so client has given, uh, some, uh, SLAs when they are going to fix all these vulnerabilities.

03:19.090 --> 03:34.410
So starting from critical, uh, which, which is, which has been given that, uh, they will fix in like 15 days, uh, high up to 30 days, medium up to 90 days, but they, they never followed it and they fix all the vulnerabilities after one year.

03:38.040 --> 03:40.160
So, uh, there you go.

03:41.280 --> 03:47.980
So getting to know the application, uh, it's using servlets and kind of a single page app, which we tend to kind of go, eh, not much there.

03:48.060 --> 03:52.520
Um, the maker role has administration, uh, application module on it.

03:52.520 --> 04:02.320
And so we're kind of noted that, and that, uh, each role has custom permissions, but the maker role does have that admin, um, but it doesn't have all the admin permissions.

04:02.700 --> 04:08.460
Um, there's a servlet path for the front office, uh, that we see here and the admin path.

04:08.540 --> 04:20.740
What we kind of want to focus on though, is these widget IDs and the event IDs, because these are going to come critical as we go through and we're going to use them through those, uh, modifiers, several pages with keywords that we saw with that event ID.

04:21.160 --> 04:23.320
And then we had the modifiers to go in with it.

04:23.520 --> 04:28.900
And then the front office was in the web portal spot and input validation was required to get in.

04:30.400 --> 04:31.160
Excellent.

04:31.900 --> 04:35.160
So there was, uh, there was two sides of this application.

04:35.160 --> 04:38.280
One is, uh, front-end and the other is, uh, the back-end.

04:38.280 --> 04:42.720
Back-end is not really a back -end, but they have given, uh, custom permissions on it.

04:42.760 --> 04:52.140
Uh, the, it is a kind of very large application, so, uh, they haven't provided much, much of, uh, uh, like, uh, permissions on it.

04:53.120 --> 05:04.320
So, uh, so when there was, uh, demo, uh, sorry, so as I, so I started recording on the application, uh, I found that, uh, they are running, uh, a third-party application.

05:04.440 --> 05:16.680
And this third-party application was, uh, demo only, so I couldn't find much information available on the, uh, and I don't want to call them and, uh, have a demo set up for myself.

05:16.800 --> 05:22.360
Uh, so I go ahead and, uh, decided to review their, uh, JavaScript files.

05:22.400 --> 05:32.380
Uh, JavaScript, uh, so basically, uh, this application has two event IDs, uh, two, uh, two, uh, parameters, event IDs and, uh, widget, widget IDs.

05:32.700 --> 05:46.140
So, uh, what I did, I, uh, and, uh, and there was, there was one more parameter, GC, uh, GCIF, which, uh, Charlie just, uh, explains that, uh, is used to, uh, and it, uh, identify the bank customer all across the world.

05:46.260 --> 06:02.420
So, uh, what I did, I, uh, used, uh, uh, GraphScript to, uh, uh, figure out all the event IDs because what happened is, uh, if you want to serve any functionality in this application, you have to change the, uh, event IDs, uh, uh, in the, in the parameter and you will get,

06:02.420 --> 06:08.800
uh, uh, if you, if you have access to that, uh, particular functionality, you will, uh, uh, able to load it.

06:09.000 --> 06:29.740
So, uh, what I did, I just, uh, grabbed all the, uh, event IDs, uh, through, through, uh, GraphScript and, uh, uh, and, and each, uh, there, there was, uh, like common.js, uh, file, but, uh, in each page you load, uh, the event IDs, you will get a new,

06:29.740 --> 06:40.740
uh, JavaScript file and it has, uh, it, it will contain a new, um, event IDs, uh, for, uh, next, maybe for the next functionalities.

06:41.080 --> 06:49.580
So, uh, so this is like, uh, uh, this is like, uh, a few, uh, event IDs that I found, uh, from, uh, just, just to start from.

06:49.580 --> 07:01.960
And, uh, after I, uh, after I go load these event IDs in the application, I, uh, found like more than, uh, 500, uh, modules running on this application.

07:03.480 --> 07:12.920
So, so starting from, uh, the, our first findings, uh, so it, it, it's an acceleration from, uh, authorizer to admin role.

07:12.920 --> 07:17.020
So what they're doing that, uh, the maker role has, uh, admin button.

07:17.020 --> 07:22.440
So, uh, when, when I click the admin button, it will redirect me to the admin, admin panel of it.

07:22.440 --> 07:30.520
But, uh, the admin panel also do not have much permissions available, uh , just a couple of, uh, couple of, uh, modules are loading.

07:30.680 --> 07:47.020
So what I, so, uh, when I click, click the, uh, click that, uh, uh, admin role, uh, what I found that, uh, they are generating, uh, they are basically, uh, checking that if, uh, this, uh, role has, uh, dual, dual code, uh, dual role available on their,

07:47.020 --> 07:51.720
uh, on their, uh, um, on their, uh, uh, privilege.

07:51.720 --> 08:02.160
I mean, on their, like, like if, if I go through, uh, authorizer, it will check that, uh, if, uh, if this, uh, role has, uh, dual permissions available or not.

08:02.200 --> 08:07.460
Uh, if dual permissions are available, it will, uh, assign that, uh, admin panel to me.

08:07.520 --> 08:23.180
So, uh, uh, uh, what I did, I just, uh, load this URL from, uh, from the, uh, uh, from the, uh, authorizer role and, uh, it will, uh, allow me access to, uh, the admin panel, but there was no module was loading.

08:23.180 --> 08:30.600
There was just, uh, they were just maybe just, uh, hiding the modules, uh, uh, from the admin application.

08:30.600 --> 08:46.320
So what I did, I just used the event IDs, uh, put the event IDs in, uh, in the, uh, parameter and try to load, uh, try to load different, uh, modules, uh, from this generated, uh, uh, admin session from the authorizer role.

08:46.320 --> 08:53.340
So, uh, I, I did it one by one, uh, from the, uh, uh, starting from the user list report.

08:53.380 --> 09:11.380
So, uh, when I, when I load the event IDs, uh, I found that, uh, the, uh, pages, uh, uh, template pages were loading and while, uh, clicking on submit, I was able to access all their, uh, user, uh, from the, from an authorizer role.

09:11.940 --> 09:22.700
Uh, so, uh, using those event IDs and there are some frames URLs as well, so the frames URLs are connecting, uh, uh, connecting to the event IDs only.

09:22.720 --> 09:42.420
So, uh, uh, uh, whatever you load, even the, uh, even the frames or, uh, event IDs, you will get the same information and, uh, uh, just, uh, by loading one by one, uh, event IDs, you will actually able to, uh, access all of their admin panel from an authorizer or verifier role.

09:44.340 --> 09:55.320
So it was just hiding, hiding the, uh, hiding the, uh, uh, uh, modules, uh, not actually authorizing the, uh, user, uh, for, for that particular role.

09:56.080 --> 10:12.260
So, this is the, this is the second finding, uh, I found like, uh, this is again, um, I'm, uh, I was using, uh, uh, uh, event IDs to load up, uh, to load a particular, uh, particular, uh, function.

10:12.260 --> 10:22.360
So what I did, I, uh, using GS, uh, GS link finder, I, uh, caught up with a particular page, uh, limit setup main page.gsp.

10:22.380 --> 10:42.760
And, uh, when I load this page, I was actually able to, uh, get a, uh, get a, um, uh, get a page where, uh, I was able to, uh, set up their, uh, customers, uh, whatever, whatever, uh, withdrawal or whatever daily limit they want to set for each customer.

10:42.760 --> 10:47.280
So, uh, I can set it for, uh, their all customers as well.

10:47.280 --> 10:58.940
So, uh, once I, uh, click and, uh, they just, uh, simply, uh, set up their, uh, limit to all the, all the customers they have.

11:04.070 --> 11:05.790
You missed the meme here.

11:06.410 --> 11:06.970
Yeah.

11:06.970 --> 11:07.810
Last minute prep.

11:07.810 --> 11:08.410
Sorry, guys.

11:08.410 --> 11:09.130
Missed the meme.

11:09.130 --> 11:11.330
There was supposed to be a very surprised cat there.

11:14.370 --> 11:15.450
So, yeah.

11:15.450 --> 11:35.010
So, uh, so when, when I, uh, so there was another, another part of this, uh, uh, this, that I didn't, I didn't, uh, tell you that when you, once you submit the, submit the, uh, uh, submit any request, it will actually go to the, uh, go to, uh, as authorizer.

11:35.010 --> 11:38.670
So you have to authorize that request in order to get it approved.

11:38.690 --> 11:43.190
So, uh, so these IDs are, uh, these event IDs are quite simple.

11:43.190 --> 11:59.910
So as you say, as you can see, if you want to, uh, weave, weave any page or modify any page or, uh, authorize any page, you just have to modify a simple value like view modify auth, uh, and just, just have to, uh, just have to, uh, alter those values to,

11:59.910 --> 12:01.450
uh, set, set this up.

12:01.490 --> 12:13.390
And, uh, uh, once, once you load this, uh, let's say you modify something and, uh, you end up, uh, in authorization page and, uh, you just have to modify the auth ID.

12:13.390 --> 12:22.090
And, uh, once you, once you go to the auth ID, you will, uh, you will have to do, I mean, uh, they, they display, uh, uh, the value you just modified.

12:22.110 --> 12:27.190
You just have to, uh, authorize that value to, uh, have it set up for all the users.

12:27.470 --> 12:45.630
So, so, uh, since I, uh, since I modified, uh, value from here, uh, I just, uh, modify, I just, uh, go to the, uh, authorization page and there was a request pending that, uh, uh, that, uh, this, this particular thing is modified.

12:45.630 --> 12:48.990
You just have to authorize it or unauthorize, uh, unauthorize it.

12:48.990 --> 13:03.770
So just for, uh, since, since it, it was client application and I don't want to, uh, uh, impact it, uh, much, so I just, uh, use the unauthorized button to simply reject the request which I, uh, just, uh, sent for modification.

13:03.770 --> 13:17.050
Since it was for all the customers, so just, just for, uh, safer side, maybe they are using a, uh, broad, uh, behind, uh, and showing us the, this is a staging environment only.

13:18.610 --> 13:28.390
So, uh, so from, from, uh, from, uh, authorized page, I just click on the, uh, authorizer ID, which was, uh, uh, which was, which, which I just modified.

13:28.390 --> 13:37.930
And, uh, uh, on this page, uh, there was two, two things, uh, authorize, reject, you, uh, if you, if you authorize, it will set up for all the, all the, all their customers.

13:38.070 --> 13:44.290
If you reject, uh, it will, uh, instantly reject and, uh, do not modify the, those limits to all the customers.

13:44.530 --> 13:48.310
So I just, uh, rejected it and, and simply, uh, got rejected.

13:49.250 --> 14:00.970
So, uh, in the finding three, uh, the, uh, it, it was a customer onboarding, um, IDR, um, uh, again, it was, uh, it was through the event IDs only.

14:01.130 --> 14:08.830
And, uh, um, I found an interesting event IDs, uh, from the, from the JS that, uh, customer set of view page.

14:08.830 --> 14:19.310
So I thought, uh, I thought, uh, I might, I might be able to, uh, I might be able to, uh, set up the customer, uh, customers, uh, information from this page.

14:19.450 --> 14:29.230
So, uh, what I did, I just go to the, uh, uh, servlet and I modified the, uh, event IDs to, uh, customer set it, set up, uh, view main page.

14:29.230 --> 14:40.690
And, uh, what I, uh, and, uh, there was, uh, and, uh, uh, when, when I loaded, uh, it was actually loading that, uh, customers, uh, uh, customers information.

14:41.250 --> 14:45.910
And, uh, uh, there was, there was one more button that is, uh, action.

14:45.910 --> 14:57.210
Uh, if you, uh, if you want to modify, uh, put the value in the, uh, uh, event IDs itself.

14:57.490 --> 15:15.830
So once, once you get, uh, once you got the, uh, event, uh, once you got the, that customer, you, you have, you just have to, uh, click on it and, uh, um, and, uh, you can, uh, you can modify whatever, uh, the group name or, uh, you can, uh, even, uh,

15:15.830 --> 15:21.130
remove the, uh, remove the, uh, uh, corporate ID from, uh, from that particular customer.

15:21.130 --> 15:36.970
So, uh, once you remove the corporate ID that, from that customer, uh, actually all their accounts got, get unlinked and, uh, um, they, uh, their, even their customers do not have, uh, do not able to, uh, access their account information.

15:41.750 --> 16:01.490
So while, while, uh, so, uh, again, um, once I, once I submit this request, I have to authorize this, uh, so I just modified the, uh, uh, event ID to auth page and, uh, once I go there, I just have to authorize or reject this, uh, in order to, uh, approve it for that,

16:01.490 --> 16:03.350
that particular customer.

16:04.850 --> 16:17.970
So, uh, while, while, while, uh, while doing this, all of, all of this, I also found, found that, uh, uh, the, the customer setup page was also vulnerable to, uh, accesses.

16:17.970 --> 16:40.090
So what I did, I just put the, uh, put the access payload in, uh, their, uh, uh, their, um, relationship manager, uh, name, and, uh, whenever they see the relationship manager, uh, name on their, uh, bank, uh, bank, uh, uh, account, uh, the, the access payload will pop up and,

16:40.090 --> 16:48.490
uh, I can, uh, able to grab their cookies just from, uh, just straight from their, uh, uh, their, uh, uh, bank, uh, bank account.

16:51.530 --> 16:59.750
So, uh, so the, as I said that, uh, there was, uh, there was two side of this application.

16:59.750 --> 17:04.010
One is, uh, the front, front office and one is the back office.

17:04.070 --> 17:18.250
The front office, uh, contains the widget, uh, widget servlet and the back office contains, uh, uh, contains the, uh, uh, another, another, uh, servlet.

17:18.250 --> 17:31.090
So, uh, so what I did, I just, uh, I just, uh, sort all the widget controller, uh, and, uh, start, uh, fudging for, uh, SQL injection vulnerabilities.

17:31.090 --> 17:36.870
What I found that, uh , there was, uh, one parameter that is called DIR.

17:36.870 --> 17:41.950
Uh, it was giving me 500 internal server error while supplying a single, single code.

17:41.950 --> 17:51.490
So, I, I, so, uh, I thought, I mean, there, there was a change in response, so I thought, uh, let's try some Boolean and blind conditions.

17:51.550 --> 18:10.330
So, uh, when I try, when I started, uh, fudging for Boolean and blind based, I found that, uh, there was a Boolean based, uh, blind is working and, uh, the database is Oracle and, uh, I, I just, I just used a SQL map to dump all their, uh, all their, uh,

18:10.330 --> 18:19.710
databases and, uh, I was able to fuzz, uh, I was able to get, uh, all of their, uh, all of their, uh, databases dumps.

18:21.610 --> 18:39.730
So, uh, since, since I was able to, uh, since I was able to escalate the, uh, escalate the, uh , authorizer role or verifier role in the, uh, admin panel, so I just used an authorizer role and, uh, um, I tried to weave the, uh, customer, uh, customer weave,

18:39.730 --> 18:50.130
uh, customer set of view page and, um, I found that the customer, uh, name, customer, customer underscore name was vulnerable to, uh, again, Boolean based blind.

18:50.130 --> 19:01.830
And, uh, uh, what I do, I just, uh, went ahead and, uh, uh, started, uh, started the, uh, Escal map on it and, uh, I was able to, uh, dump all their, uh, DB again.

19:03.070 --> 19:13.550
So, uh, I got, like I said, like, uh, this was fun and profit, so I got all the fun and I got all of profits as well.

19:15.230 --> 19:24.530
So, so later, uh, after an year they come and they said that, uh, uh , we have fixed all the issues.

19:24.550 --> 19:32.890
So what they did, they just removed the corporate admin power module from the application and they think that it's, uh, fixed from their site.

19:33.330 --> 19:46.710
And on the, on the, on the front end, they, they come after another one year and they put the, uh, Cloudflare, uh, across their application and they think that it's fixed again.

19:46.710 --> 19:51.530
Um, so that's... Yeah.

19:51.530 --> 19:58.050
So looking at it from my end, from the triage end, you have to ask what the clients always ask us what, what it's matter.

19:58.250 --> 20:04.930
Um, if you come in, you do a cross-site scripting, you pop an alert that just says one, the CEO is going to go, okay.

20:05.130 --> 20:14.370
What we had to kind of go in and explain to them is not only do we manage to have almost full admin access from any role across your system.

20:14.690 --> 20:19.170
We managed to also dump your entire SQL database and showed them a row and a column that we pulled.

20:19.550 --> 20:21.650
And so we can also take care of that.

20:21.650 --> 20:27.050
And then in addition, anybody who has a relationship manager listed, I can now get their credits.

20:27.050 --> 20:29.270
That's all his high value clients.

20:29.290 --> 20:34.350
Um, when we see these relationship managers in our banking app, imagine that just stole your ID.

20:34.490 --> 20:43.090
That's where they start coming in and they go, oh, and yeah, that's when you want to be that guy going, this is what I found you.

20:43.430 --> 20:53.470
Um, and so getting their attention with this, when this hit, they were paying a lot of attention once they saw clearly what the impact was that basically Nix ran rough shot over them.

20:53.770 --> 20:58.650
Um, so yeah, that's kind of what we're looking at with bad session management.

20:58.970 --> 21:01.570
So anything else add Nix?

21:01.730 --> 21:03.990
No, I guess that's, that's all for a month.

21:03.990 --> 21:04.450
All right.

21:04.450 --> 21:05.190
Thank you guys.

21:05.190 --> 21:08.070
Uh, hopefully this was kind of informative and you guys learned something.

