Good morning, everyone. Welcome to talk two in the creator stage four. Apologies to those who are watching online. We still are having technical difficulties. And so we only have the slides on the screen. We are working on it. Hopefully we'll have it for the next talk. But I would like to introduce Blackis on his talk from easy wins to epic challenges, the bounty hunter edition. Everyone involved. Hey, everyone. So I present you a bit of my journey in bug bounty. I tried to select some bugs that were quite surprising. Surprising in the sense of being very easy or being very difficult. So I will present a couple of fun bugs. So a bit about myself. So I'm doing bug bounty for seven years now. I did a lot of CTFSO for 15 years or something like that. And in general, I'm working for 18 years now. So that's quite a long time I'm doing that. I'm definitely a web application enjoyer. I love PHP. Who doesn't? And I love doing some source code review. I'm definitely not a recon guy. Not doing anything like reconnaissance or something like that. I'm just going to main apps and break them. Most of the time, at least. I really love, like, complex chain, complex exploit or something like that. And, yeah, in my journey, I did something around, like, $2 million across all platforms. And I'm also an ambassador for France. So, yeah, I'm French. That explains my pretty bad English. I'm sorry for that. If something isn't clear, don't hesitate to come later and just ask me. So we'll begin with first customer, Swisscom. So I will present a couple of bugs I found on them. Swisscom is a big provider in Switzerland. They are doing a lot of things. They are active in 2016. That was my first experience. I started, like, end of 2016 on them. And that's a pretty good team, to be honest. They're pretty fair. They're pretty kind. Good communication with them. They have a very big scope, like, millions of IP addresses. So it's pretty cool. And I did something around, like, $500,000 on them. So, yeah, that's quite good. Definitely the bug bounty, they decided to open definitely improved their security stuff over time. And, yeah, the bugs I'm presenting now are quite old. Definitely they're, like, pretty much other stuff now. But still quite some cool bugs. So if some people are interested by their bug bounty programs, they're outside of any platform, you can just take a peek of the URL. Everything is explained there. So let's talk about first target, which is Swisscom Cockpit. That's the mobile phone manager in Swisscom. That's basically where you can see your subscription and where you can just buy some packs for traveling and things like that. There's locking process on it that is quite particular. It trusts you sending your phone number and you receive an SMS token. You need also to fill a capture and you're logged in if the card is valid, right? So it definitely manage some serious confidential data, a lot of PII payments, things like that. You can see everything that is related to subscription on there. So definitely a good target for me. Also, uh, pretty good stuff for us. There is a staging instance on the internet that is, like, publicly available. That was cool. There might be some, uh, stuff that is not published on the production server and things like that. So let's talk about the first bug. Uh, I saw that on the staging instance, the SMS token is always 1, 1, 1, 1. Pretty good. Uh, the problem is the staging log in doesn't work. It always throws some internal server error. So I can't log in with it. And I was, like, yeah, maybe that's the SMS repository. It might be, like, shared with the production system. So I just try to log in on the production system. Then try to log in on the staging system. Then use 1, 1, 1, 1 on production system. And I was logged in. So that was a very simple, uh, bug. But definitely a good impact. So let's see a demo. If everything is working well, we should be able to see. Yeah. So I'm just entering a phone number. Just trying to sign in. Doing the same on the staging instance. And I'm trying on the prod instance to just input 1, 1, 1, 1. Filling the capture. Sign in. And I'm signed in. So, yeah. Pretty easy. Uh, that's not video of the real system. I reproduced everything locally. I will share the demo, uh, the demos video and instances a bit later after the talk. So, yeah. This was paid 8,000 dollars. Which is pretty good because that was super easy. But that, uh, have a nice impact for them because I have like PII of every customer there. Uh, maybe millions of PII there. So, yeah. Pretty good. Uh, second bag. So, as I said, the login process is, uh, pretty easy. You just input, uh, your phone number. You submit. Then, uh, you receive, uh, SMS codes that you need to submit with, uh, capture. But the process is also setting you, uh, three encrypted cookies. The first one is a cockpit capture text. Uh, it definitely by the name, I guess, it definitely manages capture text. Uh, the cockpit MSISDN key that manage the phone numbers that you input at the first step. And the cockpit SMS token key which, I guess, is a pin code that was received by SMS. So, I was like, okay, maybe they are using, like, the same key for encryption. So, I decided to, like, copy the cockpit SMS token key cookie into the cockpit capture text. Reload the page. And the pin code is just leaked into the capture. So, here it is. That's not very clear because there's some, uh, maybe, uh, padding issue. But you can see the code there that is 7998. So, that's once again an authentication bypass by leaking, uh, the SMS pin token into the capture which is, like, pretty lame but pretty good for me. So, let's do a small, if I can move that. Here it is. Out of the demo. So, just filling the phone number again. Trying to see the cookies. Putting the SMS token key into the capture text cookie. Just reloading. And we get the pin code into the capture which is RKB5T. That's a pin code I received by SMS. So, I'm once again logged in with that. So, pretty cool but definitely, uh, not as serious as the previous bug but because it was pretty hard to see, to read the capture. You can't really automate the attack so they decided to pay $3,000 for that. Once again, it was quite an easy bug so I can complain, uh, on the amount so I decided it might be the time to stop on cockpits. But no, here is a, is a cell bug. Uh, try to log in, input your phone number but at the time you receive the SMS pin code, just cancel and authentication successful. I have no idea why. I, I suppose they did something bad by patching, uh, some of my bugs. Uh, yeah, probably a fail. So, they decided to pay, uh, $8,000 for that because I just canceled the login process and I was logged in. Uh, I suppose you don't expect a demo for that. I mean, that's not really needed, I guess. So, for this time, let's really move on to another target. So, uh, Swisscom WorkLink, uh, is a Swisscom acquisition that was like a company that just bought. I decided to have a check. They were using, uh, completely unknown CMS called weblication, something in PHP, you know, that trigger me always. Uh, so I decided to, uh, buy a weblication license, uh, so I can grab the code and turn that into, like, some source code review. Uh, firstly, I saw that the thing is not using SQL at all. Uh, it's only some, uh, XML databases and some, uh, file system storage, which is quite not so usual. So, firstly, I saw that, uh, they have a general pass traversal prevention mechanism and in general, uh, they're trying, like, to sanitize every, uh, every variables that you can input. There is an easy bypass because they are, like, uh, trying to remove, uh, pass traversal characters and later in the process, they're trying to remove pipes. So, you can just, like, uh, use, uh, dot pipe dot pipe slash and it will be transformed to pipe, uh, to dot dot slash. So, there is, like, an easy bypass of the, uh, mechanism to prevent pass traversal. So, I decided to have a look for some pass traversal issues. Uh, I found pretty easily, uh, vulnerabilities that allow me to delete all the files, uh, in a directory, but, uh, it wasn't, uh, reachable because it checked for a specific directory on the app that was never used anywhere. So, there is no way to create that, uh, I found, uh, an arbitrary directory creation, which is generally something that is quite useless, but for that case, it was quite useful for me. So, I created the directory that was needed, uh, to reach the directory empty vulnerability. Uh, so, cool. I can delete files in directories, uh, but, come on, that's not useful. I'm definitely not wanting to deface their website, that's definitely not the goal. So, uh, I did, I, I had a check, and, uh, in the weblications, slash, uh, five directories, there is a .htaccess file, that's the only file there, but in the subdirectories, there is like all the databases, uh, all the XML databases there. Uh, the only, uh, mechanism of protection there is a .htaccess file, so maybe we can just remove the .htaccess file, so we can access the XML databases then. For some reason, I don't know why, but I decided that to, uh, name all the XML databases with a .php extension, that's quite a strange, uh, decision, but I found that, uh, the logs, uh, the login logs, uh, that, uh, database is containing, uh, the session token for all users there, so I can just read it, that's an authentication bypass, that's a win. No, it works locally, it doesn't work remotely. I have like, uh, internal server error everywhere, so I was quite in despair, I was crying a bit. Um, so my guess was, uh, my, uh, so WorkLink was using, uh, PHP short tags, so, uh, it clashed with, uh, XML open tags, so the, the system was, uh, thinking that the XML file was some PHP, it broke because of some syntax error, and so just through internal server error, so, definitely didn't work. I decided to go and say, search, uh, other vulnerabilities. I found a pre-auth FC there, but it failed again for the exact same reason, so I cried a bit again. And I found something that was maybe interesting, but quite lame, I didn't see the impact at first. I found an XML injection in the log user database. Uh, so, pretty much the same, it's also, uh, PHP extension, uh, in the same directories. So, uh, the, the injection is on the user name, and that's like the database that contains, uh, if a user name is, uh, blocked by the system, so if you're trying to log in, uh, with a specific user name more than three times, and the login is failed, you're like injected in that, uh, specific database. So, there is a XML injection there. Okay. Not so useful, I can block up entire users maybe, but, yeah, quite lame. So, I did have a check on how, uh, the XML database are passed by the application, uh, I saw that, uh, the developers, uh, did that quite well. They decided to add some layers of protection, uh, trying to prevent, uh, X include by calling dumb document, uh, X include function with a false parameter. No luck for them, uh, thanks PHP, uh, it enabled X include instead, so definitely not what they wanted. Uh, so for those that don't know, X include is, uh, XML features that allow to include other XML or even not XML documents into the current one, so it's like, exactly like PHP include, but for XML. So, trying to put, uh, that username will definitely, uh, add a X include directive that will load, uh, the login logs database into the, uh, blocked users database. Uh, that's, that's a notation for X include directive, uh, that's a bit complicated, but, yeah, definitely the impact there is, like, we can just include the entire, uh, login logs database into the blocked user database. But, uh, yeah, X include is doing their best to, like, reformat all the file to be a fully valid XML. You can break, you can't really break, uh, the file by using X include, which is quite good, it's doing, like, automatic correction and things like that. But, no, that's still useless, I mean, yeah, I can include the database into another, but that's quite useless. But, I tried to see how the log users feature is working and I found a blind X pass injection, so, in the username is you, if you can, if you inject, uh, some X pass, uh, notation, you have, uh, an injection there. So, you can definitely extract the entire log, uh, log database and I guess you see, uh, what's the interest there. We can, uh, inject, uh, the content of, of the database, uh, in, in the log database and then we can, like, exfiltrate it. So, the log database, uh, yes, I, I, I, I would say that. But, uh, so we can choose a, a blind X pass injection, we can exfiltrate session token byte by a byte per bytes. That gave me, I mean, take around the application and that time in the admin panel there is, like, feature to get RC. So, this time is a win. It works remotely. So, the chain was log user with, uh, XM injection in the username with X include directive pointing to the XM logs. Exfiltrate it with X pass injection, get admin session, get RC and let, let's go for a demo. So, we can see there on the right that the blog database is empty. Now we try to log in with X, uh, to see that just the blog database is now filled with, uh, one entry for the X, uh, user. We now try to inject some XML to see if there is a XM injection there. And yes, it is. There is now a FUBAR attribute, uh, in the, in the block, uh, block entry. So, that time we're using the payloads that, uh, we saw before with the X include directive trying to include, uh, the login log. So, yeah, I just saw that the login log contains some, uh, session stuff there. So, we make that user with the payload to be blocked. We can see that to X include directive is now there in the file of the blocked, uh, database. We make, uh, another user, another random user to be blocked. So, the file will be passed again and this time there is like the entire login log database in that block database. So, this time it was completely replaced, uh, by the, by the original login logs file. So, now we can try to use, uh, the X pass injection. So, we are like targeting, uh, a log element, trying to infiltrate the session. We check here, we're checking if it begins by a L. We know it is because we can see that on the right screen. So, if it begins by a L, we should receive that the account is blocked. But if we check, uh, if it begins by X, we receive that no user is found. So, we have an hour to leak, uh, the characters one by one. So, I write a little script. And yeah, it definitely leaks the session token character by character. So, yeah, we got, we got an admin account to that and get RC remotely. For that, uh, Swisscom decided to pay me $3,000. So, uh, $2,500 for the bag, uh, $500 for the, um, for, uh, bonus for the nice shell. And also the editor decided to, uh, reward me for, with, uh, $2,000. They didn't have the bag money, but they were like impressed by the bag. So, pretty cool for the, for, from them. So, now let's switch to yet another customer, uh, another Swiss one, uh, so Swiss Post. I'm not sure I need to explain what is Swiss Post, but it's about, they are like the postal office in Switzerland, but they are also a private company, uh, doing a lot of different things and they are like involved in a lot of, uh, major projects in Switzerland like e-voting. Uh, they decide, uh, they, they are also very active in cyber security. They like about a lot of local, uh, cyber security, security companies. So, so they are like very active in the cyber security, uh, stuff in Switzerland. They decided to start, uh, bag bounty in 2019, uh, especially for their e-voting platform, uh, and they decided to add, uh, assets, uh, over time. So, uh, they are pretty good, pretty much the same as Swisscom to be honest. Uh, we can have a lot of, uh, communication with them, they are pretty good. And yeah, if some people are from the voting village, uh, go on their bag bounty programs, they are paying like, uh, 230K for a very critical bag there, that's definitely a good program. I'm not a crypto guy, so I'm not going back, maybe you are. So, if you want to have a check, uh, everything is described on their VDP page, so vdp.post.ch. So, uh, for, for the first bag, I will talk about their, uh, payment system, so they are like their own payment system, uh, completely custom, uh, everything is quite common, you get some sign requests, uh, there's a lot of different endpoints for failure and success, and, uh, also you can stack money on your account, on your postal account, you have a balance system, so it's always interesting if we can get, like, infinite money there. I will switch this bag because we have some time issue, let's go on the second one. So, I did find a lot of, uh, stuff there, so I was, uh, hacking on them, and I was trying to manipulate some payment session there, uh, changing price in a transaction, uh, a lot of things, but, uh, a delivery man rang the doorbell in my office, so I need to get the package, seeing everything, I decided that was the time for a coffee break, and then after maybe 10, 15 minutes, I don't know, got back to my chair, and I had some money coming from nowhere on my account, so I had no idea why. So, I decided to replay everything I did, I was like, probably I triggered something, and I didn't even know, so I tried to replay everything, so, that failed. No idea what happened. So, I did to replay everything, including the coffee break, that was maybe the main point, so I did a coffee break with a colleague, and there was my account was affected again. So, I was like, okay, what's the fact, I tested a lot of things, and the real explanation is, uh, when you run the transaction, after the transaction is timed out, so you didn't, uh, make the payment, uh, in the good time frame, it's just considered successful, so probably a bad check of payment states, it default to success instead of defaulting to, uh, a failure, so, yeah. Let's go for a demo. So, let's buy a very good croissant, because I'm French. Oh, that's not a good demo. I want a croissant, a bigger one. Let's go for it. Just wait. Just go grab a coffee, maybe. Are you patient enough? Oh, yeah. No, joking, it will just last. Yeah, success payments, just by waiting. I'm in pretty good solution to get some money, right? So, I was paid, uh, $3,000 for that, uh, that's probably the most I get for, like, a coffee break or two. Definitely was quite profitable, right? So, let's go to another project of them. Uh, they have, like, a subdomain, uh, using, uh, very, very unknown, uh, CMS. So, Peppershop, that's like a Swiss page PCMS. They also do some manager thing and things like that. I never heard of them. So, I decided, once again, to buy a license, uh, of the CMS, so I get access to the code. Once again, it's PHP, so I'm super interested by that. And I just had a look at the code, everything was quite, you know, PHP. Uh, so I saw that, uh, an admin feature, uh, that is quite interesting is a restart backup thing. Uh, it's some, like, custom things. They decided that the delimiter between SQL queries will be that stuff. No idea why. Why don't use, like, semicolon like everyone do? I don't know. They decided it is. And they also have, uh, some features I never, I don't know why, because I didn't see any occurrences where they are using that, but they do. So, if you use, uh, the base64 start and the base64 end tags, that will be replaced by a single coded string of, uh, the base64 decoded string that is between the tag. I don't know why. I, I, that's quite a strange feature to be honest. So, uh, the restart backup, uh, the restart, uh, feature is using, uh, backup from a local file system, uh, that needs to be generated from the CMS backup feature, so, uh, you can't upload anything or something like that. So, my goal was, maybe I can inject SQL queries in backup from the frontend, uh, the method is exploiting the very, like, strange passing to break SQL contexts. So, my idea is, uh, if I use, like, so specific, uh, separator or, uh, like, tags in some data, uh, that is stored in the database, uh, so, uh, that will be stored in the database, uh, maybe when they will backup and restart again, that will break something if I get some data with those tags, uh, maybe on my profile, on my, I don't know, username, name, other comments, uh, things like that. The first problem is, uh, most fields are sanitized by default. That's like a global sanitize, uh, sanitization that is done on every field. Um, so, no, no new lines, no hash, no special characters in general. Uh, the second problem is that if the restore fail on one SQL query, it's like ending the process and not going further in the file. I mean, for the first problem, the solution is quite easy. Most, uh, fields are sanitized but not all. They are like exception. One of them are like, uh, comments that are put on the other. So, I can definitely reach that field, uh, on the front end. And the second, uh, problem, we have like a separate between queries and way to inject single code. So, that should be possible, uh, to get like a valid file after injecting things. So, let's imagine, uh, uh, a valid SQL query in the file formats. So, we control fully the values of Bimmerkugen. I have no idea what it means but that's the name of the database, of the, uh, table. I have no idea what it is. So, we can control that fully and you can see the separator at the end. So, we're trying to use their base 64 feature to break from single codes. So, we're trying to get something like that. That will be transformed to that. So, we inject a single code, a parenthesis, a comment and that is working pretty well to be honest. So, then my goal is to inject new queries in the packet file. So, this time I'm also adding, uh, a separator and a new, uh, query with a comment at the end. So, after being, uh, uh, passed by the restore procedures that will give that. And that's definitely valid. So, I was able to, uh, just inject, uh, an update to, uh, an arbitrary table, changing arbitrary column there. Pretty good. Um, so, the impact is I can run arbitrary queries on the restore process. If they take a backup and restore, that will run my queries. Pretty good. But, uh, the database is obviously that PHP, uh, storing some serialized, uh, PHP objects because, you know, relational databases is done for that. Storing full objects. So, I found, uh, pretty fastly a custom gadget, uh, that allow to delete local files. Once again, not the most interesting primitive for us because that's definitely not a goal to delete, uh, files on them. But I saw that, uh, the admin authentication mechanism is just, uh, dot access file. So, if we delete the dot access file, uh, everyone can go to slash admin and, uh, I mean, just that. There is no authentication besides that. Such as, like, you need, as a valid credential or you need to pipe as a dot access. The payload is too big for the screen, I'm sorry. So, let's get a demo for this one. Once again, super classic. So, the payload is in shop. So, we put the payload, uh, in the other commands. You can see the payload there. It's pretty big. It's just, uh, trying to update the other table and set, uh, a big, uh, serialized, uh, object in the data of the others. So, now, my user have, uh, like another ways, uh, or, uh, or tags, uh, or by basics for tags. So, let's go to an administrator account. Let's do a backup. Yeah, that's a fail. Let's go to the backup. Let's log in. So, let's do a backup and now trying to restore it. Not, not, before restoring it, we can see in the other that, uh, we have, like, or data that is injected, uh, in the other. So, now, trying to restore. That's definitely not the same data. We were able to update the other and add, like, a serialized object. So, let's go see the others that triggered, uh, the serialized objects and now we can go to the admin panel and there's no more authentication on it. So, yeah, that definitely deleted, uh, the htaccess so everyone is admin which is, uh, to be honest a bit, uh, frightening because, like, by exporting that I gave everyone admin access. Oops. So, they pay me, uh, six and, six hundred fifty dollars which is quite bad but, uh, the real, uh, thing is that Swiss Post is not using the backup and restore feature because they have too much data and the official backup feature there is just crashing because there is too much data. You know, like, problem of memory issues and things like that. So, that's even fair they decided to pay a bounty for that because they are, like, no chance they are using the backup and restore feature. So, yeah, still quite firm. Let's go on another customer, the most known one, redacted. Uh, I wasn't able to name them so let's consider that, uh, we just put a bit of context. Imagine a PHP CMS, once again PHP, widely used, uh, with a lot of complex code, complex features, and a little blacklist criticizing the code at every release, every time. So, first bag, there is a new CV there, uh, that's a Prius SE to a SSTI in the wild, like used by a threat actor. So, the maintainers decided to make an emergency patch. I decided to reverse it, obviously. Uh, so, uh, there is like a double level of templating, uh, on the app. And the patch from, uh, the maintainers were just a plain replace to, uh, remove, uh, the tags just after a single evaluation of the templates. Uh, the problem is, maybe someone saw that? You saw that? I know. The regex is not matching new lines. Uh, that means that you can just use the original payload, but use a new line before the closing tags, you're bypassing that regex, and that's like a Prius SE again. That was paid, uh, ten thousand dollars, because, you know, Prius SE are always cool, and small bonus, my colleague, uh, also found another bypass, you just had to not close the tags. So, that was enough, uh, templates, uh, will contain some tags, ending tags later, so, yeah, that's also bypass it. So, as a second bag, and I'm sorry, this one will be quite complex, I will try my best to explain it, uh, correctly, but, yeah, that's a complex one. So, I found a bag, uh, that is, to be honest, barely exportable, but it's super fun technically. So, the worst impact, uh, to use was, uh, Prius SE, but, uh, the precondition of it make it quite unlikely, but, yeah, it's still a fun one. So, for the context, uh, that application, uh, was using Laminas PHP library to, for everything that is using, like, emails. Laminas is doing a lot of checks and transformation to be sure that the email is valid and things like that, there's like a lot of different label, uh, libraries there, and on the application we're testing, uh, we have, uh, control over, uh, from header that will be, uh, used for sending some emails. So, that parameter will be passed, uh, over the fifth argument of mail, for those who know, uh, mail function, uh, of a fifth argument that is, like, arguments that will be passed to the send mail, uh, binary. So, if that fifth argument is, uh, completely controlled by an attacker, you can have, like, argument injection to the send mail binary. There are, like, no next point to that, uh, but it definitely depends on the MTA that is used. So, uh, every MTA is chipped with different send mail binaries. So, for this, uh, talk, we will consider, uh, send mail MTA here. That's like a first condition. Why send mail? Because I'm cheating. That's my bug. I decide to whatever is the condition. So, that's what, uh, I want to be. So, uh, the problem is Laminas validating email address. We can't, like, put anything that is not a valid email address. Uh, Laminas is supporting, uh, cutted string, uh, format, so, uh, double quotes and pretty much anything. Uh, dot atom format, that's like the standard, uh, email formats. Uh, for that, they are using super big regrets. Uh, that was super hard to read. And, yeah, the thing is, uh, they're also using, uh, escape shell lag, uh, on the email before being used on the, uh, main function. But, uh, PHP is automatically applies escape shell command to the entire command, uh, when calling mail, uh, that will apply escape shell command to send mail. Uh, double escape means, uh, no escape at all, means argument injection, thanks PHP. So, another problem is, uh, Laminas or the application, I don't know, is, uh, lower casing your email and every exploit for, uh, send mail, uh, generally using, uh, the C and the X uppercase arguments with very long pass. And the, the problem is we are limited to 64 characters for the local parts and definitely if you need, like, long pass, uh, for two arguments, that's definitely not cool because we are, like, limited in size. Painful. I was, like, a bit in despair. I was pretty sure that won't be exploitable at all. But, yeah, I still decided to make, like, cause of testing. I was pretty much like that after a few hours. But, at some point, I saw that, uh, there was, like, a stranger if my email contains, uh, uh, right angle brackets. So, if I put XSX, uh, right angle bracket at black dot is, I received by the app invalid domain black dot is right bracket. I was, like, that's, that's strange. That's definitely not the domain I put in my mail. So, I decided to debug a bit the behavior. So, Laminas, uh, did, uh, the validation of the email. Laminas and the app, uh, were crafting a full email with the headers and the body and put the email in the form, uh, header. Then, uh, Laminas passed the generated email. Then, the app is extracting the sender again from it. Validates that it's still a valid email. So, painful process. So, I was like, okay, but that doesn't explain the error. So, that's a traditional form header. So, it's just, uh, double quotes your name, double quotes and in brackets, uh, the full email. But, when I tried to inject XSX right brackets at black dot S, that was like the form that was generated. So, we have like an injection in the email part, but that's quite useless in my opinion. Uh, there was like no CRLs, there was like protection and mechanism to prevent that. So, I was like, okay, that's definitely useless. But, I decided to like investigate because that's quite a dirty thing still. So, yeah. Uh, we received, uh, a lot of RFC, a lot of documentation and I saw there's like something called, uh, my man coded words. So, uh, that's described by the, uh, the RFC 2047. That's for using special characters in, uh, email headers and body. That's a format, so, uh, it was seen, uh, so, in that case, I'd like generate AAA. So, all the characters that is used, uh, in the mime uncoded words notation are also valid characters in an email address. At least, uh, in the double, uh, double code encoded formats. So, I was like, maybe I can inject mime uncoded words in my, uh, sender email. So, uh, that will be put in the mail headers and when extracting back by Laminas, it will like pass the mime uncoded words and generate an email that will maybe contain, uh, some, uh, parameter injection to send mail. So, uh, I needed, uh, some spaces to like inject another argument to send mail. Uh, but, uh, equal, uh, equal 20 is forbidden by the specification of the AFC, but I found that, uh, underscore is defined as a space by the AFC. So, we can, uh, just input, uh, spaces by using an underscore. Don't ask me why, there's probably a reason for that. So, as we saw, uh, the send mail, uh, send mail payload is always, uh, needing to point to a local configuration file. So, we need to have, uh, a control of a malicious local file. Fortunately for us, the CMS have, uh, a nice file upload. So, we can upload files there. The problem is, uh, the upload file that contains underscore, but underscore replaced by spaces, but we can replace, uh, underscore by, uh, equal five F characters. So, that's a problem, but not so much. The problem is, uh, we need a lot of replacement character and the size limitation is still 64 characters and the mime encoded routes, uh, increase the size of a string by quite a lot. So, let's consider that, uh, a web route is, uh, slash app. That's short. That's definitely what I need. So, I'm still, uh, cheating again. So, uh, that's another preconditions. The first one is you need send mail to be used and you need, uh, a short, uh, web route. So, yeah, that's quite some strong precondition. So, I knew that send mail payload that I am using, uh, the C and the X, uh, arguments. That's definitely too long for us. So, I was like, okay, uh, the C arguments is, uh, loading arbitrary config file. Maybe that's enough to see. Maybe we don't need, uh, uh, X arguments. So, I decided to focus on that and see what is possible to, uh, send a config file. So, in the config file you have, like, the path to the dead letter file. So, the dead letter is like where it, with, it will log, uh, like, incidents in sending emails. So, maybe we can, like, uh, that's, uh, a file that will be in the web routes and I have maybe a file right but we don't control anything in the mail. And there is also, uh, uh, bound second recipient in that config file that will be included in the dead letter because that will, like, you have an email that is failed but then it will try to send to that second recipient and it will write that in the dead letter file. So, maybe we can have arbitrary file rights or at least, uh, partial arbitrary file right but that's PHP so if I have just, uh, a partial file right that would be enough to get a valid PHP file. So, I just sent, uh, a default send mail MTA config and, uh, the two, uh, option, uh, to get arbitrary file right and that's, that was sufficient. So, then I'm sending the mail to not existent at localhost so it fails. So, that will bounce. So, that, uh, the, the, the config that I was using. So, I decided to have a look at the MyMainCodedWord and trying to, like, reduce the size of it. Uh, I was able to win some size like you can just empty the car sets. There is no need of, uh, filling it. Uh, don't, uh, we get, we need double cuts around the payloads because, uh, the email need to be valid and you need to use a double coded, uh, format. Don't ask me why but we need, we needed to end it with, uh, two double cuts. I have no idea that's magic. I didn't investigate it that. So, we can definitely use the uppercase later now because we have the MyMainCodedWords. Uh, so, 64 cards is still too short but with the precondition of having a short web root and everything that just enter exactly, uh, the, the 64 characters. So, it's, uh, upper class and the final payload was just that. Don't ask me why that's a magic, uh, definitely some magic payload. I have now a t-shirt but it's my, in my hotel room with a payload printed on it. Uh, yeah, that's quite a unisex payload and it is to Prius SE on the top in very specific conditions. So, yeah, that was just, uh, settings, uh, if I re-uploaded in to send my command injecting a new, uh, config file for send mail, get arbitrary rights, some PHP in the web app, get RCE, works only on send mail MTA, web root being short so I cheated a bit. But, yeah, you need some Einstein's to explain that. So, definitely not, uh, not really a spot up in the right but still was quite fun technically. So, let's go for a demo. The last one. Uh, so, uh, once again, the question shop. I'm just uploading, uh, the send mail MTA default config file with just like or do two config keys. Yeah, doing the upload manually, sorry, it takes a bit of time. So, yeah, you can see that I'm putting the dead letter in the slash app slash back dot dot PHP with a double bounce address containing a payload. So, yeah, now the config file is uploaded. We can just run the payload in the from, uh, in the from email. That's exactly the payload from the, the slides. We're sending that to, uh, a local host address that doesn't exist. So, that should draw, draw an error. We see that the page is completed bank because that generated an error. So, now we can go to, uh, the slash back dot dot PHP. We can see the dead letter there and I did add some back dot there and we get arbitrary PHP, uh, execution. So, definitely quite cool. So, that was paid 5,000, uh, dollars despite the fact that it was, uh, hardly exploitable. Uh, made me cry a bit. I spent a lot of time on it. So, I hope your brain fried exactly, uh, like me. And that's my end word. So, uh, thanks for having listened to the end. Hope you had fun. Hope you learned some things. And also I will maybe soon open a blog, uh, a blog with a lot of my bags, like a hundred of them. So, yeah, follow me on Twitter if you want some news and thank you.