Decompiling .exe files using CodeReflect - exe

I have one silly question that I decided to ask here since Google didn't provide an explanation (or I am using wrong terms, which most likely is the case) and people here have proven to be really helpful before.
Let's say we have 2 different .exe files and I use CodeReflect to view the contents of both files.
First file here, it seems quite normal and easy to read. Nothing wrong with this one.
Second file which makes zero sense to me. I have no idea what's up with this, lots of random characters everywhere. Is this .exe file encrypted or something or why does it look so different? If it's encrypted, is there a simple way to attempt decrypting it?
This one confuses me a lot, I'd really appreciate to get an explanation to this.
Thanks in advance.

This is an obfuscation.
It usually helps to fight agains reverse engineers.
You can try to deobfuscate application with this: http://de4dot.com
UPD: And it was probably obfuscated with ConfuserEx v1 because I see 'ConfusedByAtrribute' element.

Related

visual studio code resource collector

I'm working on a website with Visual Studio Code.
Is there a way to save only the files being used by a project into a separate folder?
Basically what I'm looking for is a tool which would scan all the local resources linked by all html files (meaning linked images, videos, files), and then it would save them all in a separate folder.
The reason why I'm asking this is because at the moment I'm testing things out, meaning I'm using image A, then image B, C and so on so forth. These images live in subfolders, so now I ended up with some images which I'm actually using in the html pages and some which I'm not. The thing is, is not simple to check which images I'm using.
You'll find the same principle in 3d applications, such as 3ds Max for instance, where, once you're done with the project, you can use a Resource Collector tool to strip out all the unused assets and save only the ones used by the project.
I've looked for an extension or a solution to this without any luck, so I guess an extension does not exist yet, but I think it would be a nice tool.
I don't understand why someone downvoted my post.
Either what I'm asking is already possible, although like I said I searched and I didn't find anything, or who downvoted consider my request stupid.
Whatever the reason, I believe it would be more mature to give a proper answer, even if whoever downvoted did it for either one of the two possible reason above.
In fact:
The solution already exists: like I said, I didn't find it, so if someone knows the solution why not simply posting it here?
The solution doesn't not exist but someone thinks it's a stupid idea. Well, it is not and it would be polite and civilized to discuss it.
In the current era it became so easy to express opinions without actually doing anything, by simply pressing a button to say nothing valuable, as a "I like".
I never stop feeling amazed where the social media behavior it's taking us.

Node.js file system modes?

I'm having a hard time wrapping my head around opening and reading from a simple text file in Node.js. Part of my problem is that many of the file system functions require a mysterious [mode] argument. This is apparently a four digit number that... does something. I have no idea what and I can't seem to find a good explanation. I suspect that this is something rather basic to elite node.js hackers, but I'm finding it rather mystifying. Can anyone explain what this argument does?

CodeIgniter Security

I've been doing some reading on PHP security and I ran into a great question/article on SO > Exploitable PHP functions
There are a ton of interesting commands/functions that should never even be possible to run.
My question is... Does CI have any built in protection/prevention against using any of the commands/functions found on this list?
If so, please point it out for me, I cant seem to find it.
If not, would it be possible to add to or create a CI core class for preventing some or all of the possibly exploitable commands?
It might sound a lil counter intuitive, but having CI dictate best practices seems to be a big part of its design... For example, the CSRF will break your form submission process if you dont set it up right... And thats built right in, but disabled...
Thanks,
Peter
I think I got this answered. There seems to be a preg_replace looking for these commands on the input class # line 763.
Please correct me if I am wrong.

how to encrypt a vc++ project?

i have been programing in vc++ for sometime and i want to make some free software for people to use but i really don't want people to have a unprotected copy of my work. i just use what ever vc++ 2008 has when i build in right now so i don't know if it is encrypted or now. i don't need something that is top of the line i was just hopeing for something free and it would encrypt my project before i gave it out.
You need to start by thinking about what you want people to be able to do with your code, and what you want people not to be able to do. If all you want is that people can run your code, but can't change it (without significant difficulty) and can't see how you're doing what you're doing, then you can simply compile the program with your compiler, and send them the executable code. This is the way in which much commercial, paid-for software is distributed: as an example, if you buy a copy of Microsoft Word, you get an executable program which you can install on your machine and run, but you don't get the source code from which it was built. This means that you can't make changes to Word if you want to fix a problem or change the way in which it works.
If what you want it more complicated than this, please tell us what you want various people to be able to do and not do, and we'll try to help.
Well, "free software" can mean one of two things- free as in beer or free as in freedom. It sounds like you're looking for the first of the two.
I'd say don't bother with encrypting it. If you're distributing a compiled program, there's really no way to prevent someone from reverse engineering it if they wanted to... which is unlikely if your program is free anyway. Same goes if you're distributing the source. Encrypt it all you like, but all it takes is one person with a decrypted copy to redistribute it.
no one is going to use any 3rd party library if it can't be maintainable/debugable(because you don't want to provide source code)
its like installing unknown program on your computer... you never know that's gonna happen
if you really want to release it, then you might split it and release it in parts?
or maybe someone is already doing something like you.. check github for example
i don't really get what you want, maybe you just want to encrypt your project files?
if you want to encrypt it with free software why don't just compress and put password, for example you can use 7-zip, the encryption is AES-256 bit which is really good, no one can break it, except maybe NSA.

