Runtime Type Identification in Exe & Crackers

This is a discussion on Runtime Type Identification in Exe & Crackers within the C++ Programming forums, part of the General Programming Boards category; Sorry for this dumb question, assembler & cracking is not my thing. But I do have a passing interest in ...

  1. #1
    Code Monkey Davros's Avatar
    Join Date
    Jun 2002
    Posts
    812

    Runtime Type Identification in Exe & Crackers

    Sorry for this dumb question, assembler & cracking is not my thing. But I do have a passing interest in protecting apps. So I was wondering....

    If a binary is built using RTTI, could this be helpful to a cracker?
    OS: Windows XP
    Compilers: MinGW (Code::Blocks), BCB 5

    BigAngryDog.com

  2. #2
    Registered User
    Join Date
    Aug 2003
    Posts
    470
    Perhaps, but I think a cracker would only be able to find the class name. Stroustrup describes an implementation of RTTI where the virtual table has a pointer to the rtti data. There, the type_info struct is stored which will have a pointer to the class name. So I would suppose a hacker could find the virtual table and then find the class name.

  3. #3
    01000011 00100000 0010000
    Join Date
    Jul 2004
    Posts
    38
    I haven't even read a sentence on anything you guys are talking about, but I have general computer knowledge and can pick up from context clues. Couldn't you use a memory scanner and scan for the table with something such as a key word, or value you know is in it. Like write code to increment the hex memory value and then scan the pointer and do something like check if the pointer's actual memory value (the value stored in memeory) is equal to the key word or value you know. Then you would know where the table is located. Once you know that you could write code to scan between certain locations and you could narrow the table down from there. Then you could have the entire table and would have all the values you would need. Possibly, like I said I have no clue what you guys are talking about really, I am babling on about some hypothetical situation that doesn't even exist, but I am just trying to help :P.

  4. #4
    Code Monkey Davros's Avatar
    Join Date
    Jun 2002
    Posts
    812
    >Perhaps, but I think a cracker would only be able to find the class name.

    That's helpful. Thanks.

    >I haven't even read a sentence on anything you guys are talking about... I am babling on about some hypothetical situation that doesn't even exist, but I am just trying to help

    Thanks for the reply. If I read you correctly (forgive me I haven't), I was trying to say I want to protect my shareware apps, not ruin someone elses hardwork.

    Can I take it that, with some effort, a cracker could access namespace & classnames? However, the classnames won't be littered around like literal string comments.
    OS: Windows XP
    Compilers: MinGW (Code::Blocks), BCB 5

    BigAngryDog.com

  5. #5
    01000011 00100000 0010000
    Join Date
    Jul 2004
    Posts
    38
    Oh, sorry, i thought you were trying to crack something, not protect it. :P

  6. #6
    Registered User
    Join Date
    Aug 2003
    Posts
    470
    Can I take it that, with some effort, a cracker could access namespace & classnames? However, the classnames won't be littered around like literal string comments.
    I'm pretty certain that it can be done, even if the object layout uses some sort of name mangling scheme. The cracker would then only be able to match up the class if the there's a virtual method(classes that don't use virtuals do not have rtti).

  7. #7
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718
    If you're using a GCC-based compiler, you can use the strip command to pull out all unnecessary strings.
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Quantum Random Bit Generator
    By shawnt in forum C++ Programming
    Replies: 62
    Last Post: 06-18-2008, 11:17 AM
  2. Warnings, warnings, warnings?
    By spentdome in forum C Programming
    Replies: 25
    Last Post: 05-27-2002, 07:49 PM
  3. odd errors from msvc std library files
    By blight2c in forum C++ Programming
    Replies: 6
    Last Post: 04-30-2002, 01:06 AM
  4. gcc problem
    By bjdea1 in forum Linux Programming
    Replies: 13
    Last Post: 04-29-2002, 07:51 PM
  5. getting control type at runtime
    By Unregistered in forum Windows Programming
    Replies: 1
    Last Post: 01-20-2002, 11:23 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21