Home
Calendar
Certifications
Columns
Features
Forum
Resources
Vitals
Latest Additions
April 2013 Free Giveaway Sponsor - eLearnSecurity
Human Intelligence to Navigate the Security Data Deluge
February 2013 Free Giveaway Winner of SANS CyberCon Training
Interview: Bugcrowd Founders on Herding Ninjas for Crowdsourced Bug Bounties
Network Forensics: The Tree in the Forest
March 2013 Free Giveaway Sponsor - Mile2
Book Review: Violent Python
February 2013 Free Giveaway Sponsor - SANS
Holiday 2012 Free Giveaway Winner of Metasploit Pro by Rapid7
Course Review: SANS FOR408 Computer Forensic Investigations – Windows In-Depth
The Security Consulting Sugar High
Tutorial: Fun with SMB on the Command Line
Interview: Ilia Kolochenko, CEO of High-Tech Bridge
October 2012 Free Giveaway Winner of LearningGate Training
The Broken: Assessing Corporate Security in 2012 to Make a Better 2013
EH-Net Login
Welcome Guest.
Username:
Password:
Remember me
Lost Password?
No account yet?
Register
Who's Online
We have 58 guests and 3 members online
Free Business and Tech Magazines and eBooks
You are here:
Home
Ethical Hacking Discussions and Related Certifications
Network Pen Testing
Difficulty of reverse engineering
EH-Net
May 23, 2013, 10:54:43 AM
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
: Go back to The Ethical Hacker Network Online Magazine
Home Page
Home
Help
Calendar
Login
Register
EH-Net
>
Ethical Hacking Discussions and Related Certifications
>
Network Pen Testing
(Moderator:
don
) >
Difficulty of reverse engineering
Pages: [
1
]
Go Down
« previous
next »
Print
Author
Topic: Difficulty of reverse engineering (Read 7050 times)
0 Members and 1 Guest are viewing this topic.
Neophyte
Newbie
Offline
Posts: 3
Difficulty of reverse engineering
«
on:
February 04, 2010, 12:41:07 PM »
I'm a "normal" programmer (oxymoron, I know). I have no experience with hacking, but I need to get some information from some knowledgeable people on this subject.
I have a somewhat complex mathematical algorithm consisting of about 1000 lines of C++ code. If I compile and optimize it, how difficult will it be for someone else to reverse engineer it and discover how the algorithm works? Will it take a few days, or a few months, or a few years?
Any feedback will be greatly appreciated.
-k
Logged
UNIX
Hero Member
Offline
Posts: 1235
Re: Difficulty of reverse engineering
«
Reply #1 on:
February 04, 2010, 12:53:31 PM »
Can you give more information? A sample program would be great too, so that interested people (such as myself
) could take a look at it.
Without more information I would say a few hours - a few days.
Logged
n0on3
Newbie
Offline
Posts: 11
Re: Difficulty of reverse engineering
«
Reply #2 on:
February 04, 2010, 12:57:08 PM »
Are you concerned about someone to understand how your algorithm works, or to get the actual (equivalent) code you wrote ?
From a technical point of view, you shall imagine someone with a debugger, that execute your program step-by-step and see the low level instructions as well as the changes to the data structures. The complexity of guessing how the algorithm works depends on your algorithm in this case.
Anyway I think you are more concerned about someone to use some automated process to de-compile your software and get your code or something equivalent. In that case you can consider to use some
code-obfuscation
technique.
Logged
http://www.n0on3.net
UNIX
Hero Member
Offline
Posts: 1235
Re: Difficulty of reverse engineering
«
Reply #3 on:
February 04, 2010, 12:59:50 PM »
Security through obscurity? Are you sure?
Logged
n0on3
Newbie
Offline
Posts: 11
Re: Difficulty of reverse engineering
«
Reply #4 on:
February 04, 2010, 01:23:32 PM »
Quote from: awesec on February 04, 2010, 12:59:50 PM
Security through obscurity? Are you sure?
I'm not saying it's a solution, i'm saying it may help.
Even if it's true that you don't deny the activity, you may have the goal to raise its complexity to the point that it doesn't worth the effort.
Anyway, if that software has to do its job on untrusted standalone machines, i don't see much more you can do about that... any ?
Logged
http://www.n0on3.net
Neophyte
Newbie
Offline
Posts: 3
Re: Difficulty of reverse engineering
«
Reply #5 on:
February 04, 2010, 01:42:53 PM »
A Delaunay triangulation routine would be similar to what I'm doing. Here's some code for that (~270 lines of code):
http://local.wasp.uwa.edu.au/~pbourke/papers/triangulate/triangulate.c
I'm concerned with someone gaining enough understanding of how the algorithm works that they could replicate it themselves. Honestly, if I had the original C++ code for 1000 lines of something like the triangulation code, it would take me a couple of days to figure out the nuts and bolts of what all was going on. If I had to look at the assembly code, though, game over! However, there are a lot smarter people than me out there, and I know decompilers can get you farther than simple assembly code.
So , for a similar 1000-line piece of code, what's a good estimate for the time it would take to figure out the compiled algorithm?
Logged
Neophyte
Newbie
Offline
Posts: 3
Re: Difficulty of reverse engineering
«
Reply #6 on:
February 04, 2010, 01:59:31 PM »
n0on3 - you mentioned obfuscation. My understanding of obfuscation was that it was primarily helpful for interpreted code (Java, VB, etc.), since it mangled function and variable names. Code that's been compiled to binary machine code should not have any meaningful names left, right? It's all just push/pop/move/etc. statements, right? Can an obfuscator still help?
Along those lines, can you recommend any good software protection programs? I've tried VMProtect, but whatever it does to my program makes it look like a virus afterwards to some of the major AV packages.
Logged
n0on3
Newbie
Offline
Posts: 11
Re: Difficulty of reverse engineering
«
Reply #7 on:
February 04, 2010, 02:48:43 PM »
I'm sorry, i can't recommend any software, i just read about these techniques in the past but never had the need to use them.
Anyway, compiled code is as you said all about instructions, and what you don't want is someone to look at them, or inspect with some tool, and guess what your algorithm is like. What i thought was that maybe you can still trade something, like changing your implementation that probably match common programming best practices, inserting real instructions that makes your routines harder to understand or don't match what automated tools recognize, whitout changing their results. Obviously this is algorithmically useless, pure computational overhead and decrease performance, and since you were talking of optimized code you won't like this, but maybe you can find an acceptable tradeoff, if deny reverse engineering is really important for some reason.
Logged
http://www.n0on3.net
geekyone
Full Member
Offline
Posts: 180
Re: Difficulty of reverse engineering
«
Reply #8 on:
February 04, 2010, 03:38:42 PM »
First off I have to caveat this advice with the statement that I am a Reverse Engineering newbie. I would say based on what you want accomplished "keeping someone from replacing the algorithm" and the complexity of the code in question that successful reverse engineering would depend mostly on your implementation. Is this algorithm code going to be part of the main program executable or a separate file? If it is included in the main exe and fully integrated into your program honestly very few people are ever going to be able to replace that algorithm by reverse engineering. I am sure some experts would be able to but it would require significantly altering the flow of the executable using assembly code. Now on the other hand if you put the algorithm in a separate file using a debugger it would be fairly easy to trace the program flow and change algorithms. Of course it makes it a lot harder for you to ever upgrade your algorithm if you integrate it into your main executable.
Well that's my two cents. Good Luck!
Logged
CISSP, CEH, GPEN, GCIH, GCFA
phn1x
Newbie
Offline
Posts: 26
Re: Difficulty of reverse engineering
«
Reply #9 on:
February 05, 2010, 09:30:35 PM »
If someone really wants to RE it and implement it for themselves they will...regardless of what you do to it.
Logged
UNIX
Hero Member
Offline
Posts: 1235
Re: Difficulty of reverse engineering
«
Reply #10 on:
February 07, 2010, 03:56:44 AM »
@Neophyte: I think the sample you posted can be reversed within a few hours - a few days, as assumed before. There were much stronger protections already reversed, so this shouldn't be too hard, though it really depends on the knowledge and experience of the reverser.
Logged
Pages: [
1
]
Go Up
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
EH-Net
-----------------------------
=> Calendar Of Events
===> ChicagoCon 2007
===> ChicagoCon 2008s
===> ChicagoCon 2008f
===> ChicagoCon 2009s
=> Ethical Hacktivism
=> News Items and General Discussion About EH-Net
===> Greetings
=> Special Events
-----------------------------
Ethical Hacking Discussions and Related Certifications
-----------------------------
=> General Certification
===> Networking
===> OS
===> Security
=> Compliance, Regulations & Standards
=> Control Systems
=> Cyber Warfare
=> Forensics
===> CCE / MCCE - (Master) Certified Computer Examiner
===> CHFI - Computer Hacking Forensic Investigator
===> EnCE - EnCase® Certified Examiner
===> GCFA - GIAC Certified Forensics Analyst
=> Hardware
=> Incident Response
===> CSIH - Computer Security Incident Handler
===> GCIH - GIAC Certified Incident Handler
=> Malware
===> Advisories
=> Mobile
=> Network Pen Testing
===> CEH - Certified Ethical Hacker
===> CPTC - Certified Penetration Testing Consultant
===> CPTE - Certified Penetration Testing Engineer
===> CSTA - Certified Security Testing Associate
===> eCPPT - eLearnSecurity Certified Professional Penetration Tester
===> ECSA - EC-Council Certified Security Analyst
===> GPEN - GIAC Certified Penetration Tester
===> OSCP - Offensive Security Certified Professional
=> Physical Security
=> Programming
=> Social Engineering
=> Web Applications
=> Wireless
===> CWNP Certs
===> GAWN - GIAC Assessing Wireless Networks
===> OSWP - Offensive Security Wireless Professional
=> Other
-----------------------------
Columns
-----------------------------
=> Editor-In-Chief
=> Andress
=> Gates
=> Haddix
=> Hadnagy
=> Heffner
=> Hoffman
=> Linn
=> RichM
=> Murray
=> J. Peltier
=> Weidman
=> Wilson
-----------------------------
Features
-----------------------------
=> /root
=> Book Reviews
=> Opinions
=> Skillz
===> Examples
===> May 06 - Star Hacks, Episode V: The Empire Hacks Back
===> July 06 - Hack Bill!
===> Sept 06 - Netcat in the Hat
===> Nov 06 - Hitch-Hackers Guide to the Galaxy
===> Dec 06 - A Christmas (Hacking) Story
===> Feb 07 - Charlottes Web Site
===> April 07 - Microsoft Office Space
===> June 07 - Serenity Hack
===> Oct 07 - Worst. Ethical. Hacker. Challenge. Ever.
===> Dec 07 - Frosty the Snow Crash
===> March 2008 - It Happened One Friday
===> Oct 2008 - Scooby Doo and the Crypto Caper
===> Dec 08 - Santa Claus Is Hacking to Town
===> Feb 2009 - Brady Bunch Boondoggle
===> July 2009 - Prison Break
===> October 2009 - SSHliders
===> December 2009 - Miracle on Thirty-Hack Street
===> December 2010 - The Nightmare Before Charlie Browns Christmas
-----------------------------
Resources
-----------------------------
=> Career Central
===> Looking For Work
===> Looking To Hire
=> Links to cool sites.
=> Mass Media
=> News from the Outside World
=> Tools
=> Tutorials
===> Tutorial Requests
Loading...
Exclusive Deal
SANSFIRE 2013
June 15 - 22
5% Off
w/ Code
:
EHN_5
SANS Deals 4 EH-Netters
5% OFF
Any
SANS Course
in Any Format!
Coupon Code:
EHN_5
Including
SANS Rocky Mountain 2013
&
SANS Boston 2013
Polls
Compared to this year, 2013 will be:
Great!
Better.
About the same.
Little worse.
FUBAR!
Recent Forum Topics
GCIH - GIAC Certified Incident Handler
: Passed my GCIH
(3) by
H1t M0nk3y
Greetings
: Hi from the UK
(3) by
UKSecurityGuy
GCIH - GIAC Certified Incident Handler
: GCIH Free Practice test attempt
(0) by
prats84
News Items and General Discussion About EH-Net
: Change is Coming to EH-Net!!
(27) by
don
Network Pen Testing
: AIX Vulnerability Assessments
(2) by
ras76
Tutorials
: Need guidance
(9) by
hanyhasan
Programming
: Finished Python Course in Codecademy now what?
(15) by
hanyhasan
Network Pen Testing
: Ruby on Rails Vulnerabilities / Attacks in BackTrack 5 r3
(0) by
SUdoctstudent
Network Pen Testing
: De-ICE 1.140 released!
(2) by
superkojiman
General Certification
: CPT Practical Submission
(1) by
UNIX
OSCP - Offensive Security Certified Professional
: Failed my first attempt at the OSCP exam
(94) by
azmatt
Tools
: Social-Engineer Toolkit (SET) Version 5.0 “The Wild West” Released
(2) by
m0wgli
Malware
: EICAR?
(3) by
UKSecurityGuy
Advisories
: HTB23154: Multiple Vulnerabilities in Exponent CMS
(0) by
AndyP
Advisories
: HTB23153: Multiple Vulnerabilities in Jojo CMS
(0) by
AndyP
Advisories
: HTB23151: Cross-Site Request Forgery (CSRF) in UMI.CMS
(0) by
AndyP
OSCP - Offensive Security Certified Professional
: Class Scheduled 6/8 - Linux n00b
(7) by
Taemyks
OSCP - Offensive Security Certified Professional
: OSCP exam scheduled
(6) by
gbhat
Incident Response
: LinkedIn Forensics
(0) by
AFENTIS_Forensics
General Certification
: Red Team/Blue Team
(1) by
ajohnson
Career Central
: Starter cert?
(3) by
Grendel
Network Pen Testing
: Beginner Ethical Hacker
(1) by
m0wgli
EH-Net News Feeds
Latest Additions
Privacy Notice
for TDCC & All Properties
© 2013 The Ethical Hacker Network
Joomla!
is Free Software released under the GNU/GPL License.