MindSystem Posted September 10, 2017 Posted September 10, 2017 Hi, I would like to know how I can dump the section of a NATIVE executable using c# ? PS : the section I would like to dump is an added section (so not .text, .reloc, .rsrc) Thanks you
atom0s Posted September 11, 2017 Posted September 11, 2017 Walk the PE header like normal, enumerate the sections and dump the target section you want. There is nothing special about it being a native image or that you are coding in C#. Here is code I wrote for my Steamless project to read the PE headers of files: 32bit: https://github.com/atom0s/Steamless/tree/master/Steamless.API/PE32 64bit: https://github.com/atom0s/Steamless/tree/master/Steamless.API/PE64 2 1
Kurapica Posted September 11, 2017 Posted September 11, 2017 I don't wanna look like I'm promoting this but I think it can make your life very easy. SRC included. https://board.b-at-s.info/index.php?showtopic=9695 B_S.Framework.rar PEStudio.rar 2
MindSystem Posted September 11, 2017 Author Posted September 11, 2017 50 minutes ago, atom0s said: Walk the PE header like normal, enumerate the sections and dump the target section you want. There is nothing special about it being a native image or that you are coding in C#. Here is code I wrote for my Steamless project to read the PE headers of files: 32bit: https://github.com/atom0s/Steamless/tree/master/Steamless.API/PE32 64bit: https://github.com/atom0s/Steamless/tree/master/Steamless.API/PE64 That's all I need, thanks you
mrexodia Posted September 11, 2017 Posted September 11, 2017 3 hours ago, atom0s said: Walk the PE header like normal, enumerate the sections and dump the target section you want. There is nothing special about it being a native image or that you are coding in C#. Here is code I wrote for my Steamless project to read the PE headers of files: 32bit: https://github.com/atom0s/Steamless/tree/master/Steamless.API/PE32 64bit: https://github.com/atom0s/Steamless/tree/master/Steamless.API/PE64 https://github.com/atom0s/Steamless/blob/master/Steamless.API/PE32/Pe32File.cs#L111 You might wanna check https://corkamiwiki.github.io/PE probably steam doesn't output these exotic files, but it's still worth checking out alignment on PointerToRawData and SizeOfRawData being ignored if VirtualSize is smaller.
MindSystem Posted September 11, 2017 Author Posted September 11, 2017 32 minutes ago, mrexodia said: https://github.com/atom0s/Steamless/blob/master/Steamless.API/PE32/Pe32File.cs#L111 You might wanna check https://corkamiwiki.github.io/PE probably steam doesn't output these exotic files, but it's still worth checking out alignment on PointerToRawData and SizeOfRawData being ignored if VirtualSize is smaller. That was for making an unpacker for BoxedAppPacker (.net) so all is working fine
mrexodia Posted September 11, 2017 Posted September 11, 2017 Just now, MindSystem said: That was for making an unpacker for BoxedAppPacker (.net) so all is working fine lol
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now