01-08-2016, 04:35 PM
01-08-2016, 09:02 PM
(01-08-2016, 04:35 PM)bulby1 Wrote: [ -> ]This may sound a little difficult, but here it goes.Well first off, I would start off by getting a gba rom, and see if you can mess with the settings in game to turn off music and leave SFX on. Then, try audio recording and playing the game and creating the sounds by moving etc. pull that mp3 sample into audacity and take out the sound effects. Put them into different files, save, and there you go. Try this program and tutorial:
I am here to ask how to even start. I see people taking audio files from really any game, with the most unknown file type possible, but turn it into a wav or whatever. My question is, how do they do it? I know they use mostly Hex Editors and what not to remove the encryption, but how?
How do they just spot the encryption and delete it? Is it mostly trial and error? As far as I know they try to remove byte by byte and hope they get the results they want. And in the Hex editors with all those random variables, how do they know which ones to delete? Same with the byte removers, I want to know how those really work so I can try to figure out myself.
All I'm asking if for some clarification. If you don't feel like answering any question here or related to these just hook me up with a video or something to give a full tutorial on how it's done. I'm just a person who wants to learn.
-Thanks in advance,
http://www.vg-resource.com/thread-21591.html
Any questions feel free to PM me, Welcome & Happy Ripping!
~Anex
01-10-2016, 04:17 PM
(01-10-2016, 09:14 AM)bulby1 Wrote: [ -> ]And the lack of respect from hot heads like you seems to be an issue too. If you'd like me to give you an answer to a post that barely makes sense, you're getting what you get. First off, your question is too broad and doesn't specify what system. Secondly, you're attitude will repel people to help you. Thirdly, I tried to steer you in the right direction by saying start off with GBA and work your way up into complex consoles, because it doesn't get easier. Fourth, there are multiple methods of encryption and other ways that every console uses, and may only apply to a single game. So, no one can specify your answer for you, until you give us a game title, and platform. Change your attitude, and have a nice day.(01-08-2016, 09:02 PM)Anexenaumoon Wrote: [ -> ](01-08-2016, 04:35 PM)bulby1 Wrote: [ -> ]This may sound a little difficult, but here it goes.Well first off, I would start off by getting a gba rom, and see if you can mess with the settings in game to turn off music and leave SFX on. Then, try audio recording and playing the game and creating the sounds by moving etc. pull that mp3 sample into audacity and take out the sound effects. Put them into different files, save, and there you go. Try this program and tutorial:
I am here to ask how to even start. I see people taking audio files from really any game, with the most unknown file type possible, but turn it into a wav or whatever. My question is, how do they do it? I know they use mostly Hex Editors and what not to remove the encryption, but how?
How do they just spot the encryption and delete it? Is it mostly trial and error? As far as I know they try to remove byte by byte and hope they get the results they want. And in the Hex editors with all those random variables, how do they know which ones to delete? Same with the byte removers, I want to know how those really work so I can try to figure out myself.
All I'm asking if for some clarification. If you don't feel like answering any question here or related to these just hook me up with a video or something to give a full tutorial on how it's done. I'm just a person who wants to learn.
-Thanks in advance,
http://www.vg-resource.com/thread-21591.html
Any questions feel free to PM me, Welcome & Happy Ripping!
~Anex
Sorry but that has nothing to do with my question at all. I asked how to decrypt things, not record things. I've been doing that for quite sometime and it isn't efficient. Please read what I said, this seams to be an issue with people.
01-11-2016, 03:55 AM
(01-08-2016, 04:35 PM)bulby1 Wrote: [ -> ]I am here to ask how to even start. I see people taking audio files from really any game, with the most unknown file type possible, but turn it into a wav or whatever. My question is, how do they do it? I know they use mostly Hex Editors and what not to remove the encryption, but how?
I actually feel like this clearly shows what he wants to learn. He wants to know how people manage to extract files from ranges of platforms, in general, not a specific game in particular. Yes, it's a very broad question, but not unclear.
Unfortunately, this is a very complex topic. It's not a 1-2-3 step process or something you can write a tutorial for. It's a bit like art. You can follow steps for drawing a specific picture, but there's no tutorial for "getting good at art".
Doing this requires knowledge about how files work, i.e. the fact that they are made out of bytes and and how these bytes are read by programs. Decrypting, decompression, and extraction are all separate things that you also need to understand and be able to identify. The process of doing this yourself is something that simply takes, practice, experience, and persistence. You learn how it works from existing algorithms and programs, and just try and apply the general rules.
Honestly, this is just a very very brief summary. This is stuff that people go to university for (although that's not strictly necessary, what with the internet ), and it's pretty much impossible to get your head around this stuff (let alone make programs for it) if you're not very experienced with programming. Encryption and compression algorithms are made by professional developers, and reverse engineering them isn't a walk in the park.
I've been programming for a number of years and finished my first year studying software engineering in 2015; I have yet to reverse engineer any encryption or compression. I've only ever coded one or two decompressions using existing information that others researched, and I can only recognise a handful of them. Most of my programs are just extractors or converters, either for decompressed files or those which I can decompress using existing code/tools.
So yeah, cryptography is a whole area of computer science that you will need to thoroughly study, understand, and have experience with before you can effectively reverse-engineering this sort of stuff. It will take time and effort, a lot of both. This is why there are still a heap of file types that haven't been cracked; it's hard.
01-11-2016, 05:57 AM
Puggsoy is right. There are a few essentials I can give though:
This is Ange Albertini's visual guide on how WAVs work. It's a simple representation on how bytes, essentially the ones and zeros, are read by a typical audio editor. Just like something as meaningless as #FF0000 can mean "Red" in the right context, those bits in that specific order can mean a certain amplitude modulation. If the above image doesn't make sense, you should familiarise yourself on how files in general work. Open a text file in a Hex editor and figure out why exactly "48 45 4C 4C 4F" means "HELLO" and how does a typical text editor know that.
Then, open a BMP file in a hex editor and figure out how exactly those seemingly random bytes transform into an image when opened in Paint.
^ Ange made a guide on that too.
Once you've thoroughly understood the concept behind files and how they're all simply nothing but ones and zeros, just interpreted differently, you can begin reading file format specifications. The Internet is full of them and once you understand a file format specification, you have the power to read files with your mind simply by looking at the file's bytes.
Even so, most files that have a specification available have viewers/editors made for them.
I strongly suggest reading the simplest guides by Ange. They help visualise the files very well.
VGMStream is a fantastic tool that lets you convert many many proprietary Video Game audio formats to simpler formats. If you download its source code, you can, technically, read their specifications. This will take time and effort, but in the end you might understand how a .xyz works.
Now rewind back to the WAV guide. What are the core components of a sound? Sample rate, amplitude, all that jazz? Your job is to figure out how the unknown file format's seemingly random bytes translate to those attributes. It's not easy, but it's the only way. You can try importing a file to Audacity as Raw data and understanding how it sounds somewhat reasonable but still a bit glitchy if you set the sample rate to 44100... and make a connection on how all your crazy files begin with "AC 44" (which is 44100 in decimal).
You could also notice how your files begin with the bytes 50 4B, which just so happens to be the ZIP Magic number. Therefore, the files are ZIP-compressed.
You could also view the file through a spectrogram and figure something out. Or, by deduction, realise that the song is not waveform data at all, but sequenced music (think MIDI).
There's no one-size-fits-all solution, but "figuring out how formats work" is the same job for all - Audio, Video, Images... you have to dwell inside the bytes and understand their language. You can help this dwelling with helper tools, like Tile Molester for graphics, Audacity for Audio, binwalk for random craziness... Whatever you do, the feeling you get when you crack a format is amazing.
EDIT: obviously emulators with audio debuggers can help a lot too. Some save state formats might dump the uncompressed audio session (or a part of it) to the file too. If a game has compressed graphics, usually you can make a save state and open that in a graphics editor to find the pure decompressed sprites so I'm led to believe the save states might have snippets of true audio in there too. If you can extract a piece of this uncompressed audio, you can compare it with the compressed audio, make notes, figure something out and maybe write a specification of the format even though a player/editor wouldn't exist yet!
This is Ange Albertini's visual guide on how WAVs work. It's a simple representation on how bytes, essentially the ones and zeros, are read by a typical audio editor. Just like something as meaningless as #FF0000 can mean "Red" in the right context, those bits in that specific order can mean a certain amplitude modulation. If the above image doesn't make sense, you should familiarise yourself on how files in general work. Open a text file in a Hex editor and figure out why exactly "48 45 4C 4C 4F" means "HELLO" and how does a typical text editor know that.
Then, open a BMP file in a hex editor and figure out how exactly those seemingly random bytes transform into an image when opened in Paint.
^ Ange made a guide on that too.
Once you've thoroughly understood the concept behind files and how they're all simply nothing but ones and zeros, just interpreted differently, you can begin reading file format specifications. The Internet is full of them and once you understand a file format specification, you have the power to read files with your mind simply by looking at the file's bytes.
Even so, most files that have a specification available have viewers/editors made for them.
I strongly suggest reading the simplest guides by Ange. They help visualise the files very well.
VGMStream is a fantastic tool that lets you convert many many proprietary Video Game audio formats to simpler formats. If you download its source code, you can, technically, read their specifications. This will take time and effort, but in the end you might understand how a .xyz works.
Now rewind back to the WAV guide. What are the core components of a sound? Sample rate, amplitude, all that jazz? Your job is to figure out how the unknown file format's seemingly random bytes translate to those attributes. It's not easy, but it's the only way. You can try importing a file to Audacity as Raw data and understanding how it sounds somewhat reasonable but still a bit glitchy if you set the sample rate to 44100... and make a connection on how all your crazy files begin with "AC 44" (which is 44100 in decimal).
You could also notice how your files begin with the bytes 50 4B, which just so happens to be the ZIP Magic number. Therefore, the files are ZIP-compressed.
You could also view the file through a spectrogram and figure something out. Or, by deduction, realise that the song is not waveform data at all, but sequenced music (think MIDI).
There's no one-size-fits-all solution, but "figuring out how formats work" is the same job for all - Audio, Video, Images... you have to dwell inside the bytes and understand their language. You can help this dwelling with helper tools, like Tile Molester for graphics, Audacity for Audio, binwalk for random craziness... Whatever you do, the feeling you get when you crack a format is amazing.
EDIT: obviously emulators with audio debuggers can help a lot too. Some save state formats might dump the uncompressed audio session (or a part of it) to the file too. If a game has compressed graphics, usually you can make a save state and open that in a graphics editor to find the pure decompressed sprites so I'm led to believe the save states might have snippets of true audio in there too. If you can extract a piece of this uncompressed audio, you can compare it with the compressed audio, make notes, figure something out and maybe write a specification of the format even though a player/editor wouldn't exist yet!