1 00:00:00,000 --> 00: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. 2 00:00:10,760 --> 00:00:12,540 I am so sorry. 3 00:00:17,290 --> 00:00:24,050 Hey, yeah, so today we are talking about hacking corporate banking for fun and profit. 4 00:00:24,050 --> 00:00:30,870 So introducing myself, I'm a full-time bug bounty hunter for, uh, for SNAC. 5 00:00:30,870 --> 00:00:37,590 Uh, uh, I also recognized, uh, uh, in 2021 as, uh, and as one of the legend hacker. 6 00:00:37,710 --> 00:00:40,290 And, uh, I will, sorry. 7 00:00:40,650 --> 00:00:41,430 Okay. 8 00:00:41,430 --> 00: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. 9 00:00:50,950 --> 00:00:53,830 Hey guys, my name's Charlie Waterhouse. 10 00:00:53,830 --> 00: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. 11 00:00:59,170 --> 00:01:02,410 And we kind of worked together to go a little further and figure out some stuff on this. 12 00:01:02,550 --> 00:01:05,970 Um, I have spent non-traditional and pen testing background. 13 00:01:05,970 --> 00:01:11,830 I spent 22 years as an airline flight attendant, international, uh, manager and speaker and translator. 14 00:01:12,070 --> 00: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. 15 00:01:20,550 --> 00:01:23,730 Some of you guys out here, uh, that have seen me on the back end of that. 16 00:01:23,990 --> 00:01:28,110 Um, I work with a lot of our large corporate clients to help them understand the flaws. 17 00:01:28,550 --> 00: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. 18 00:01:36,550 --> 00:01:40,070 So to start, we're going to give you guys a little bit about this. 19 00:01:40,170 --> 00: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. 20 00:01:46,830 --> 00:01:50,310 Um, and the scope was our corporate banking application. 21 00:01:50,310 --> 00:01:53,210 This is the back end where they're doing transfers and setting up stuff. 22 00:01:53,510 --> 00: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. 23 00:02:01,130 --> 00:02:03,870 So this was like, okay, now we can start digging a little more. 24 00:02:05,510 --> 00:02:07,150 The program has three roles. 25 00:02:07,150 --> 00:02:08,770 We have a maker, verifier and checker. 26 00:02:08,770 --> 00:02:10,510 The maker initiates a transaction . 27 00:02:10,690 --> 00:02:13,650 Uh, the checker ensures everything's in place and ready to go. 28 00:02:13,750 --> 00:02:16,010 Verifier is the final checkbox. 29 00:02:16,350 --> 00:02:17,850 And so the app has corporate groups. 30 00:02:17,850 --> 00:02:23,050 Each was managed by different branches and they're all separate and not linked to each other, recognized by GCIF. 31 00:02:23,050 --> 00:02:29,190 Now, one of the things we found out from my end, when we started looking, louder, louder, always. 32 00:02:29,190 --> 00:02:29,630 Okay. 33 00:02:29,670 --> 00:02:34,190 So when we started looking, we found that the GCIF is actually kind of a unique thing. 34 00:02:34,190 --> 00:02:36,350 I just, we started poking around. 35 00:02:36,430 --> 00:02:39,830 This is a Google patent for linking your bank accounts together. 36 00:02:39,970 --> 00:02:42,410 So let's say that you have a large corporate bank. 37 00:02:42,410 --> 00:02:46,810 You have a loan that's for your house, for your car, for your bank, for your credit cards. 38 00:02:46,870 --> 00:02:48,730 They all link you through your GCIF. 39 00:02:48,730 --> 00:02:53,090 So it's your universal identifier across different divisions within the same bank. 40 00:02:53,470 --> 00:02:55,910 So let's keep that in mind when we're going through this. 41 00:02:56,970 --> 00:02:58,330 And next slide. 42 00:02:58,350 --> 00:03:03,430 So we can see what each role looks like with the maker, the verifier and the authorizer. 43 00:03:03,430 --> 00:03:05,950 These are pretty standard and look pretty similar. 44 00:03:06,490 --> 00:03:10,330 So at this point, um, Nick, so you want to take it over where you were at on this. 45 00:03:11,230 --> 00:03:11,870 Yeah. 46 00:03:11,870 --> 00:03:18,850 So, uh, so client has given, uh, some, uh, SLAs when they are going to fix all these vulnerabilities. 47 00:03:19,090 --> 00: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. 48 00:03:38,040 --> 00:03:40,160 So, uh, there you go. 49 00:03:41,280 --> 00: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. 50 00:03:48,060 --> 00:03:52,520 Um, the maker role has administration, uh, application module on it. 51 00:03:52,520 --> 00: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. 52 00:04:02,700 --> 00:04:08,460 Um, there's a servlet path for the front office, uh, that we see here and the admin path. 53 00:04:08,540 --> 00: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. 54 00:04:21,160 --> 00:04:23,320 And then we had the modifiers to go in with it. 55 00:04:23,520 --> 00:04:28,900 And then the front office was in the web portal spot and input validation was required to get in. 56 00:04:30,400 --> 00:04:31,160 Excellent. 57 00:04:31,900 --> 00:04:35,160 So there was, uh, there was two sides of this application. 58 00:04:35,160 --> 00:04:38,280 One is, uh, front-end and the other is, uh, the back-end. 59 00:04:38,280 --> 00:04:42,720 Back-end is not really a back -end, but they have given, uh, custom permissions on it. 60 00:04:42,760 --> 00: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. 61 00:04:53,120 --> 00: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. 62 00:05:04,440 --> 00: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. 63 00:05:16,800 --> 00:05:22,360 Uh, so I go ahead and, uh, decided to review their, uh, JavaScript files. 64 00:05:22,400 --> 00: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. 65 00:05:32,700 --> 00: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. 66 00:05:46,260 --> 00: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, 67 00:06:02,420 --> 00:06:08,800 uh, uh, if you, if you have access to that, uh, particular functionality, you will, uh, uh, able to load it. 68 00:06:09,000 --> 00: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, 69 00:06:29,740 --> 00: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. 70 00:06:41,080 --> 00: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. 71 00:06:49,580 --> 00: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. 72 00:07:03,480 --> 00: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. 73 00:07:12,920 --> 00:07:17,020 So what they're doing that, uh, the maker role has, uh, admin button. 74 00:07:17,020 --> 00:07:22,440 So, uh, when, when I click the admin button, it will redirect me to the admin, admin panel of it. 75 00:07:22,440 --> 00: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. 76 00:07:30,680 --> 00: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, 77 00:07:47,020 --> 00:07:51,720 uh, on their, uh, um, on their, uh, uh, privilege. 78 00:07:51,720 --> 00: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. 79 00:08:02,200 --> 00:08:07,460 Uh, if dual permissions are available, it will, uh, assign that, uh, admin panel to me. 80 00:08:07,520 --> 00: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. 81 00:08:23,180 --> 00:08:30,600 There was just, uh, they were just maybe just, uh, hiding the modules, uh, uh, from the admin application. 82 00:08:30,600 --> 00: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. 83 00:08:46,320 --> 00:08:53,340 So, uh, I, I did it one by one, uh, from the, uh, uh, starting from the user list report. 84 00:08:53,380 --> 00: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. 85 00:09:11,940 --> 00: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. 86 00:09:22,720 --> 00: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. 87 00:09:44,340 --> 00: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. 88 00:09:56,080 --> 00: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. 89 00:10:12,260 --> 00: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. 90 00:10:22,380 --> 00: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. 91 00:10:42,760 --> 00:10:47,280 So, uh, I can set it for, uh, their all customers as well. 92 00:10:47,280 --> 00: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. 93 00:11:04,070 --> 00:11:05,790 You missed the meme here. 94 00:11:06,410 --> 00:11:06,970 Yeah. 95 00:11:06,970 --> 00:11:07,810 Last minute prep. 96 00:11:07,810 --> 00:11:08,410 Sorry, guys. 97 00:11:08,410 --> 00:11:09,130 Missed the meme. 98 00:11:09,130 --> 00:11:11,330 There was supposed to be a very surprised cat there. 99 00:11:14,370 --> 00:11:15,450 So, yeah. 100 00:11:15,450 --> 00: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. 101 00:11:35,010 --> 00:11:38,670 So you have to authorize that request in order to get it approved. 102 00:11:38,690 --> 00:11:43,190 So, uh, so these IDs are, uh, these event IDs are quite simple. 103 00:11:43,190 --> 00: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, 104 00:11:59,910 --> 00:12:01,450 uh, set, set this up. 105 00:12:01,490 --> 00: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. 106 00:12:13,390 --> 00: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. 107 00:12:22,110 --> 00:12:27,190 You just have to, uh, authorize that value to, uh, have it set up for all the users. 108 00:12:27,470 --> 00: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. 109 00:12:45,630 --> 00:12:48,990 You just have to authorize it or unauthorize, uh, unauthorize it. 110 00:12:48,990 --> 00: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. 111 00:13:03,770 --> 00: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. 112 00:13:18,610 --> 00: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. 113 00:13:28,390 --> 00: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. 114 00:13:38,070 --> 00:13:44,290 If you reject, uh, it will, uh, instantly reject and, uh, do not modify the, those limits to all the customers. 115 00:13:44,530 --> 00:13:48,310 So I just, uh, rejected it and, and simply, uh, got rejected. 116 00:13:49,250 --> 00: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. 117 00:14:01,130 --> 00: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. 118 00:14:08,830 --> 00: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. 119 00:14:19,450 --> 00: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. 120 00:14:29,230 --> 00: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. 121 00:14:41,250 --> 00:14:45,910 And, uh, uh, there was, there was one more button that is, uh, action. 122 00:14:45,910 --> 00:14:57,210 Uh, if you, uh, if you want to modify, uh, put the value in the, uh, uh, event IDs itself. 123 00:14:57,490 --> 00: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, 124 00:15:15,830 --> 00:15:21,130 remove the, uh, remove the, uh, uh, corporate ID from, uh, from that particular customer. 125 00:15:21,130 --> 00: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. 126 00:15:41,750 --> 00: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, 127 00:16:01,490 --> 00:16:03,350 that particular customer. 128 00:16:04,850 --> 00: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. 129 00:16:17,970 --> 00: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, 130 00:16:40,090 --> 00: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. 131 00:16:51,530 --> 00:16:59,750 So, uh, so the, as I said that, uh, there was, uh, there was two side of this application. 132 00:16:59,750 --> 00:17:04,010 One is, uh, the front, front office and one is the back office. 133 00:17:04,070 --> 00: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. 134 00:17:18,250 --> 00: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. 135 00:17:31,090 --> 00:17:36,870 What I found that, uh , there was, uh, one parameter that is called DIR. 136 00:17:36,870 --> 00:17:41,950 Uh, it was giving me 500 internal server error while supplying a single, single code. 137 00:17:41,950 --> 00: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. 138 00:17:51,550 --> 00: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, 139 00:18:10,330 --> 00: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. 140 00:18:21,610 --> 00: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, 141 00:18:39,730 --> 00: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. 142 00:18:50,130 --> 00: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. 143 00:19:03,070 --> 00: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. 144 00:19:15,230 --> 00:19:24,530 So, so later, uh, after an year they come and they said that, uh, uh , we have fixed all the issues. 145 00:19:24,550 --> 00: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. 146 00:19:33,330 --> 00: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. 147 00:19:46,710 --> 00:19:51,530 Um, so that's... Yeah. 148 00:19:51,530 --> 00: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. 149 00:19:58,250 --> 00: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. 150 00:20:05,130 --> 00: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. 151 00:20:14,690 --> 00:20:19,170 We managed to also dump your entire SQL database and showed them a row and a column that we pulled. 152 00:20:19,550 --> 00:20:21,650 And so we can also take care of that. 153 00:20:21,650 --> 00:20:27,050 And then in addition, anybody who has a relationship manager listed, I can now get their credits. 154 00:20:27,050 --> 00:20:29,270 That's all his high value clients. 155 00:20:29,290 --> 00:20:34,350 Um, when we see these relationship managers in our banking app, imagine that just stole your ID. 156 00:20:34,490 --> 00: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. 157 00:20:43,430 --> 00: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. 158 00:20:53,770 --> 00:20:58,650 Um, so yeah, that's kind of what we're looking at with bad session management. 159 00:20:58,970 --> 00:21:01,570 So anything else add Nix? 160 00:21:01,730 --> 00:21:03,990 No, I guess that's, that's all for a month. 161 00:21:03,990 --> 00:21:04,450 All right. 162 00:21:04,450 --> 00:21:05,190 Thank you guys. 163 00:21:05,190 --> 00:21:08,070 Uh, hopefully this was kind of informative and you guys learned something.