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