Understanding a Large, Undocumented Set of Source Code? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I have always been astonished by Wine. Sometimes I want to hack on it, fix little things and generally understand how it works. So, I download the Wine source code and right after that I feel overwhelmed. The codebase is huge and - unlike the Linux Kernel - there are almost no guides about the code.
What are the best-practices for understanding such a huge codebase?
With a complex code base the biggest mistake you can make is trying to be a computer. Get the computer to run the code, and use a debugger to help find out what is going on.
Figure out how to compile, install and run your own version of Wine from the existing source code.
Learn how debug (e.g. use gdb) on a running instance of your version of Wine.
Run Wine under the debugger and make cause it to demonstrate the undesired behaviour.
The fun part: find where the code execution path goes and start learning how it all goes together.
Yes, reading lots and lots of code will help, but the compiler/debugger/computer can run code a lot faster than you.
A professor once told us to compare such a situation with climbing a mountain. You might be listening to someone who did this and tells you what it's like to look out into the country. And you believe without hesitation that that's a spectacular sight.
However, you have to start climbing yourself for real understanding what the view from the top is like.
And it's not that important to climb all the way to the top. It might be perfectly suficient just to reach a fair height above ground level.
But don't ever be afraid of start climbing. The view is always worth any efforts.
This has always been a nice analogy for me. I know this question was more about specific tips on how to efficiently deal with code bases once you started climbing. But nevertheless it instantly reminded me of our physics classes way back then.
(This is an answer I posted to a question a while back. I modified it a bit to fit this question.)
Experience has shown me that there are 3 major goals you have when learning a legacy system:
Learn what the code is supposed to do.
Learn how it does them.
(crucially) Learn why it does them the way it does.
All three of those parts are very important, and there's a few tricks to help you get started.
First, resist the temptation to just ctrl-click (or whatever your IDE uses) your way around the code to understand everything. You probably won't be able to keep everything in perspective in your mind this way, especially when each line forces you to look at multiple other classes in order to understand what it is, so you need to be able to hold several levels of the stack in your head.
Read documentation where possible; it usually helps you quickly gain a mental framework upon which to build everything that follows.
Run test cases where possible.
Don't be afraid to ask someone who knows if you have a question. Granted, you shouldn't waste others' time with inane queries, but if there's something that you simply don't understand (this is especially true with more conceptual questions like, "Wouldn't it make much more sense to implement this as a ___" or something), it's probably worth finding out the answer before you mess something up and don't know why.
When you do finally get down to reading the code, start at a logical "main" place and go from there. Don't just read the code top to bottom, or in alphabetical order, or anything (this is probably obvious).
The best way to get acquainted with a large codebase is to dive in. Many projects have a list of easy tasks that need to be done, and they're usually reserved to help ease people in. You should find and work on some of these; you'll learn a lot about the general code outline and structure, contribute to the project, and get an easy payoff that will help encourage you to take on larger tasks.
Like most projects, WINE has good resources available to its developers; IRC, wiki, mailing list, and guides/overviews. With most daunting codebases, it's not so scary after the first few fixes. WINE is truly large, and much like the kernel, I doubt there's any expert in all systems; don't feel like you need to be either. Start working on something that matters to you and take it from there.
I've started a few patches to WINE myself, and it's a good community and good structure. There's lots of very helpful debug messages, and it's a really cool project to work on, so that helps you hit it longer too.
We all appreciate your valor and willingness to help with WINE (it needs it). Thanks, and good luck.
Dig in. Think of a question you'd like to have answered, and try to find the answer. When you get tired of reading code, go read the dev mailing list, the developer's guide, or the wiki.
Unfortunately, there's no royal road to understanding a large code base. If you enjoy that sort of thing (I do) you're in for some fun. If not, guide books won't really help, so you aren't really that much worse off.
Look for one peculiar feature you are interested to improve. Search for its implementation. Once you found it, pull on that straw and all the rest will follow.
The best way is through comments.
I'm being ironic, as you understand tiny bits of the beast add comments so you can follow your trail.
The other developers will also enjoy it if you add the missing guides in the code.
Try to implement some tiny little change in the code, something that will be visible to you. That might be figuring out a workable way to output debugging statements (and figuring out where the output appears), it might be changing the default size of windows or desktop color, or something. Once you can make something happen in the codebase, you've scratched the surface of understanding and can begin to move on toward more complicated things. At that point, select a goal of something slightly more useful that you'd like the code to do, and implement that. Or check out the project's bug tracker and look for something small to start with.
Document as you go, and write unit tests as you go, and refactor as you go. When you figure out what a routine does, comment it!!
As others have suggested, dig in! Read all the available documentation you can absorb. Then see if you can find other people who are interested or knowledgeable and learn with/from them. It helps to have people to bounce ideas off of and ask questions.
For C source code, once you get a feel for what areas of the code you'd like to work on, generate ctags and cscope databases for that code. These tools make it a lot easier to jump around and understand the code. Many text editors (one example is gvim) have support for ctags and cscope so you can jump around easily.
(warning: shameless marketing ahead)
For Java developers using Eclipse, there's nWire. It is an Eclipse plugin for navigating and visualizing large codebases.
A good way to understand a large system is to break it down into it's constituent parts and focus on a specific paths through the application.
Your debugger is your friend here, set a breakpoint in the thread you want to investigate then step through it line by line looking at which each part does... hope that helps...

Resources