0

Is there a way to find out all parameters which you can pass to a executable file, e.g. a .exe file?

Example: The game GTA V offers the parameter -verify which you can pass to the shortcut of the .exe so that it verifies the game files before the game starts.

enter image description here

Is there a way to find out if there are more params by analyzing the executable, e.g. by reverse engineer it with ollydbg or some other program?

closed as too broad by 0xC0000022L, perror, Paweł Łukasik, kn0x, julian Jun 7 '18 at 0:55

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    Yes and no. If all of the parameters are stored in a straightforward fashion you may be in luck. But there's a myriad of ways to hide and obfuscate facts. So while - in principle - what you're asking is possible, it's going to be tough to be certain that you caught all of the possible parameters. Specifically because on Windows there exist a multitude of ways to fetch the command line arguments at any time. So this is a bit of a broad question. – 0xC0000022L Jun 4 '18 at 13:24
2

The first answer that comes to mind would be to check the code that handles those and find out what is supported.

The other is just to check the strings output and try to see if there's anything that might be used as an argument. But with this approach, you might now know what each parameter does as the results might not be so obvious.

2

you may need to reverse engineer the argument handling part of the binary in question

you could possibly enter bogus arguments and set a hardware break point on access to these bogus arguments to narrow the code region that uses or compares these argumets

some times the arguments could be hashed and hash compared as shown in the answer below

there isn't a generic magic you need to handle these on case to case basis

i answered a similar question here

Not the answer you're looking for? Browse other questions tagged or ask your own question.