1 00:00:08,220 --> 00:00:13,460 My topic for today is authentication bypass and account takeovers. 2 00:00:14,140 --> 00:00:23,420 So this talk is for people who are in pen testing, who are doing red teaming activities and who are in bug bounty hunting. 3 00:00:23,700 --> 00:00:28,360 Other than that, if you are a student or new to this field, this is for you as well. 4 00:00:28,440 --> 00:00:30,220 So I hope you will enjoy it. 5 00:00:31,920 --> 00:00:37,620 So the agenda for today's talk is, I have divided it in three different phases. 6 00:00:37,620 --> 00:00:47,420 First is introduction, I will discuss about what authentication is, why it's so crucial and what are the different modules where you can look for such bugs. 7 00:00:48,400 --> 00:01:00,300 The phase two is techniques and vulnerabilities, which I personally use to take over the accounts and bypass the authentications during my entire career. 8 00:01:00,300 --> 00:01:07,900 I mean, I have eight years of experience and I have used these techniques during the pen testing activities, red teaming activities and bug bounty hunting. 9 00:01:08,620 --> 00:01:15,480 The third phase is, I identified account takeover or authentication bypass in Apple. 10 00:01:15,480 --> 00:01:17,020 I will disclose that. 11 00:01:19,680 --> 00:01:26,500 Little bit about myself, my name is Vikas Khanna, I am technical specialist at Privasec. 12 00:01:26,500 --> 00:01:38,560 My key focus is on AppSec, web applications, API security, whenever I'm not working on my professional stuff, I am bit active on bug bounty hunting. 13 00:01:38,820 --> 00:01:45,320 I got acknowledgements from companies like Google, Microsoft, Apple and many more. 14 00:01:45,360 --> 00:01:48,200 Other than that, I have contributed to the community. 15 00:01:48,220 --> 00:01:54,380 I have contributed to OWASP, WSTG and OWASP www community. 16 00:01:55,140 --> 00:02:02,120 Other than that, I have a few CVs from Oracle and IBM for reporting them issues in their enterprise products. 17 00:02:02,120 --> 00:02:04,100 All right. 18 00:02:04,600 --> 00:02:06,060 So what is authentication? 19 00:02:06,080 --> 00:02:13,400 Basically authentication is a process to verify a user or a system that they are what they are claiming to be. 20 00:02:13,680 --> 00:02:21,400 By verifying their credentials in terms of their user names, password, digital signatures and many more things. 21 00:02:22,500 --> 00:02:38,620 Authentication is very crucial, for example, there are post login modules which are having sensitive information, your PIIs and information which not everybody should be able to see without logging into the application. 22 00:02:38,620 --> 00:02:40,880 So that is why authentication is very crucial. 23 00:02:42,280 --> 00:02:56,240 So whenever we are hunting for authentication bypass and account takeovers, these are the abusable vectors or functionalities where you can focus on. 24 00:02:56,240 --> 00:03:06,060 Basically I have identified issues in these features, these functionalities, but this bug is not limited to these features only. 25 00:03:06,060 --> 00:03:07,460 I mean you can explore. 26 00:03:07,580 --> 00:03:09,820 But this is based on my experience. 27 00:03:11,980 --> 00:03:21,600 Okay, real time abuse vectors, like vulnerabilities and techniques which you can use basically to take over the accounts and bypass the authentications. 28 00:03:22,520 --> 00:03:25,980 All right, first vulnerability is session puzzling. 29 00:03:25,980 --> 00:03:27,100 What is session puzzling? 30 00:03:27,100 --> 00:03:52,580 Session puzzling is like whenever you have extra permissions on your session ID, for example, you are in pre-login stage and for some modules or some activities you got a session ID and that session ID is misconfigured and having a permission, over permission which you can use to access the post login modules as well. 31 00:03:52,580 --> 00:03:57,620 Basically it's in pre-login stage, but you can access post-login modules as well. 32 00:03:59,580 --> 00:04:04,260 All right, so the example for this is forgot password functionality. 33 00:04:04,260 --> 00:04:24,520 How forgot password functionality works, like there is a forgot password module, you can enter your email ID, application will redirect you to another page where application will ask you for OTPs or maybe security questions and if you provide OTP, correct OTP or correct security questions answer, 34 00:04:24,520 --> 00:04:30,660 application will redirect you to another page where you can enter the new password and change the password. 35 00:04:30,800 --> 00:04:43,060 But for the second page, where application is asking for security questions answer or OTP, application have created a session which is linked with your email ID, which you provided on the first page. 36 00:04:43,220 --> 00:05:01,060 But if the application is misconfigured and that session variable, session ID is having over permissions, you can, without entering the security answer or OTP, you can access the post-login modules by just using that particular session ID, because it is activated globally. 37 00:05:01,560 --> 00:05:07,560 So this issue I have identified in Apple and I will show in the later slides. 38 00:05:09,160 --> 00:05:12,740 All right, other vulnerabilities, session fixation. 39 00:05:12,740 --> 00:05:20,560 So , as name suggests that in this vulnerability, you can fix the session in pre-login stage. 40 00:05:20,560 --> 00:05:27,380 Basically, the pre-login and post-login session variables value will remain same. 41 00:05:27,380 --> 00:05:33,600 It will be just the state of the session token which will become active or deactive. 42 00:05:33,900 --> 00:05:34,760 All right? 43 00:05:34,760 --> 00:05:39,300 So there are two ways we can use this vulnerability. 44 00:05:39,300 --> 00:05:46,220 One is whenever your victim is in the remote location. 45 00:05:46,220 --> 00:05:47,960 So how you can leverage that? 46 00:05:48,360 --> 00:06:00,280 So if you are able to get the session ID in URL in pre-login stage, what you can do, you can copy that and send it to your victims. 47 00:06:00,460 --> 00:06:00,820 All right? 48 00:06:00,820 --> 00:06:11,400 Whenever your victim will click on that link, since the link belongs to the legitimate application, victim will click on that and will enter the credentials. 49 00:06:11,580 --> 00:06:16,680 When victim will enter the credentials, the session ID will become in an active state. 50 00:06:17,200 --> 00:06:25,880 Since you are the one, you are the attacker, you have that session ID, you can use it on your machine and you can log in into the victim's account directly. 51 00:06:25,880 --> 00:06:27,440 You don't have to enter the passwords. 52 00:06:27,920 --> 00:06:32,600 So that's how you can bypass the authentication and take over the accounts. 53 00:06:32,800 --> 00:06:36,300 This is when your victim is remote. 54 00:06:36,300 --> 00:06:44,800 The other thing is whenever, let's say, you are working on a shared machine, there is a machine which is shared by multiple users. 55 00:06:44,880 --> 00:06:49,400 So what you can do, you can go to that machine, you can copy the cookies. 56 00:06:49,680 --> 00:07:02,000 Since pre-login and post-login cookie will be the same, you can just copy that and whenever your victim will log in to that particular application, you can use that cookie and you can bypass the authentication by using victim's account. 57 00:07:04,160 --> 00:07:05,020 All right. 58 00:07:05,020 --> 00:07:08,940 The other is access control checks. 59 00:07:09,460 --> 00:07:18,700 IDRs, IDRs are best friends, we can use that to perform a number of activities and one of them is account takeovers and authentication bypasses. 60 00:07:18,700 --> 00:07:20,060 So how you can take over the accounts? 61 00:07:20,060 --> 00:07:29,420 For example, application performing some sort of sensitive activities like change password, update profiles by just checking the user's ID. 62 00:07:29,920 --> 00:07:32,800 Sometimes it's in even hidden parameters. 63 00:07:32,800 --> 00:07:44,400 You can use tools like client-side proxy tool like Burpsuit and you can just modify the user ID and if the application is vulnerable, you will be able to take over the accounts of your victims. 64 00:07:44,840 --> 00:07:46,880 The other is privilege escalations. 65 00:07:47,600 --> 00:07:51,900 Let's say if you are performing gray box assessments as a pen tester. 66 00:07:52,420 --> 00:08:01,100 So you will be aware with admin level modules as well and non-privileged user or non-admin users modules as well. 67 00:08:01,100 --> 00:08:07,080 So you can log in into the least privileged user account and you can try to access the admin account. 68 00:08:07,440 --> 00:08:13,920 And if the application is vulnerable to access controls and privilege escalations, you can access the admin level modules. 69 00:08:14,900 --> 00:08:28,380 Depending on the application's functionality, let's say there could be a number of sensitive modules where you can play with maybe let's say there is an admin module where you can see the number of users. 70 00:08:28,380 --> 00:08:30,240 You can deactivate their accounts. 71 00:08:30,240 --> 00:08:32,400 You can change their passwords. 72 00:08:32,480 --> 00:08:33,620 You can block them. 73 00:08:33,620 --> 00:08:37,320 You know , you can, depending on the application's functionality, you can do a number of things. 74 00:08:37,900 --> 00:08:39,760 Other thing is forced browsing. 75 00:08:40,440 --> 00:08:50,380 Forced browsing is something when you are forcefully trying to access post authentication modules by just hitting them without providing any credentials. 76 00:08:50,540 --> 00:08:55,920 If there is access control bug, you will be able to access the post login modules as well. 77 00:08:55,920 --> 00:09:03,640 And let's say there are configuration files which are not linked with the application but are still present in the server. 78 00:09:03,760 --> 00:09:13,100 So you can access those configuration files and, you know, it will share, it will disclose a lot of sensitive information depending on what kind of configuration file is there. 79 00:09:14,380 --> 00:09:15,520 All right. 80 00:09:15,700 --> 00:09:23,180 Next is password reset link hijacking or poisoning by using post header injection. 81 00:09:23,180 --> 00:09:28,480 So let me explain what is post header injection and how it works first. 82 00:09:28,480 --> 00:09:30,900 Then we will dig into how we can abuse it. 83 00:09:31,460 --> 00:09:47,560 So whenever you are hitting an application, application verify, okay, what's the value of post header, its origin, and accordingly application will fetch the responses from that particular application server and assign to you the resources. 84 00:09:49,280 --> 00:09:56,160 So whenever you are having redirection, 301, 302, you can use post header vulnerability. 85 00:09:56,160 --> 00:10:05,820 You can change the host header's value and you can check the location header if your host header's value is getting reflected into the location header in the response itself. 86 00:10:06,300 --> 00:10:08,560 How you can use it to take over the accounts. 87 00:10:08,720 --> 00:10:23,300 So for example, there's a password functionality, you can go there, you can enter your victim's email ID, you can capture the request by using Bobsuit, and you can change the host value to the domain which you can control. 88 00:10:24,500 --> 00:10:29,320 So here, 0xnoob is, for example, my domain, I'm an attacker. 89 00:10:29,840 --> 00:10:37,440 So I can enter my victim's email ID, I can capture the request, and I can change the host header value to 0xnoob. 90 00:10:37,820 --> 00:10:40,960 So what application will do, how password functionality works. 91 00:10:40,960 --> 00:10:47,380 Application will send you a reset token link to your email ID, you can click on that and update the password. 92 00:10:47,520 --> 00:11:05,980 But here, since you have updated the host header value, application server will send a password reset link to your email ID, with the password reset token, but the URL which will be embedded will be 0xnoob, or the domain which you will provide. 93 00:11:05,980 --> 00:11:19,540 All right, so since it is coming from the legitimate application server, victim will click on the link, you can use it in red teaming activities, you can try it on pentesting, bug bounty hunting. 94 00:11:20,080 --> 00:11:31,100 Victim will click on that particular link, and you can go to your server logs, and you can capture the, you can grab the reset token. 95 00:11:31,280 --> 00:11:36,420 Since it's still in the active state, because victim haven't used it on legitimate application yet. 96 00:11:36,820 --> 00:11:47,200 So you can go to the legitimate application and embed that particular token, and that's how you can take over the accounts, because a token is still in active state. 97 00:11:47,200 --> 00:11:51,440 You can enter the credentials, and you can change the credentials of your victim. 98 00:11:51,520 --> 00:11:53,320 That's how you can take over the accounts. 99 00:11:55,020 --> 00:11:56,400 JS files. 100 00:11:57,280 --> 00:12:03,680 A lot of people usually don't get into the JS files, they don't bother about it. 101 00:12:03,680 --> 00:12:15,940 But JS files are something which are very crucial, and sometimes it's having some sort of sensitive stuff, funny stuff, I mean, depending on, you know, what sort of stuff is there. 102 00:12:15,940 --> 00:12:23,400 So you can find API keys, you can find credentials, you can even find the sensitive API endpoints. 103 00:12:25,760 --> 00:12:28,400 PHP type juggling, give me a moment. 104 00:12:38,390 --> 00:12:42,050 So type juggling is a feature of PHP. 105 00:12:42,670 --> 00:12:43,930 What does it mean? 106 00:12:44,450 --> 00:12:52,990 So it's a functionality of PHP where you don't have to define the data types, PHP will do it for you. 107 00:12:52,990 --> 00:13:05,110 PHP will, whenever PHP will perform any operations or comparisons on the variables or parameters, PHP will convert the data type accordingly and perform the action. 108 00:13:05,110 --> 00:13:12,770 For example, the first parameter is number 1, which is a string, 10 is in double quotes. 109 00:13:12,990 --> 00:13:17,170 The second parameter is number 2, which is 5, which is integer. 110 00:13:17,510 --> 00:13:21,550 And in third parameter we are performing operation, additional operation. 111 00:13:21,810 --> 00:13:32,450 So whenever we are performing addition, PHP will convert string, which is 10, to an integer and will perform the addition operation. 112 00:13:32,450 --> 00:13:37,310 So the result will be 15, 10 plus 5 is 15. 113 00:13:38,590 --> 00:13:41,710 So the other thing is comparison. 114 00:13:41,710 --> 00:13:47,290 Whenever PHP will perform a comparison by using 2 times equals 2. 115 00:13:48,330 --> 00:13:53,830 So what PHP will do, first parameter here is integer, second is string. 116 00:13:53,990 --> 00:13:57,650 So the second parameter's value is 10 abc, which is a string. 117 00:13:57,650 --> 00:14:08,610 Whenever you will perform a comparison operation here, PHP will convert that string, 10 abc, to 10, which will become integer. 118 00:14:08,670 --> 00:14:11,770 And then PHP will perform the action accordingly. 119 00:14:11,770 --> 00:14:15,330 So 10 is equal to 10, so the result will be equals. 120 00:14:15,730 --> 00:14:18,730 How we can leverage it to take over the accounts. 121 00:14:18,730 --> 00:14:28,930 All right, so let's say there is a value of parameter which don't have the integer. 122 00:14:29,230 --> 00:14:40,170 So if you will convert that string with the integer, PHP will convert that string to zero and then it will compare with the user's provided input. 123 00:14:40,210 --> 00:14:48,070 So for example, the admin's password is not having an integer value, having a string only. 124 00:14:48,070 --> 00:14:52,350 So as an attacker, you can mention zero in the password. 125 00:14:52,810 --> 00:14:55,490 PHP will compare it with admin password. 126 00:14:55,490 --> 00:14:57,150 Admin password is a string. 127 00:14:57,590 --> 00:15:04,130 PHP will convert admin's password to zero and zero is equal to zero will become a true statement. 128 00:15:04,390 --> 00:15:06,890 That's how you can bypass the authentication. 129 00:15:07,230 --> 00:15:09,690 But there is prerequisites. 130 00:15:10,410 --> 00:15:15,390 It should be JSON or serialized object. 131 00:15:15,390 --> 00:15:17,830 Then only you will be able to perform this attack. 132 00:15:20,670 --> 00:15:21,750 CSRF. 133 00:15:21,750 --> 00:15:27,930 Let's say in the application CSRF tokens are missing and there is no CSRF protection. 134 00:15:28,350 --> 00:15:32,910 And there is a module where you can update the mobile number, email ID. 135 00:15:32,910 --> 00:15:36,210 You can craft an HTML page and send it to your victim. 136 00:15:36,210 --> 00:15:44,530 If that victim is logged in into their account, you can literally update their mobile numbers and email address. 137 00:15:44,530 --> 00:15:58,710 Once you will be able to do that, you can request for a password by entering the email or password, email or mobile number which you have mentioned during the HTML page creation. 138 00:15:58,710 --> 00:16:00,330 Then you can take over their accounts. 139 00:16:00,330 --> 00:16:10,290 Because application will send the OTPs or password reset links to their phone number and email ID, which belongs to the victim's account. 140 00:16:10,290 --> 00:16:23,930 Let's say if there is a password functionality where application is not asking for old passwords and application is vulnerable to CSRF, you can just craft a request and send to your victim and you will be able to change the password. 141 00:16:23,930 --> 00:16:25,850 From there you can take over their accounts. 142 00:16:26,930 --> 00:16:28,810 HTTP parameter pollution. 143 00:16:29,130 --> 00:16:35,710 It's a vulnerability where you can mention multiple parameters with the same name. 144 00:16:35,710 --> 00:16:37,590 But the values will be different. 145 00:16:37,590 --> 00:16:41,310 And the application will perform the action on the basis of that. 146 00:16:41,450 --> 00:16:45,550 So let's say there is a password functionality, all right? 147 00:16:45,630 --> 00:16:52,790 And you can mention maybe, you can use that one parameter for twice, for two times. 148 00:16:52,790 --> 00:16:58,130 And mention the victim's email ID plus your own email ID. 149 00:16:58,150 --> 00:17:04,950 So if the application is vulnerable, application will send password reset token to both the email IDs. 150 00:17:04,950 --> 00:17:08,450 But it will be activated for one account only. 151 00:17:08,730 --> 00:17:12,390 Depending on how application is doing that. 152 00:17:12,390 --> 00:17:15,990 Maybe it is validating the first parameter or second parameter. 153 00:17:15,990 --> 00:17:17,230 That you have to figure out. 154 00:17:17,230 --> 00:17:19,210 It depends on different applications. 155 00:17:20,150 --> 00:17:31,190 So accordingly, let's say whenever you receive that link, you can just go to application and you can just change the password of your victim and you can take over the account. 156 00:17:31,190 --> 00:17:38,190 You can try this on reset password, update password, wherever you are receiving OTPs, you can try that vulnerability. 157 00:17:40,470 --> 00:17:44,830 Authentication bypasses by using response manipulation. 158 00:17:46,070 --> 00:17:54,310 So a few applications are validating the previous response and then perform the next action. 159 00:17:55,150 --> 00:18:00,870 So let's say the response is on the basis of true or false. 160 00:18:00,870 --> 00:18:06,870 If you have provided the right credentials, application is throwing you the true response. 161 00:18:07,630 --> 00:18:14,650 And if you have provided the wrong credentials, application will throw the false response. 162 00:18:14,650 --> 00:18:18,410 So you can change that to true and you can perform the next action. 163 00:18:18,410 --> 00:18:19,290 You can bypass. 164 00:18:20,070 --> 00:18:22,970 Accordingly, you can manipulate the status codes. 165 00:18:22,970 --> 00:18:34,310 If application is throwing 400 or something for wrong credentials and throwing 200 OK for right credentials, you can try to manipulate that. 166 00:18:37,190 --> 00:18:42,110 Two-factor authentication or OTP, you can break that. 167 00:18:42,370 --> 00:18:43,250 How? 168 00:18:43,490 --> 00:18:48,690 So whenever you are performing pentesting specially, you can use these things. 169 00:18:49,010 --> 00:18:53,290 You can check for the integrity validation of OTPs. 170 00:18:53,290 --> 00:19:00,130 For example, I can send OTP to my mobile number and send OTP to my victim's mobile number. 171 00:19:00,130 --> 00:19:05,150 Sometimes, so these two OTPs are in active state now. 172 00:19:05,210 --> 00:19:10,430 Because neither I used nor my victim used it for now. 173 00:19:10,430 --> 00:19:11,270 So what can I do? 174 00:19:11,270 --> 00:19:15,230 Since both the OTPs are in active state, I can check the integrity. 175 00:19:15,230 --> 00:19:19,370 I can try my OTP on my victim's account. 176 00:19:19,370 --> 00:19:19,610 I can try my OTP on my victim's account . 177 00:19:19,610 --> 00:19:23,670 Just to validate that application is checking the integrity of the OTP or not. 178 00:19:23,670 --> 00:19:25,170 And trust me, it's still working. 179 00:19:27,890 --> 00:19:32,170 Reusability of OTPs, you can try to reuse the OTPs. 180 00:19:32,550 --> 00:19:40,830 And the third one is, I found it in one of the most popular banks. 181 00:19:41,270 --> 00:19:45,490 So they were disclosing the OTPs in the responses. 182 00:19:45,490 --> 00:19:50,890 So, I mean, go for it, check for responses as well. 183 00:19:51,050 --> 00:19:54,790 Master OTPs, I found it in one of the net banking applications. 184 00:19:55,010 --> 00:19:57,530 The master OTP was six times zeros. 185 00:19:58,470 --> 00:20:01,350 So you can log into any account by using six times zero. 186 00:20:01,350 --> 00:20:05,870 I mean, you can try for other stuff also, so go for it. 187 00:20:07,590 --> 00:20:09,910 All right, brute force. 188 00:20:12,070 --> 00:20:17,270 So whenever we are thinking about brute force, we are trying to brute force the passwords. 189 00:20:17,770 --> 00:20:21,490 We can try another way as well by using password spraying attack. 190 00:20:21,670 --> 00:20:26,230 We can brute force the emails by using one password. 191 00:20:26,230 --> 00:20:29,790 We have one password and we can try that on multiple users. 192 00:20:29,790 --> 00:20:32,530 We can try to brute force in that way as well. 193 00:20:32,530 --> 00:20:38,490 So whenever you are performing red teaming activities or bug hunting or something, you just need one account to perform your actions. 194 00:20:38,490 --> 00:20:41,750 So this will be very handy. 195 00:20:42,370 --> 00:20:46,690 Try to check if there are rate limiting controls are enabled or not. 196 00:20:46,950 --> 00:20:55,950 Other than that, sometimes application is blocking your IP address whenever you are performing brute force attacks. 197 00:20:55,990 --> 00:20:59,490 So you can hop on different IP addresses. 198 00:20:59,490 --> 00:21:04,250 You can change your IP addresses depending on how application is blocking it. 199 00:21:04,250 --> 00:21:06,830 Maybe after 15 requests or 50 requests. 200 00:21:06,830 --> 00:21:16,130 And just before, let's say application is blocking IP after every 50 requests, you know, within maybe some sort of time foundation. 201 00:21:16,190 --> 00:21:20,990 So you can change your IP on 49th attempt. 202 00:21:20,990 --> 00:21:22,710 Accordingly, you can try that. 203 00:21:24,550 --> 00:21:32,050 You can send multiple credentials in request to validate that, I mean, it is working or not. 204 00:21:32,130 --> 00:21:38,930 There is a very, very good lab of web security academy, please check that. 205 00:21:39,890 --> 00:21:41,270 Default credentials. 206 00:21:42,070 --> 00:21:45,830 This is very, very handy in rate limiting activities. 207 00:21:46,490 --> 00:21:51,250 So , I mean, almost every organisation is using enterprise products. 208 00:21:51,690 --> 00:21:54,170 Go for it, check for the default credentials. 209 00:21:54,390 --> 00:21:57,170 I mean, it's still working, I usually find that. 210 00:21:57,810 --> 00:22:03,270 WordPress, it is one of the most popular CMS. 211 00:22:03,270 --> 00:22:15,610 So there is a so-called feature in WordPress where you can use author parameter just to verify that what's the username of one. 212 00:22:15,670 --> 00:22:22,070 I mean, let's say if you will enter the author's value one, it will show you the first user of that particular application. 213 00:22:22,230 --> 00:22:27,210 If you will change it to two, it will show you the second user of that particular application. 214 00:22:27,210 --> 00:22:31,750 It will show you the username, it will show you the posts which are done by that user. 215 00:22:31,750 --> 00:22:33,970 It might show you the comments as well. 216 00:22:34,270 --> 00:22:38,210 So accordingly you can enumerate user's information. 217 00:22:38,710 --> 00:22:47,950 And whenever you are performing WP scan, don't perform directly without using API keys. 218 00:22:47,970 --> 00:22:54,770 Please use API key, you can go to WP scan website, you can get API key, it's free of cost. 219 00:22:54,790 --> 00:23:00,990 And by using that particular API key, if you will perform the WP scan, the results will be definitely different. 220 00:23:02,710 --> 00:23:12,070 In secure logout management, whenever you are working on pen testing, check for these things, especially for banking applications. 221 00:23:12,210 --> 00:23:16,050 For example, reuse of session, check if you can reuse that particular session. 222 00:23:16,050 --> 00:23:21,930 Login to the application, logout from the application, check if you can still use the old sessions. 223 00:23:22,510 --> 00:23:25,410 Close the browser for the sensitive applications. 224 00:23:25,410 --> 00:23:32,030 Whenever you are closing the browser, it should dissolve the entire session at the server side. 225 00:23:32,430 --> 00:23:41,770 Let's say if there is a net banking application and you are closing the browser, whenever you are again accessing the application by using new tab, it shouldn't work. 226 00:23:42,130 --> 00:23:44,210 Application should ask you for the login. 227 00:23:45,190 --> 00:23:48,650 Session should bound to IP address for sensitive applications. 228 00:23:48,790 --> 00:24:01,890 For example, as an attacker, if I am able to get the session of my victim, but if let's say that is bound to their IP address only, I won't be able to use that. 229 00:24:03,770 --> 00:24:04,830 Check for it. 230 00:24:06,710 --> 00:24:09,950 Tips for red teamers and pen testers. 231 00:24:10,890 --> 00:24:14,230 Go to pastebin whenever you are performing red teaming activities. 232 00:24:14,390 --> 00:24:18,430 Go to pastebin, pastebin have a lot of sensitive stuff. 233 00:24:18,890 --> 00:24:22,970 DHash, go for DHash, you can find the passwords of your victims. 234 00:24:22,970 --> 00:24:27,130 Open bug bounty, this website is very handy. 235 00:24:27,130 --> 00:24:30,950 I used it multiple times and it helped me a lot. 236 00:24:30,950 --> 00:24:38,430 You can find a lot of vulnerabilities which are identified by other attackers. 237 00:24:38,850 --> 00:24:47,130 And they have disclosed those vulnerabilities publicly because the vendor is not entertaining them. 238 00:24:47,830 --> 00:24:50,630 So you can use those vulnerabilities. 239 00:24:50,630 --> 00:25:04,210 My first bug, I found it in Apple, I found account takeover or authentication bypass basically, I will call it as authentication bypass. 240 00:25:04,830 --> 00:25:06,870 So that was my first bug in Apple. 241 00:25:12,500 --> 00:25:19,600 So this was session puzzling, which I explained in the earlier stage. 242 00:25:19,700 --> 00:25:28,000 So I was able to get the session variable, which was active for post-login modules as well. 243 00:25:28,920 --> 00:25:30,420 In the pre-login stage. 244 00:25:31,820 --> 00:25:40,440 Here I am on login page, I'm trying application is redirecting me to the login page only. 245 00:25:40,440 --> 00:25:43,260 There is a story behind that. 246 00:25:43,500 --> 00:25:46,840 The domain name is instafusion.apple.com. 247 00:25:47,220 --> 00:25:54,440 If I will go to that domain directly, it will redirect me to the SSO of Apple. 248 00:25:54,660 --> 00:25:57,020 Based on my understanding, it is bit secure. 249 00:25:57,020 --> 00:25:59,140 I haven't tested that, to be honest. 250 00:25:59,140 --> 00:26:03,100 But yeah, based on my understanding, it is secure. 251 00:26:04,600 --> 00:26:15,940 Then I did some sort of Google docking and I got to know that there is a subdirectory with a random string folder name and there is a login module there. 252 00:26:16,100 --> 00:26:18,060 So I tried to hunt here. 253 00:26:21,140 --> 00:26:26,250 I removed the login page, application is redirecting me to login again. 254 00:26:26,720 --> 00:26:28,240 Here it is. 255 00:26:29,930 --> 00:26:35,180 So application is asking me for a username and email address. 256 00:26:35,940 --> 00:26:40,500 I provided a fake username and fake email ID. 257 00:26:48,080 --> 00:26:52,880 I got an error that please try again. 258 00:26:52,880 --> 00:27:11,680 But for this particular thing, when application was throwing me an error, application created a session which belongs to my email ID and they have activated it for the entire application and which was linked to the admin module. 259 00:27:13,600 --> 00:27:14,160 Now 260 00:27:17,320 --> 00:27:22,580 I tried to remove the login and tried to access the subdirectory. 261 00:27:23,160 --> 00:27:24,000 Boom. 262 00:27:30,160 --> 00:27:31,460 Thank you. 263 00:27:33,700 --> 00:27:39,020 So here I was able to download the confidential details. 264 00:27:39,620 --> 00:27:43,660 I have blurred a few contents because of sensitive information. 265 00:27:44,180 --> 00:27:46,280 So yeah, I was able to download as well.