My name's Alec Amirani, kind of, I guess that that's obvious, I'm doing talk on session donation, if that's the way you're here to see, you can leave, I won't be offended, everybody hates me already. So we have a very short talk here, so I'm going to try and keep it quick, I've got time for questions and whatnot at the end, we'll figure it out as we go. So I'm Alec Amirani, like I said before, I'm part of Longhorn Lockpicking Club, working in the lockpicking village upstairs, gave a talk earlier, introduction to lockpicking, great story behind that picture there, I'll get to it at the end if we have time, it's awesome. I go to the University of Texas at Austin, studying computer science, and I work for the information security office there, so I guess that's why people might think they want to listen to me. Quick talk, not a lot of time, everyone can hear me cool, right, yeah, badass. Question, yeah, blah, blah, blah, blah, blah, presenting an idea, pretty much, this is really just, it's a, it's a, it's a, it's a, it's a, it's a, it's a, it's a, it's a, it's a, it's a, it's a variation on the session ID attack, and I know most of you, if not all of you, are familiar with session hijacking, but I feel like there's at least one or two out there who aren't. So, quick overview, session hijacking is stealing a session ID, session ID is used for authentication for various things like web services. Session fixation and cross-site scripting are two of the really pertinent parts to this session donation attack. There are countermeasures for session hijacking, and they're, I guess, they're our theoretical countermeasure for session donation, because session donation hasn't actually really been talked about before, as far as I know. These are common countermeasures. Random session key, generating it as you go to a new page, encrypting gibberish and whatnot. Limiting my IP address, yeah, you guys can read, hopefully, if not, then you probably don't want to listen to me anyway or understand what I'm talking about. No one's really laughing either. God. You guys are a bunch of fucking douchebags. Giggle, smile, or something. Make me feel better about myself. I already have self-esteem issues. So, session donation, now that there's a quick, dirty overview of session hijacking and session ID attacks, if there's any questions on any of that, we can get to it later. It's exactly what it sounds like. Instead of hijacking someone's session ID, you're donating yours. You, I mean, a lot of it's very, a lot of the attack is very similar to session fixation, which is used in session hijacking. I mean, if you fixate someone's session, then you can steal it because you know what it is. However, with session donation, instead of fixating it to something just so you know what it is and then you can steal their, steal their IDs after they authenticate, you're fixing their session ID to your session ID after you've authenticated with that session ID. And you would think, since session fixation is used a lot with session hijacking, a lot of the countermeasures would be the same. However, because you're authenticating beforehand, and we'll get into this a little bit more later, it's a lot more difficult to prevent and predict. It's kind of cool, actually. I think it is, at least. That's why I'm talking about it. People do, too, because they came and listened to me. So, yeah. Easier to give your identity to someone than stealing it. Common knowledge there and whatnot. Yeah. So, am I insane? Kind of. Why would I give my information away? I'm a DEF CON. I keep everything private. I'm paranoid. I know the feeling. I fall in the same category. Here's an example scenario, though. You guys can read, but I'm going to read it anyway and insult you. Joe logs into a service, deletes stored, you know, deletes stored information. Stored information, for example, could be like he logs into a web page at work or something where he stores his bank account information for his payroll. It's all stored there. So, they can just do an EFT to pay him and whatnot. And then, after he deletes his stored information, it's all clear, donates his session to a second party. We're going to call him Jim. Jim Bob. Does someone have a better name? No. You guys are all dull. God. So, then Joe, you know, same with session hijacking. Somehow, Joe gets Jim to go to the web page that he wants to attack. In this example, it's an EFT information storage page. And, you know, Joe goes there and sees, oh, man, you know, the page blank. I better put all my stuff. Joe told me there was an error earlier and that the database deleted my information. So, I'm going to go store it so I can get paid on my pay day. It's saved, but it's saved after he's been, his, after Joe has donated his session ID to Jim. So, he saves it and it's saved, you know, as far as anything involved in the service is concerned, it's saved as Joe. So, then Joe can log in at any point in time he wants because you're allowed to log in as yourself. Just because if you couldn't, that would be ridiculous. And then he goes in and all of Jim's information is stored there and he successfully executed a session donation-esque attack. Since the information is stored there, he can log in, retrieve it, delete it after he's copied it down on a piece of paper or whatever and given it to the world or a hooker or something. There are issues with session donations. Information. Things that you would expect people to catch. But then again, you would also expect people to not log in with, you know, at a fake web page, but they do it anyway and give away their information to anyone who asks. So, pepgac happens all the time. Can't really deal with it unless you tell people they suck and they can't use your service. Which would be fun, but unfortunately it doesn't work that way. So, I mean, user training. If you ever, you know, you train a user who's dumb to not give away their information. Don't give away their shit so it doesn't get stolen. You're like, hey, don't log in to a page that's not the right one. You know, you don't want to give it away. People will steal your username and password and try and authenticate as you, blah, blah, blah. So, they're all looking for, you know, oh, man, I better not put my information on this page. However, if a session has been donated to them, they're not going to need to log in. It's already been authenticated as far as the server is concerned. They don't need any more. There's nothing else for them to authenticate. So, and I mean, if you get a single log-in for a session. There's a lot of time set up. A lot of universities. Some corporations. You know, for example, the University of Texas. They have an EID log-in. Same log-in. You authenticate once. And you're authenticated for all the services across campus. With something like that, people aren't going to think, oh, I didn't have to log in. Because they logged in earlier. So, they know, you know, they're used to not having to log in. And then, you know, if you get someone who actually knows somewhat what they're doing. And they are like, you know, I'm going to check before I put in my bank account information. Check the SSL cert. The SSL cert is going to be valid. There's no problem with the connection to the server. You know, he's authenticated. Connected to the server. There might be a problem. But it's not involved with this attack. So, you know, they check and they're like, oh, it's cool. It's all okay. But it's really not. And that's where the issue comes in here. So, in order to take this attack live. Anyhoo. You have to, attacker has to be able to get a session ID. That's potentially a very large pool. I mean, if you can log in. Or if you're allowed to use it. Then you can get a session ID whenever you want. So, you know, once you have that. Then you just have to be able to give away your session identity. It's very hard to stop someone from giving that away. It's definitely doable. It's just, at the moment, not a lot of people think to check for something like that. Cross-site cooking. Session fixation. Man in the middle. There's all sorts of ways you can switch someone else's session identity with yours. Yeah, like I said earlier. This is dangerous, kind of. Because countermeasures that are implemented right now won't work effectively. The victim still has a valid session ID. So it's, you know, there's no problem there. It's been authenticated. It's been checked and everything. And, you know, you can implement a common countermeasure for session hijacking. Is to switch the ID as you go to a new page. Well, if you get a valid ID and send it to them. And then just wait for them to click on new pages and whatever. Then they'll still have a valid ID the whole time going through. And they'll be authenticated. And then you wait until they're done. Go and take whatever you want. So, I mean, it really comes down to, can you prevent someone from giving away what they need to have? And it's hard to do. And if you can't do that, can you prevent them from authenticating as themselves after they've given away their identity? Once again, very hard to do. And, I mean, like this says here. Session hijacking techniques might make it a lot easier to prevent a user who knows that they've been compromised. To go in and, you know, delete the information that they accidentally stored in the wrong place. Once the attacker logs in, the old session ID would have been cleared out. And they, you know, the victim can no longer log in and switch it with the, or, you know, delete the information they stored there. Man, you guys are really quiet. It's a big room. So, like I said, it's definitely possible to prevent. There's little things. It's just, the fact is, the attacker isn't attacking, you know, trying to get the session ID. They're attacking the fact that it exists. And that's what you use for authentication. And you can't really get around that because you need that there in order to authenticate people. If you don't have it, then you run into issues that you need it. You know, just simple things. Prevent cross-site scripting. Most people here know that. Most people don't think to do it. It's the biggest vulnerability in the web as far as I know. I don't remember where I read that. Wikipedia. Yeah, I know. It's a great source. You're not allowed to use it ever in college. It's disappointing. So, the best way I came up with, and I mean, this is all very recent. I haven't, stop it. So, I mean, the best counter measure I came up with was, you know, at a very basic level it's pretty much using the IP address of the sender or something of that nature when you generate the session ID. That way if someone gives away their session ID, unless they're giving away to the same computer or whatever, you know, same, whatever you're using to, in place of the IP address, it's no longer a valid session ID. So, you take a hash of the IP address and use it as part of the session ID generation. And then for authentication, you don't just say, oh, is this a valid session ID? If yes, then whatever. You go through and you actually have to regenerate the session ID based on who's requesting information and then compare the two. It takes more time. It's not as fast. It's not as efficient. But security is always the least efficient way to do anything. Whoa. I thought there was another slide in there. Yeah, so that went a hell of a lot faster than I thought it would. I guess I'm kind of nervous because of, that great story I have from the picture. So, I'm going to go ahead and tell it because we have a lot of time. And if you guys have questions or anything, or if you feel like yelling at me, I guess that's cool too. So, in case you forgot what this picture looks like, it's a giant fail trophy. I gave a speech earlier for introduction lockpicking, DC101. And long story short, TSA lost all my demo equipment and everything. I had to rewrite it Wednesday at 11 when I got in. And this guy said I gave possibly the worst talk at DEF CON ever. So, I'm working on figuring out who it is. I think he's giving a safe-cracking speech in the lockpicking village later. I'm going to have a lot of fun with that. So, anyone have any questions or want to harass me? Yeah. . Yes. . . Once again, yeah. It's not a foolproof method. It's just, it would stop a little bit. You know, there's no... I don't believe there's such thing as a... I'm sorry. Sorry about that. He said, you had mentioned something about protection earlier. Why can't you just spoof the IP and then, you know, that entire... use a hash of the IP and generation of a server on the server's generation of the session ID. It becomes, you know, irrelevant at that point. That's true. Like I said, that's, like, the best I could come up with. It's very hard to prevent someone from giving away their identity to someone else with the intention of stealing their information. So, yes, that is a very valid way to just bypass that, too. . . Anyone else? . Yeah. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . this information as, but people will get annoyed and be like, yeah, okay, whatever, and hit okay. I mean, people don't even check, you know, if they had an invalid SSL cert, they're generally just going to hit okay and be like, oh, well, I trust this site. That means it's, I don't know, it must be a computer problem. I hate computers. Anyone else? If you have a question and I don't see your hand, just yell at me. Well, awkward. I'm sorry about that. I just, you know, it's hard to give a speech after you've heard you've given the worst speech at DEF CON ever. It's actually very hard. So, yeah, thanks for listening to me. If you guys have any questions, please feel free to reach out to me. If you guys want to catch me at any point in time, I'll probably be up in Lockpick and Village doing things of that nature. If you don't really want to talk to me, you can go up there and I might not be there for the other half the time. So, do you have a question? I'm sorry? Right now, so, I tried editing my website before I got here because I was going to put up all sorts of nifty stuff. And I was tired. And then I got halfway through it and realized I didn't have my bag from TSA and stopped. So, my website is down. It will be up by the end of tomorrow. And I say that tentatively because who knows, I could, the way my life has been going, it's probably not going. It's absinicize.com. Great. I'm going to have to put that up here. Give me two seconds. Yeah, I know, right? Because I rushed through my speech and didn't really go over things like I wanted to. Yeah. So, like I said, go to Lockpicking Village. It's cool. I have time to kill. So, I'm just going to keep talking and chatting until someone wants to yell at me or something. No one, like, is yelling at me to my face. It's kind of disappointing. I really kind of wish he had said I gave the worst speech at DEF CON ever to my face. I could have had a lot of fun with that conversation. No, it's all second hand. So, I got to, I got to find out who it is still. It was actually Thursday. So, yesterday. Well, yeah, that was like half my speech. I had to kill three hours. I was like, I lost my shit. I'm going to say another sentence. I'm going to say I lost my stuff again because I got a lot of time. Time to kill. Once again, I mean, more time to kill. Yeah. Well, I just have to say, I didn't see your speech the other day, but if there was anything better than seeing the speech on one photography where the guy was going off of his parents' speech, and they get some time to give him the speech, that was about five years ago. I don't think you gave the worst one. Fair enough. Well, I actually feel like this one went a lot worse. So, definitely possible that I topped my own worst DEF CON speech ever, all in the same con. I wish I had a third speech. I'd try and top myself a third time. You really? You want me to? I mean, I can go through it really quick. Cool. Yeah. Oh, cool. Awesome. I feel like people want to listen to me. So, yeah. Session donation. Ah, that's me. TurboTrack. Not a lot of time. Two minutes to go. Session ID. You know what a session ID is? Cool. Kosher. Not going to go through that. Session donations. Exactly what it sounds like. Take the hijacking out and donate. Donate instead of taking. Why would you do that? Are you insane? Yeah. If you haven't listened to my speech yet, then you probably know, ah, I lost my train of thought. Schizophrenia's a bitch. Example scenario. Someone would, no, we don't need that. Yeah. So, why would you give it out? Because if you can get someone to authenticate as you at a website, then save their bank account information, then, you know, you go in, log in as yourself, their bank account information is saved, and you can just take it. I'm sorry? There was a song. There's actually a different, ah, what's my Hoosier? PowerPoint on the CD. Ah, this will be on the website. I'm giving this to Nikita after the speech. Ah, so it'll be on the DEF CON website. It'll also be on, ah, I think they're, they put the speeches, the video recording of the speeches, so you get to listen to me being embarrassed and freaking out, too. Yeah. It'll be cool. So if you ever feel bad about yourself, you can go ahead and watch this video and you'll feel great. That said, ah, I'm out of time, thank God. So, go to Lockpick.com. Silicon Village is cool. Ah, thanks for listening to me be a douchebag.