So, oh, I just wanted to say real quick while I'm drinking this shot that I made this Gmail address just for this talk. So, you know, if you're going to try and hack my Gmail, there's nothing good in there except things that you guys email me. And go ahead, you can contact me if you want. Okay, so what's up? The name of my talk is Ripping Media Off the Wire, and it's a step-by-step guide. If you guys have all the tools installed on your laptop, you can actually just follow along and try and do this right now. Otherwise, you know, if you miss something, then my slides will be available online. You can follow along then if you, like, forget or something. All right, so let's get started. First of all, who the hell am I? I'm Honey. These are my, like, credentials here. I'm a network administrator. I've been for four years. I'm a network administrator. I've been for four years. And I'm also a professor at John Jay College, an adjunct professor. That's in New York City, in case you didn't hear my accent already. I'm also a research assistant for a ballistic research grant. And I'm about to study forensic computing masters in the fall. And, yeah, I got a CIS in electronic engineering and computer networking. All right, I got some skills. I got some skills. Here you go. That's who I am. What's the scope of this talk? This talk is going to walk you through how to download MP3s from MySpace and from YouTube. And we're also going to talk about the lack of security in protected streaming. All right, so the tools that I use for this, they're all GNU tools. Wget, Firefox, an add-on from Microsoft, and then I'm going to talk about Firefox called HTTP Fox, which is awesome. RTMP Dump, and this converter that I've used. There's other converters, but this one's called Convert Flu, I mean, FLV to MP3s. Now, there's DMCAs right now on the RTMP Dump. And also, when I originally wrote the white paper for this, like Convert FLV to MP3, there was a website. You could download it. It's gone. The website is gone. So, you know, I just suspect that there's a DMC takedown on that as well. But you guys are hackers. I'm sure you can find the tools, so. Just a disclosure about this talk, because this presentation describes methods to download protected materials. And I'm doing this talk in an effort to raise, you know, the lack of security in protected streaming. All the music that I'm using in my presentation, I actually got permission from the artists themselves, so that was pretty cool. And any illegal use of the methods by, you know, any of you guys, like, I'm not responsible for that. And a legal statement. This presentation does break the terms of service for YouTube, MySpace, the digital millennium apps, and, but that's only if you, if you download it. So, if you download it, you download copyrighted materials. You know, and not everything on YouTube is copyrighted. If somebody has a video of their dog rolling over and over, you know, that's not, that's not protected. So, if you decide to download, you know, Jay-Z's, you know, protected media, well, then you're breaking the law. Okay. Before we begin, there's a couple of, I don't know, questions that I just want to, like, answer ahead of time. Some people are like, what is the point of this? I use LimeWare. What is the point of this? I have a Usenet account. Or what is the point of this? I use, you know, different converters. But there's a couple good points about why this is interesting. Like, the third-party plugins, they're not always reliable or kept up to date on changes. Okay. So, like, GreaseMonkey, I think their last update was, like, in April. All right. So, if MySpace or YouTube, if they change their implementation, you know, on, on their servers, then, like, you know, you have to wait for that plugin to be updated in order to use, you know, use the plugin. They're not always updated that fast. For people who, like, use online websites in order to convert stuff, like, how do you know that, you know, that third-party is not injecting stuff into your MP3s or media? You're trusting someone else. And, you know, on LimeWire, like, do you have an MD5 sum on, like, the MP3? No, you don't. Because you're obviously, like, pirating it. MP3 are ready to check, so. And this presentation is not intended to encourage piracy, even though I'm talking about it. But it's more about the, the summation of data that is supposed to be, you know, know, protected streaming, and it's not really protected, so. All right, so let's just get some definitions out the way. MySpace uses the RTMP protocol, so what is that? Actually, they're using RTMP-E protocol, but what is that? It's a real-time messaging protocol. It's a proprietary protocol by Adobe. There's three variations of RTMP. RTMP itself, which runs over port 1935. RTMP-T, which is used to traverse firewalls, and RTMP-S, which uses SSL. Now, the protocol that we're interested in from MySpace, RTMP-E, which is the encrypted real-time messaging protocol, and it's a proprietary protocol of Macromedia for streaming video and DRM. It supposedly allows secure transfer of data without SSL, and the reason why they implemented it is because it's a real-time messaging protocol. The reason why they implemented this is, you know, SSL is slow, but RTMP-E is supposed to solve that problem. It's supposed to be more easy to implement. Okay, so I went to Adobe's website, and I just took a couple of clips that they have available on their website, because basically, Adobe is recommending everyone to use RTMP-E, and they're saying, you know, that it's providing protection from stream ripping, which my demonstration is going to show it isn't. Um, so yeah, that's, I'm embarrassed for them, you know. This is also from Adobe's website, where they're talking about, you know, they're recommending RTMP-E more, and they're saying it's robust. Okay. And the client picture there, you know, we have the server, and it's, uh... You know, talking to the client, and then... You know, then it's, like, playing in the client's... Player. But, like, the tool that we're going to use, which is RTMP-Dump, RTMP-Dump basically acts like a proxy. It sits in between, you know, it captures all these requests from, you know, the servers, and it, um... It, like... It, um... It does the handshaking. Between, uh, you know, the servers and the client. And then it compiles the whole file, and then it passes the file down to the client. So, that's what I'm talking about. Well, well, we'll talk about that in a second. Let's see. What RTMP does. RTMP-Dump does. Um... This is from the man of RTMP-Dump. So, this is an ACP server that accepts requests that, uh, consist of RTMP-Dump parameters. It, uh... It then, you know, does the handshaking. And then it passes the file down to the client. And this is also just from Adobe's website that I'm talking about DRM. So, they're describing DRM there. That it's two elements, encryption and access control. Okay. Okay. Now that we've, uh, got, like, the definition... The definition's out the way, let's just see how to do this. Okay. So, um... First, how to get MP3 files from MySpace. The first step is you have to install, um... HTTP... Um... HTTP Fox, the Firefox plugin. You use Firefox. And the next thing you're gonna do is you're gonna start HTTP Fox. And then you're gonna browse to your MySpace page. So, for my example, um... You know, this band that gave me, like, the consent to use their stuff. It's a local Brooklyn. It's a Brooklyn band. They're, like, not that well-known. So, they're more than happy to give me, you know, consent to have more publicity for their music. So, you can see at the bottom, HTTP has started. It's capturing, uh, traffic there at the bottom. And you can see, uh, you know, I'm playing music there. All right. The next step is you have to traverse all this, um, captured traffic. So, I tried to find, um, something unique. About the, the URL that I captured. So, that you can always find it. So, the unique thing, uh, string that I found was just if you search for get song. Then it'll just return one URL. And the get song is case sensitive. Um, the next thing you have to do is in HTTP Fox at the bottom, there's a couple different options. So, the one option is content. And if you browse through the XML file, you'll see, you know, pathfiles. Uh, for an MP3. So, you copy that MP3 path. And please notice that, um, it's proceeding. It's RTMP. And then the URL, you know, .mp3. Just notice that for a second. Okay. So, the next thing you have to do is download RTMP dump if you don't have it already. And here's the fun part. So, they're, they're kind of tricky. It, it looks like it's RTMP, but it's not really RTMP. It's RTMPE. So, if you just change, uh, the URL to RTMPE and then run that command in RTMP dump, you're going to download the file. So, that's the syntax down there for, um, RTMP, uh, dump. It's the executable minus R because you're, uh, downloading, like, an RTMP stream. The only other option, I think, for RTMP dump is, um, minus host. Um, then the modified captured URL. And then the output of, you know, your flu, your flunet. I mean, your FLV name. Okay. So, um, here's my modified URL. You remember before I said notice in the URL that I copied. It said RTMP. I changed it here to RTMPE. I don't know if you could see it that well, but I have it highlighted in red. So, now when I execute this command, um, it's going to download the file. Anyone notice anything weird right here? Do you remember, like, the URL that we copied? Any, any hackers notice anything weird? I'll let you think on that for a second. Alright, so I run the command and it starts downloading. Yay! And then, now my downloaded has completed. Um, now, okay, so. So, this is what you could have noticed, is that the URL that I copied from httpfox, the RTMP URL, was a .mp3, right? So, why is my output an FLV? Why am I doing that? You hackers could have noticed that. Like, why don't I just download it as an mp3? The reason why you don't download it as an mp3 is because when you do download it as an mp3, the sound quality is really bad. So, if you use this converter to convert, um, if you download it as a FLV and then convert it to this, the sound quality is perfect. So, I use this converter, convert it, and now I have my file. So, do you want to see that in a video? Yeah, let's go for it. There's no porn, sorry. Keep typing. All right, so, I'm just Googling for their MySpace page, started, um, httpfox, started httpfox, now I'm going to browse to their MySpace page. There you can see all the traffic's coming through. There's a lot of traffic. Every single icon and thing there. That's on the page. Now, I'm going to start the song playing. Now, I have to find the URL and all of this traffic. So, I'm going to do a search to get song, but remember, it's case sensitive. Now, I'm clicking on the content here, so I can go through the XML file. Look, they're running, um, Microsoft IIS 6. Thank you, YouTube, for that. All right, I'm copying the URL. All right, so, someone asked me, they're like, why can't you W get the file if you have the URL? So, I've just, I do what you shouldn't do here. You can't W get RTMP streams. So, I'm going to show you that. You can see what I went through, basically, to try and figure this out. I tried all, many, many things. There's a lot of really different options. So, I'm W getting it. I forgot to put the file name in. . . . . . . . . . . . . . . . . . . . . . . . . . . . or two. We've got a couple other senior staff goons that are going to help collect a couple bucks and then whatever's left over that covers the damage goes to the EFF. I'm going to start. Sorry, it restarted so we're just going to have to watch this again for a second. He's not that loud. Oh yeah, so this band Great Tiger, they, originally their music was only available on MySpace and you know I tried the easiest thing to get their music which is just like ask them for it and I tried, actually my friend Ronan tried too. We tried to social them to give us all their music but they wouldn't give it to us so we had to find alternative ways. Actually, they actually gave me a CD after this but this works for this, I mean, yes you can. Maybe they'll fix it. Alright, so this is pretty much where I left off before that guy talked. So I'm just saying, you know, it's going to fail because I'm W getting RTMP stream. That doesn't work. So there's the failure right there. It's not a supported scheme. So then the next thing that I'm going to try and do is I'm going to just try and use RTMP dump and just download the MP3 without modifying the URL. What happens? Then. That's just me saying exactly what I just said, actually. Oh no, that's my test MP3. I'm actually going to show you too. I'm going to download it as an MP3 and I'm going to play it and hopefully you can hear that the quality is not very good and that's why I used the converter so that it sounds good. Okay, so we're going to expect that this is going to fail because I haven't modified the URL. And it failed. All right, so now I'm going to modify the URL to include RTMP. And it's going to work. I just did. . . . . . . . . . . . . . . . . . . Now you can see the file size there, downloaded successfully, but it's an MP3, and like I said, it doesn't sound very good. Sounds choppy. You can go to my Q&A. So now I'm going to run the same command again, except I'm going to download it as an FLV. Okay. Let's go. Let's go. Let's go. All right. All right. All right. Okay. Let's go. All right. Here we go. Here we go. It will go over to my URL. I don't think I relieved a few times. I think I'm getting a little bit better. Well, I think that's good. I think that's good. I don't know how long this is going to take. It's going to take a couple of days. Download successful. And look, the file size is exactly the same, even though it's different format. And now I'm going to use the converter to convert it from an FLV back to an MP3. Successful. All right, now let's see if you can hear the difference in the sound quality. I'm not done. I'm not done. Sorry. You got to keep sitting here. But also, so now I'm looking at the file sizes of the two different files and you can see that when it's converted with the convert FLV to MP3, it adds to the file size. It repairs it. Mouths dancing. Okay. That was our video intermission. So now we'll continue with the next part, which is from YouTube. Okay, so how to get MP3 files from YouTube. This is just, like, URL manipulation. So the first step you're going to do is you're going to install Firefox. If you don't already have it, you're going to install HTTP Fox. If you don't already have it, you're going to start HTTP Fox, and you're going to browse to the YouTube page that you want to extract media from. So for my example, again, I'm using Great Tiger, the Brooklyn band. I'm using one of their videos. So this shot, you can see there's traffic already captured there at the bottom. And instead of doing a search for Get Song, you can just do a search for Get in order to traverse all the amount of traffic that you are capturing. Get only returns one URL, unless, like, you browse multiple YouTube pages. So you're just going to copy that URL. And the next step is download Wget, if you don't have Wget for some reason. And we're going to modify the URL. So there's parameters within the URL that are extra that you don't need in order to try and Wget the file. And actually, if you don't modify the URL and remove some of the extra parameters, well, they're not extra, but the parameters that you've captured, when you try and convert it, it won't convert properly. So there I have those. Syntax of what you need to put into Wget. Wget minus open, you know, your file name, .flv, and then the captured URL. So here's the unedited version of the URL. You can see there's a whole bunch of parameters there. The web page and a bunch of different parameters. There's the URL again. So I broke down each of the different parameters. So you have to, there's get video. Then there's a detail page. There's T and some string of characters. It's 43 characters, actually. And then there's the FMT. That has to do with, like, resolution. And then there's the video ID. Which is, like, the actual video ID. Then there's no flu and SFV. So, and when you copy the URL, all of these parameters come out of order a lot of times. So you actually, you know, you have to be able to identify that there's different parameters there. They don't always come in the order in the example URL. They come all out of order. With the exception of the get video one. So, let me just talk for a second here. So, originally when I did this white paper, like, a month ago, you only needed three parameters. You only needed the get video, which you're always going to need. You needed the T and the 43 characters. And then the video ID. You didn't need the SFV. But, you know, I keep, I kept trying my own presentation to make sure it still worked. And the guys at YouTube, they changed it Tuesday. All right? So Tuesday I was like, oh, my God, it doesn't work anymore. So I had to. I had to re-hack it. And I figured out that you just, you just need this other parameter, too. And then you can download it. So that's what I was talking about before where, like, you know, Grease Monkey or something like that, they changed it. So I don't know if, you know, the other add-ons, if they're still going to work. They're going to have to go update it, re, you know, put out the add-on that's going to successfully work. But if you break out and understand these parameters and they're just, like, including them or not including some of them, you can just hack it all on your own. Okay, so I have my example URL. And now I have my modified URL at the bottom. And I'm just wgetting, you know, this modified URL. So there, I'm putting the commands into, you know, with wget with my modified URL. I'm executing it. And my download's complete. And now I'm going to convert it to an mp3 if I want it to be an mp3 file. And let's see a video of all of that and, like, some of the things that don't work in it in my other video. Okay, so. Okay. Okay. Okay. Okay. Okay. Okay. Okay. Okay. So I'm just going to YouTube. And I'm going to search for Great Tigers video, because it's really short for this demonstration. I'm going to start http fox. And then I'm going to go to the video page. Okay. Okay. Okay. And that's how you do the Great Tiger handshake! Beautiful. Alright, so that was interesting. Now we have to traverse all the captured data to try and find out our own URL, because, you know, that video's priceless. Apache. So first I'm going to try the URL without editing any of the parameters, and you can see how it fails, saying this should fail because I'm not going to edit the URL. I'm just going to try and straight W get it from YouTube. So, you know, file size is zero. That didn't work. So now I'm going to remove some of the parameters. So I need T equals some string, I need get video, I need the video ID, and then now just recently I need that ASV. Okay. No, it is not always ASV equals three. Sometimes it's ASV equals two. It doesn't matter, though. You still have to include it regardless of the number. Yay! So now I'm going to convert it. I'm going to convert it into an MP3, so I can listen to it on my portable media device. Yay, successful! Wow! And that's how you do the quiz. That's how you do the quick tiger handshake. Beautiful. All right, so if you don't convert it to an MP3, if you open the FLV file in Winamp and also VLC, it plays... And that's how you do the quick tiger handshake. If you rename it to an AVI file, it also plays. Well, within at least those two meters here. That was our second intermission. All right, so the conclusion about this. DRM implementations, they're almost always going to fail without some type of special hardware on the client computer. You know, Adobe, they should fix their protocol instead of doing DMCA takedowns on the client tools that are capturing the streaming and stuff like that. And they're recommending the RTMPE protocol over the SSL, and they're saying it's robust and everyone should be using that, and it doesn't protect against streamer bing. The RTMPE protocol... Well, it's implementation. On MySpace... On MySpace, totally security through obscurity, all right? I edit the E and I can download stuff, all right? That's not real security. And it's susceptible to man-in-the-middle attacks. There's references and downloads. All right, so that's my talk. Do you guys want to do, like, a revisit on, like, a back-in-the-day hack? It's kind of random, but, all right. I'm actually just curious if, like, anyone knows about this. All right, in a second, show. All right. All right. All right. I mean, it's really kind of like a story, but... Oh, I can't see anything. One second. Okay. All right. All right. Thank you. Sorry, one second. I forgot I set up a proxy on my Firefox. I'm just disabling it real quick. Okay, so does anyone remember the original Sega console? Where's images? I can't really see. Is it here? Did I mistype it? No, the original Sega. Let me see. Thank you. All right, so I'm talking about this one. All right, did anyone else have this like when they were a kid? Yeah, wait, raise your hands for real. Like, show me love. Yes, yes. All right, so when I was a kid, I figured out that like if you didn't put a game in the console and like you hit a bunch of different buttons on the, you know, on the remote, it would take you into an Easter egg that was in the Sega console. So I love this game. I was like obsessed with this game. I played it all the time. And it has really stupid music in it. And I actually, I found the game. Someone, someone put it, you know, used an emulator and they put it online, which I was like ecstatic about because I don't still have the Sega console. And like I was very disappointed that, you know, I didn't keep, you know, get to play the game. So I found it online and I actually ripped the MP3 file out of, you know, just it being online. And I gave that MP3 to Great Tiger. And I'm like trying to get them to sample. The stupid music that's in, you know, this game. And I tried to explain to them that like, no, you can use it. It's from like an Easter egg. You know, the music from like an Easter egg game and like the original Sega console from like the 80s. Like no one's going to know, but they don't, they don't trust me about that. I'm still waiting for them to sample it, but let me see if I can find the game real quick for you because it's funny. Wow. It turns out the camera's over here. Well, I don't know who I'm suspended for now. No. You're listening to the great tiger in the woods and. No, I don't know. All right, so look at this. It's awesome. Yes. I can't see the play, but. The music sounds just like their tiger, right? So there's a time, and there's like 13 rounds to it. Which I can't play because I can't see, but I'm actually really good at this game. So when you finally beat the 13th level on the game, you get the email address of the programmer. So you know I emailed him, like, oh my god. Thank you. I love this game. I'm so happy that you have it online. He replied, too. It was awesome. You know, it's like a complete story. He's like, oh, I'm very glad that you like the game. Not a lot of people have beat the game. So. All right, so that's it. I'm done. Thank you. Thank you.