[00:00.000 --> 00:04.940] All right, I would like you all to give me, put your hands together and welcome to the [00:04.940 --> 00:12.540] stage our next presenters, Nix and Charlie. I am so sorry. [00:17.290 --> 00:26.630] Hey, yeah, so today we are talking about hacking corporate banking for fun and profit. So introducing [00:26.630 --> 00:33.930] myself, I'm a full-time bug bounty hunter for, uh, for SNAC. Uh, uh, I also recognized, uh, uh, [00:33.930 --> 00:43.650] in 2021 as, uh, and as one of the legend hacker. And, uh, I will, sorry. Okay. Uh, I'm also, I'm [00:43.650 --> 00:50.750] also founder of, uh, B-Sides Ahmedabad and, uh, uh, I am advisor at, uh, riskprofiler.io. [00:50.950 --> 00:56.310] Hey guys, my name's Charlie Waterhouse. Um, I am a security analyst and was on the back [00:56.310 --> 01:00.450] side of this, helping triage these vaults as they came in. And we kind of worked together to go a [01:00.450 --> 01:05.550] little further and figure out some stuff on this. Um, I have spent non-traditional and pen [01:05.550 --> 01:11.110] testing background. I spent 22 years as an airline flight attendant, international, uh, manager and [01:11.110 --> 01:16.710] speaker and translator. In the meantime though, I've also done over 2,400 engagements, uh, based [01:16.710 --> 01:22.030] on OWASP and reviewed about 25, 30,000 reports from a lot. Some of you guys out here, uh, that [01:22.030 --> 01:26.730] have seen me on the back end of that. Um, I work with a lot of our large corporate clients to help [01:26.730 --> 01:31.770] them understand the flaws. And as I like to say, translate the geek side to non-geek so that the [01:31.770 --> 01:38.370] guys who are not technical understand what we're looking at. So to start, we're going to give you [01:38.370 --> 01:42.930] guys a little bit about this. Um, during the bounty hunt on this, we were kind of looking at, [01:42.930 --> 01:49.590] this was a private program for a large, large bank. Um, and the scope was our corporate banking [01:49.590 --> 01:54.390] application. This is the back end where they're doing transfers and setting up stuff. Um, after [01:54.390 --> 01:59.590] exploring a bit, we found that there was a third party application that was running and, uh, claimed [01:59.590 --> 02:03.870] to be used by 60% of the banks. So this was like, okay, now we can start digging a little more. [02:05.510 --> 02:10.330] The program has three roles. We have a maker, verifier and checker. The maker initiates a [02:10.330 --> 02:14.870] transaction. Uh, the checker ensures everything's in place and ready to go. Verifier is the final [02:14.870 --> 02:19.250] checkbox. And so the app has corporate groups. Each was managed by different branches [02:19.250 --> 02:23.730] and they're all separate and not linked to each other, recognized by GCIF. Now, [02:23.730 --> 02:29.630] one of the things we found out from my end, when we started looking, louder, louder, always. Okay. [02:29.670 --> 02:34.630] So when we started looking, we found that the GCIF is actually kind of a unique thing. I just, [02:34.630 --> 02:39.830] we started poking around. This is a Google patent for linking your bank accounts together. [02:39.970 --> 02:44.230] So let's say that you have a large corporate bank. You have a loan that's for your house, [02:44.230 --> 02:48.810] for your car, for your bank, for your credit cards. They all link you through your GCIF. So [02:48.810 --> 02:54.130] it's your universal identifier across different divisions within the same bank. So let's keep [02:54.130 --> 02:59.810] that in mind when we're going through this. And next slide. So we can see what each role looks [02:59.810 --> 03:04.910] like with the maker, the verifier and the authorizer. These are pretty standard and [03:04.910 --> 03:09.570] look pretty similar. So at this point, um, Nick, so you want to take it over where you were at on [03:09.570 --> 03:18.210] this. Yeah. So, uh, so client has given, uh, some, uh, SLAs when they are going to fix all [03:18.210 --> 03:23.450] these vulnerabilities. So starting from critical, uh, which, which is, which has been given that, [03:23.450 --> 03:30.270] uh, they will fix in like 15 days, uh, high up to 30 days, medium up to 90 days, but they, [03:30.270 --> 03:39.200] they never followed it and they fix all the vulnerabilities after one year. So, uh, [03:39.200 --> 03:45.120] there you go. So getting to know the application, uh, it's using servlets and kind of a single [03:45.120 --> 03:50.940] page app, which we tend to kind of go, eh, not much there. Um, the maker role has administration, [03:50.940 --> 03:56.580] uh, application module on it. And so we're kind of noted that, and that, uh, each role has custom [03:56.580 --> 04:01.520] permissions, but the maker role does have that admin, um, but it doesn't have all the admin [04:01.520 --> 04:07.760] permissions. Um, there's a servlet path for the front office, uh, that we see here and the admin [04:07.760 --> 04:12.560] path. What we kind of want to focus on though, is these widget IDs and the event IDs, because [04:12.560 --> 04:16.700] these are going to come critical as we go through and we're going to use them through those, uh, [04:16.700 --> 04:22.120] modifiers, several pages with keywords that we saw with that event ID. And then we had the [04:22.120 --> 04:26.720] modifiers to go in with it. And then the front office was in the web portal spot and input [04:26.720 --> 04:34.460] validation was required to get in. Excellent. So there was, uh, there was two sides of this [04:34.460 --> 04:39.740] application. One is, uh, front-end and the other is, uh, the back-end. Back-end is not really a [04:39.740 --> 04:45.740] back-end, but they have given, uh, custom permissions on it. Uh, the, it is a kind of [04:45.740 --> 04:51.160] very large application, so, uh, they haven't provided much, much of, uh, uh, like, uh, [04:51.160 --> 04:59.240] permissions on it. So, uh, so when there was, uh, demo, uh, sorry, so as I, so I started recording [04:59.240 --> 05:04.920] on the application, uh, I found that, uh, they are running, uh, a third-party application. And [05:04.920 --> 05:10.400] this third-party application was, uh, demo only, so I couldn't find much information available on [05:10.400 --> 05:18.980] the, uh, and I don't want to call them and, uh, have a demo set up for myself. Uh, so I go ahead [05:18.980 --> 05:25.520] and, uh, decided to review their, uh, JavaScript files. Uh, JavaScript, uh, so basically, uh, this [05:25.520 --> 05:31.640] application has two event IDs, uh, two, uh, two, uh, parameters, event IDs and, uh, widget, widget [05:31.640 --> 05:39.460] IDs. So, uh, what I did, I, uh, and, uh, and there was, there was one more parameter, GC, uh, GCIF, [05:39.460 --> 05:44.400] which, uh, Charlie just, uh, explains that, uh, is used to, uh, and it, uh, identify the bank [05:44.400 --> 05:50.820] customer all across the world. So, uh, what I did, I, uh, used, uh, uh, GraphScript to, uh, uh, [05:50.820 --> 05:56.120] figure out all the event IDs because what happened is, uh, if you want to serve any functionality [05:56.120 --> 06:01.600] in this application, you have to change the, uh, event IDs, uh, uh, in the, in the parameter and [06:01.600 --> 06:06.760] you will get, uh, uh, if you, if you have access to that, uh, particular functionality, you will, [06:06.760 --> 06:14.220] uh, uh, able to load it. So, uh, what I did, I just, uh, grabbed all the, uh, event IDs, uh, [06:14.220 --> 06:21.300] through, through, uh, GraphScript and, uh, uh, and, and each, uh, there, there was, uh, like [06:21.300 --> 06:30.460] common.js, uh, file, but, uh, in each page you load, uh, the event IDs, you will get a new, uh, [06:30.460 --> 06:38.200] JavaScript file and it has, uh, it, it will contain a new, um, event IDs, uh, for, uh, next, [06:38.200 --> 06:45.560] maybe for the next functionalities. So, uh, so this is like, uh, uh, this is like, uh, a few, [06:45.560 --> 06:51.680] uh, event IDs that I found, uh, from, uh, just, just to start from. And, uh, after I, uh, after [06:51.680 --> 06:59.820] I go load these event IDs in the application, I, uh, found like more than, uh, 500, uh, modules [06:59.820 --> 07:09.740] running on this application. So, so starting from, uh, the, our first findings, uh, so it, it, it's [07:09.740 --> 07:15.200] an acceleration from, uh, authorizer to admin role. So what they're doing that, uh, the maker [07:15.200 --> 07:20.540] role has, uh, admin button. So, uh, when, when I click the admin button, it will redirect me to [07:20.540 --> 07:26.700] the admin, admin panel of it. But, uh, the admin panel also do not have much permissions available, [07:26.700 --> 07:33.800] uh, just a couple of, uh, couple of, uh, modules are loading. So what I, so, uh, when I click, [07:33.800 --> 07:38.940] click the, uh, click that, uh, uh, admin role, uh, what I found that, uh, they are generating, [07:38.940 --> 07:45.300] uh, they are basically, uh, checking that if, uh, this, uh, role has, uh, dual, dual code, [07:45.300 --> 07:52.240] uh, dual role available on their, uh, on their, uh, um, on their, uh, uh, privilege. I mean, [07:52.240 --> 07:58.340] on their, like, like if, if I go through, uh, authorizer, it will check that, uh, if, uh, if [07:58.340 --> 08:04.100] this, uh, role has, uh, dual permissions available or not. Uh, if dual permissions are available, [08:04.100 --> 08:11.000] it will, uh, assign that, uh, admin panel to me. So, uh, uh, uh, what I did, I just, uh, load this [08:11.000 --> 08:18.760] URL from, uh, from the, uh, uh, from the, uh, authorizer role and, uh, it will, uh, allow me [08:18.760 --> 08:24.460] access to, uh, the admin panel, but there was no module was loading. There was just, uh, they [08:24.460 --> 08:31.300] were just maybe just, uh, hiding the modules, uh, uh, from the admin application. So what I did, [08:31.300 --> 08:38.280] I just used the event IDs, uh, put the event IDs in, uh, in the, uh, parameter and try to load, [08:38.280 --> 08:44.640] uh, try to load different, uh, modules, uh, from this generated, uh, uh, admin session [08:44.640 --> 08:51.840] from the authorizer role. So, uh, I, I did it one by one, uh, from the, uh, uh, starting from [08:51.840 --> 09:00.020] the user list report. So, uh, when I, when I load the event IDs, uh, I found that, uh, the, uh, [09:00.020 --> 09:06.700] pages, uh, uh, template pages were loading and while, uh, clicking on submit, I was able to [09:06.700 --> 09:14.860] access all their, uh, user, uh, from the, from an authorizer role. Uh, so, uh, using those event [09:14.860 --> 09:20.440] IDs and there are some frames URLs as well, so the frames URLs are connecting, uh, uh, [09:20.440 --> 09:28.540] connecting to the event IDs only. So, uh, uh, uh, whatever you load, even the, uh, even the [09:28.540 --> 09:34.700] frames or, uh, event IDs, you will get the same information and, uh, uh, just, uh, by loading [09:34.700 --> 09:40.140] one by one, uh, event IDs, you will actually able to, uh, access all of their admin panel from [09:40.140 --> 09:48.880] an authorizer or verifier role. So it was just hiding, hiding the, uh, hiding the, uh, uh, uh, [09:48.880 --> 09:55.320] modules, uh, not actually authorizing the, uh, user, uh, for, for that particular role. [09:56.080 --> 10:03.300] So, this is the, this is the second finding, uh, I found like, uh, this is again, um, I'm, uh, [10:03.300 --> 10:11.420] I was using, uh, uh, uh, event IDs to load up, uh, to load a particular, uh, particular, uh, [10:11.420 --> 10:18.380] function. So what I did, I, uh, using GS, uh, GS link finder, I, uh, caught up with a particular [10:18.380 --> 10:26.420] page, uh, limit setup main page.gsp. And, uh, when I load this page, I was actually able to, [10:26.420 --> 10:34.820] uh, get a, uh, get a, um, uh, get a page where, uh, I was able to, uh, set up their, uh, [10:34.820 --> 10:41.820] customers, uh, whatever, whatever, uh, withdrawal or whatever daily limit they want to set for each [10:41.820 --> 10:51.420] customer. So, uh, I can set it for, uh, their all customers as well. So, uh, once I, uh, click and, [10:51.420 --> 10:58.940] uh, they just, uh, simply, uh, set up their, uh, limit to all the, all the customers they have. [11:04.070 --> 11:08.410] You missed the meme here. Yeah. Last minute prep. Sorry, guys. [11:08.410 --> 11:11.330] Missed the meme. There was supposed to be a very surprised cat there. [11:14.370 --> 11:22.690] So, yeah. So, uh, so when, when I, uh, so there was another, another part of this, uh, uh, this, [11:22.690 --> 11:29.650] that I didn't, I didn't, uh, tell you that when you, once you submit the, submit the, uh, uh, [11:29.650 --> 11:35.790] submit any request, it will actually go to the, uh, go to, uh, as authorizer. So you have to [11:35.790 --> 11:42.490] authorize that request in order to get it approved. So, uh, so these IDs are, uh, these event IDs are [11:42.490 --> 11:47.570] quite simple. So as you say, as you can see, if you want to, uh, weave, weave any page or modify [11:47.570 --> 11:54.090] any page or, uh, authorize any page, you just have to modify a simple value like view modify [11:54.090 --> 12:01.110] auth, uh, and just, just have to, uh, just have to, uh, alter those values to, uh, set, set this [12:01.110 --> 12:08.710] up. And, uh, uh, once, once you load this, uh, let's say you modify something and, uh, you end [12:08.710 --> 12:14.530] up, uh, in authorization page and, uh, you just have to modify the auth ID. And, uh, once you, [12:14.530 --> 12:19.710] once you go to the auth ID, you will, uh, you will have to do, I mean, uh, they, they display, [12:19.710 --> 12:25.650] uh, uh, the value you just modified. You just have to, uh, authorize that value to, uh, have it [12:25.650 --> 12:35.730] set up for all the users. So, so, uh, since I, uh, since I modified, uh, value from here, uh, I [12:35.730 --> 12:40.210] just, uh, modify, I just, uh, go to the, uh, authorization page and there was a request [12:40.210 --> 12:46.370] pending that, uh, uh, that, uh, this, this particular thing is modified. You just have to [12:46.370 --> 12:52.010] authorize it or unauthorize, uh, unauthorize it. So just for, uh, since, since it, it was client [12:52.010 --> 12:58.870] application and I don't want to, uh, uh, impact it, uh, much, so I just, uh, use the unauthorized [12:58.870 --> 13:04.550] button to simply reject the request which I, uh, just, uh, sent for modification. Since it was [13:04.550 --> 13:11.770] for all the customers, so just, just for, uh, safer side, maybe they are using a, uh, broad, uh, [13:11.770 --> 13:20.910] behind, uh, and showing us the, this is a staging environment only. So, uh, so from, from, uh, [13:20.910 --> 13:26.630] from, uh, authorized page, I just click on the, uh, authorizer ID, which was, uh, uh, which was, [13:26.630 --> 13:32.770] which, which I just modified. And, uh, uh, on this page, uh, there was two, two things, uh, [13:32.770 --> 13:36.990] authorize, reject, you, uh, if you, if you authorize, it will set up for all the, all the, [13:36.990 --> 13:42.550] all their customers. If you reject, uh, it will, uh, instantly reject and, uh, do not modify the, [13:42.550 --> 13:48.310] those limits to all the customers. So I just, uh, rejected it and, and simply, uh, got rejected. [13:49.250 --> 13:58.290] So, uh, in the finding three, uh, the, uh, it, it was a customer onboarding, um, IDR, um, uh, [13:58.290 --> 14:03.790] again, it was, uh, it was through the event IDs only. And, uh, um, I found an interesting [14:03.790 --> 14:10.410] event IDs, uh, from the, from the JS that, uh, customer set of view page. So I thought, uh, [14:10.410 --> 14:16.190] I thought, uh, I might, I might be able to, uh, I might be able to, uh, set up the customer, [14:16.190 --> 14:22.970] uh, customers, uh, information from this page. So, uh, what I did, I just go to the, uh, uh, [14:22.970 --> 14:29.230] servlet and I modified the, uh, event IDs to, uh, customer set it, set up, uh, view main page. [14:29.230 --> 14:35.690] And, uh, what I, uh, and, uh, there was, uh, and, uh, uh, when, when I loaded, uh, it was [14:35.690 --> 14:43.190] actually loading that, uh, customers, uh, uh, customers information. And, uh, uh, there was, [14:43.190 --> 14:52.950] there was one more button that is, uh, action. Uh, if you, uh, if you want to modify, uh, [14:52.950 --> 15:00.190] put the value in the, uh, uh, event IDs itself. So once, once you get, uh, once you got the, [15:00.190 --> 15:05.830] uh, event, uh, once you got the, that customer, you, you have, you just have to, uh, click on it [15:05.830 --> 15:14.430] and, uh, um, and, uh, you can, uh, you can modify whatever, uh, the group name or, uh, you can, uh, [15:14.430 --> 15:20.550] even, uh, remove the, uh, remove the, uh, uh, corporate ID from, uh, from that particular [15:20.550 --> 15:26.470] customer. So, uh, once you remove the corporate ID that, from that customer, uh, actually all [15:26.470 --> 15:33.110] their accounts got, get unlinked and, uh, um, they, uh, their, even their customers do not [15:33.110 --> 15:45.390] have, uh, do not able to, uh, access their account information. So while, while, uh, so, uh, [15:45.390 --> 15:51.510] again, um, once I, once I submit this request, I have to authorize this, uh, so I just modified [15:51.510 --> 15:58.310] the, uh, uh, event ID to auth page and, uh, once I go there, I just have to authorize or reject [15:58.310 --> 16:06.330] this, uh, in order to, uh, approve it for that, that particular customer. So, uh, while, while, [16:06.330 --> 16:14.370] while, uh, while doing this, all of, all of this, I also found, found that, uh, uh, the, the [16:14.370 --> 16:20.870] customer setup page was also vulnerable to, uh, accesses. So what I did, I just put the, uh, put [16:20.870 --> 16:29.070] the access payload in, uh, their, uh, uh, their, um, relationship manager, uh, name, and, uh, [16:29.070 --> 16:36.430] whenever they see the relationship manager, uh, name on their, uh, bank, uh, bank, uh, uh, [16:36.430 --> 16:42.890] account, uh, the, the access payload will pop up and, uh, I can, uh, able to grab their cookies [16:42.890 --> 16:54.130] just from, uh, just straight from their, uh, uh, their, uh, uh, bank, uh, bank account. So, uh, [16:54.750 --> 17:00.390] so the, as I said that, uh, there was, uh, there was two side of this application. One is, uh, [17:00.390 --> 17:06.710] the front, front office and one is the back office. The front office, uh, contains the [17:06.710 --> 17:16.450] widget, uh, widget servlet and the back office contains, uh, uh, contains the, uh, uh, another, [17:16.450 --> 17:24.630] another, uh, servlet. So, uh, so what I did, I just, uh, I just, uh, sort all the widget controller, [17:24.630 --> 17:32.370] uh, and, uh, start, uh, fudging for, uh, SQL injection vulnerabilities. What I found that, [17:32.370 --> 17:39.290] uh, there was, uh, one parameter that is called DIR. Uh, it was giving me 500 internal server [17:39.290 --> 17:45.750] error while supplying a single, single code. So, I, I, so, uh, I thought, I mean, there, [17:45.750 --> 17:51.490] there was a change in response, so I thought, uh, let's try some Boolean and blind conditions. [17:51.550 --> 17:57.770] So, uh, when I try, when I started, uh, fudging for Boolean and blind based, I found that, uh, [17:57.770 --> 18:05.730] there was a Boolean based, uh, blind is working and, uh, the database is Oracle and, uh, I, [18:05.730 --> 18:12.790] I just, I just used a SQL map to dump all their, uh, all their, uh, databases and, uh, I was able [18:12.790 --> 18:19.710] to fuzz, uh, I was able to get, uh, all of their, uh, all of their, uh, databases dumps. [18:21.610 --> 18:27.530] So, uh, since, since I was able to, uh, since I was able to escalate the, uh, escalate the, [18:27.530 --> 18:34.390] uh, authorizer role or verifier role in the, uh, admin panel, so I just used an authorizer role [18:34.390 --> 18:41.030] and, uh, um, I tried to weave the, uh, customer, uh, customer weave, uh, customer set of view page [18:41.030 --> 18:47.550] and, um, I found that the customer, uh, name, customer, customer underscore name was vulnerable [18:47.550 --> 18:54.910] to, uh, again, Boolean based blind. And, uh, uh, what I do, I just, uh, went ahead and, uh, uh, [18:54.910 --> 19:00.730] started, uh, started the, uh, Escal map on it and, uh, I was able to, uh, dump all their, uh, [19:00.730 --> 19:11.330] DB again. So, uh, I got, like I said, like, uh, this was fun and profit, so I got all the fun and [19:11.330 --> 19:21.370] I got all of profits as well. So, so later, uh, after an year they come and they said that, uh, [19:21.370 --> 19:27.810] uh, we have fixed all the issues. So what they did, they just removed the corporate admin [19:27.810 --> 19:32.890] power module from the application and they think that it's, uh, fixed from their site. [19:33.330 --> 19:40.150] And on the, on the, on the front end, they, they come after another one year and they [19:40.150 --> 19:46.710] put the, uh, Cloudflare, uh, across their application and they think that it's fixed again. [19:46.710 --> 19:55.050] Um, so that's... Yeah. So looking at it from my end, from the triage end, you have to ask what [19:55.050 --> 20:00.390] the clients always ask us what, what it's matter. Um, if you come in, you do a cross-site scripting, [20:00.390 --> 20:06.630] you pop an alert that just says one, the CEO is going to go, okay. What we had to kind of go in [20:06.630 --> 20:12.490] and explain to them is not only do we manage to have almost full admin access from any role [20:12.490 --> 20:17.730] across your system. We managed to also dump your entire SQL database and showed them a row [20:17.730 --> 20:23.030] and a column that we pulled. And so we can also take care of that. And then in addition, anybody [20:23.030 --> 20:28.150] who has a relationship manager listed, I can now get their credits. That's all his high value [20:28.150 --> 20:33.050] clients. Um, when we see these relationship managers in our banking app, imagine that just [20:33.050 --> 20:40.630] stole your ID. That's where they start coming in and they go, oh, and yeah, that's when you want [20:40.630 --> 20:45.350] to be that guy going, this is what I found you. Um, and so getting their attention with this, [20:45.350 --> 20:50.350] when this hit, they were paying a lot of attention once they saw clearly what the impact was that [20:50.350 --> 20:56.410] basically Nix ran rough shot over them. Um, so yeah, that's kind of what we're looking at [20:56.950 --> 21:03.490] with bad session management. So anything else add Nix? No, I guess that's, that's all for [21:03.610 --> 21:07.490] a month. All right. Thank you guys. Uh, hopefully this was kind of informative and you guys learned [21:07.490 --> 21:08.070] something.