Author Topic: Reflection  (Read 758 times)

0 Members and 1 Guest are viewing this topic.

Offline vegiraghav

  • /dev/null
  • *
  • Posts: 5
  • Cookies: 0
    • View Profile
Reflection
« on: February 06, 2016, 04:56:15 am »

I have always wondered about hacking as to how people get the source code of an application. So i was going through this tutorial https://evilzone.org/tutorials/keygenning-net-applications-(n00b-friendly)/msg105270/#msg105270 , he got the source code using reflection.
 I went to wiki for more info, only to be even more confused.
So I want to know what is reflection. What are the programming languages that have reflection ?
Why would they compromise the source code if it can be use to hack the application?   
Please tell me all that I should know about it if i am not asking the right questions.

Offline Deque

  • P.I.N.N.
  • Global Moderator
  • Overlord
  • *
  • Posts: 1203
  • Cookies: 518
  • Programmer, Malware Analyst
    • View Profile
Re: Reflection
« Reply #1 on: February 06, 2016, 02:06:16 pm »
Reflection (in the field of programming) is the ability that a program can see and modify the structure of its own code. This is mostly common for programming language implementations that are interpreted or compile to an intermediate language, e.g., Java which compiles to bytecode, and .NET languages which compile to MSIL. Here is a list of "reflective programming languages and platforms": https://en.wikipedia.org/wiki/List_of_reflective_programming_languages_and_platforms

The tutorial you are referring to reverse engineers a .NET application and uses a popular decompiler called .NET Reflector --> this is just the name of that decompiler.

What do you mean with "compromise the source code"?
« Last Edit: February 06, 2016, 02:06:38 pm by Deque »

Offline vegiraghav

  • /dev/null
  • *
  • Posts: 5
  • Cookies: 0
    • View Profile
Re: Reflection
« Reply #2 on: February 06, 2016, 08:00:20 pm »
compromising in the sense the softwares(especially security) that are not meant to be open source but they become one cause of reflection.
Does it mean that one can get the source code for almost all applications? And find the vulnerabilities Or just educate themselves?
What if one makes an app in the "reflective" languages and they don't want to give away the source code?
« Last Edit: February 06, 2016, 08:03:28 pm by vegiraghav »

Offline fuicious

  • Serf
  • *
  • Posts: 47
  • Cookies: 0
    • View Profile
Re: Reflection
« Reply #3 on: February 06, 2016, 10:45:51 pm »
compromising in the sense the softwares(especially security) that are not meant to be open source but they become one cause of reflection.
Does it mean that one can get the source code for almost all applications? And find the vulnerabilities Or just educate themselves?
What if one makes an app in the "reflective" languages and they don't want to give away the source code?
They are open source or they aren't, they don't become it when you disassemble them, you just get to see the code at your responsibility. There are techniques to make you're code a little messy so it's not easily readable. You might be looking for this: https://en.wikipedia.org/wiki/Obfuscation_(software).

Offline Deque

  • P.I.N.N.
  • Global Moderator
  • Overlord
  • *
  • Posts: 1203
  • Cookies: 518
  • Programmer, Malware Analyst
    • View Profile
Re: Reflection
« Reply #4 on: February 07, 2016, 10:47:30 am »
compromising in the sense the softwares(especially security) that are not meant to be open source but they become one cause of reflection.
Does it mean that one can get the source code for almost all applications? And find the vulnerabilities Or just educate themselves?
What if one makes an app in the "reflective" languages and they don't want to give away the source code?

You don't get the original source code with decompiling. You get only something that comes close to it if you decompile .NET languages.
Most companies will prohibit reverse engineering. And additionally a lot of programs these days are obfuscated or packed to hide the source code from reverse engineers. That makes it harder to reverse engineer. But in the end, you have never a 100% protection from reverse engineering, no matter which language implementation you use.
« Last Edit: February 07, 2016, 10:47:55 am by Deque »