SlideShare a Scribd company logo
1 of 51
Download to read offline
05.Comparing on changes in cond jumps, animate over/in,
breakpoints
2012 ๋…„ 1 ์›” 28 ์ผ ํ† ์š”์ผ
์˜คํ›„ 1:16
Hello everybody.
๋ชจ๋‘๋“ค ์•ˆ๋…•
Welcome to this Part 5 in my series about reversing for newbies/beginners.
๋‚˜์˜ ์ดˆ๋ณด์ž๋ฅผ ์œ„ํ•œ reversing series Part 5 ์— ์™€์„œ ๋ฐ˜๊ฐ€์›Œ.
This "saga" is intended for complete starters in reversing, also for those without any programming
experience at all.
์ด "saga"๋Š” ์™„๋ฒฝํžˆ reversing ์ดˆ๋ณด์ž๋ฅผ ๋งž์ถฐ์„œ ๋งŠ๋“ค์–ด์กŒ๋‹ค. ๋˜ํ•œ ์–ด๋– ํ•œ programming ๊ฒฝํ—˜์ด
์—†์–ด๋„ ๋œ๋‹ค.
Lena151 (2006)
1. Abstract
In this Part 5, we will reverse a "real" application to learn something about finding the places to
patch.
์ด๋ฒˆ Part 5 ์—์„œ, ์šฐ๋ฆฌ๋Š” "real" application ์„ ๋ฌด์–ถ๊ฐ€๋ฅผ ๋ฐฐ์šฐ๊ณ  patch ๋ฅผ ์ฐพ๊ธฐ ์œ„ํ•ด reverse ํ•œ๋‹ค.
That is because indeed, the best practice is found in the real applications.
์ด๊ฒƒ์€ real application ์—์„œ ๋งค์šฐ ์ข‹์€ ๋ฐฉ๋ฒ•์„ ์ฐพ์•˜๋‹ค.
For better comprehension, I advise you to first see the first parts in this series before looking at
this if you are a newbie.
์ดํ•ด๋ ฅ์„ ์œ„ํ•ด ์ข‹๋‹ค, ๋„ค๊ฐ€ newbie ๋ผ๋ฉด ์ด movie ๋ฅผ ๋ณด๊ธฐ ์ ‚์— ์ด series ์˜ ์ฒซ๋ฒˆ์งธ part ๋ถ€ํ„ฐ ๋ด.
The goal of this tutorial is to teach you something about a program's behaviour In my search not
to harm anybody, I came across Coffeecup Visualsite Designer.
์ด tutorial ์˜ ๋ชฉํ‘œ๋Š” ๋ˆ„๊ตฌ์—๊ฒŒ๋“ ์ง€ ํ•ด๋ฅผ ์ฃผ์ง€ ์•Š๋Š” ๋ฒ”์œ„ ๋‚ด์—์„œ ๋„ˆ์—๊ฒŒ program ์˜ ํ–‰๋™์„ ๊ฐ€๋ฅด์น˜๋Š”
๊ฒƒ์ด๋‹ค. ๋‚˜๋Š” Coffeecup Visualsite Designer ๋ฅผ ๋ด์™”๋‹ค.
This is a program not updated since 11/2003 and thus probably no longer updated.
์ด program ์€ 2003/11 ์ดํ›„๋กœ update ๋˜์ง€ ์•Š์•˜๊ณ  ์•„๋งˆ ๋” ์ด์ƒ update ๋˜์ง€ ์•Š๋Š”๋‹ค.
However, because it could be misused, I only included the main executable and some more
necessary dll's to run (not the install exe !) for your research in the shown techniques.
๊ทธ๋Ÿฌ๋‚˜, ๋‚จ์šฉํ•˜์ง€ ๋ง์ž, ๋ณด์—ฌ์ฃพ technique ์—์„œ ๋„ˆ์˜ ์—ฐ๊ตฌ๋ฅผ ์œ„ํ•ด ์˜ค์ง main executable ๊ณผ ์‹คํ–‰ํ•˜๊ธฐ
์œ„ํ•ด ํ•„์š”ํ•œ ์•ฝ๊ฐ‚์˜ dll ์„ ํฌํ•จํ–ˆ๋‹ค.(install exe ๋Š” ์—†๋‹ค)
This makes the program useless for other purposes then study material. Taking a look in the
specialized media, I also found this application to be "cracked" numerous times before.
์ด๊ฒƒ์€ ๋‹ค๋ฅธ ๋ชฉ์ ์œผ๋กœ ์“ธ๋ชจ ์—†๋Š” program ์„ ๋งŠ๋“ญ๋‹ˆ๋‹ค. ํŠน๋ณ„ํ•œ media ๋ฅผ ๋ด, ๋‚˜๋Š” application ์ด
๋ง‹์ด "crack"๋œ ๊ฒƒ์„ ์ฐพ์•˜๋‹ค.
Although the registration is not important because the app has no limitations in unregistered
state, the patches will also "register" the app by securing the app to run always.
๋“ฑ๋ก์ด ์•ˆ๋œ ์ƒํƒœ์ž„์—๋„ ๋ถˆ๊ตฌํ•˜๊ณ  Registration ์€ ์ค‘์š”ํ•˜์ง€ ์•Š๋‹ค. ์™œ๋ƒํ•˜๋ฉด app ์€ ์ œํ•œ์ด ์—†๋‹ค.
Patches ๋Š” ํ•ญ์ƒ ์‹คํ–‰ํ•˜๊ธฐ ์œ„ํ•ด ๋ณดํ˜ธ๋œ app ์— ์˜ํ•ด app ์„ ๋“ฑ๋กํ•œ๋‹ค.
Here, this application is only picked because it is ideal for this tutorial in reversing and it is
targeted for educational purposes only.
์—ฌ๊ธฐ, ์ด application ์€ ์„ ๋ฐœ๋๋‹ค. ์™œ๋ƒํ•˜๋ฉด ์ด๊ฒƒ์€ reversing tutorial ์— ์ด์ƒ์ ์ด๊ณ  ์˜ค์ง ๊ต์œก์ ์ธ
๋ชฉ์ ์ธ target ์ด๋‹ค.
I hope you will exploit your newly acquired knowledge in a positive way.
๋„ค๊ฐ€ ์ƒˆ๋กœ ์–ป์€ ์ง€์‹์„ ๊ธ์ •์ ์ธ ๋ฐฉํ–ฅ์œผ๋กœ ์ด์šฉํ•˜๊ธฐ๋ฅผ ๋ฐ”๋ž€๋‹ค.
In this matter, I also want to refer to Part 1.
์ด ๋ฌธ์ œ๋Š”, part 1 ์„ ์ฐธ๊ณ ํ•˜๊ธฐ๋ฅผ ๋ฐ”๋ž€๋‹ค.
์ด๊ฒƒ๋„ ๋˜‘๊ฐ™์Œ
Set your screen resolution to 1152*864 and press F11 to see the movie full screen !!!
Again, I have made this movie interactive.
You screen ํ•ด์ƒ๋„๋ฅผ 1152*864 ๋กœ ์„ค์ •ํ•ด ๊ทธ๋ฆฌ๊ณ  full screen ์œผ๋กœ movie ๋ฅผ ๋ณด๊ธฐ ์œ„ํ•ด F11 ๋ฅผ ๋ˆŒ๋Ÿฌ
So, if you are a fast reader and you want to continue to the next screen, just click here on this
invisible hotspot. You don't see it, but it IS there on text screens.
๊ทธ๋ž˜์„œ, ๋„ค๊ฐ€ ์ด๊ฒƒ์„ ๋นจ๋ฆฌ ์ฝ๊ณ  ๋‹ค์Œ screen ์„ ๋ณด๊ณ  ์‹ถ๋‹ค๋ฉด, ๋ณด์ด๋Š” hotspot ์—ฌ๊ธฐ๋ฅผ ๋ˆŒ๋Ÿฌ. ๋ณด๊ณ  ์‹ถ์ง€
์•Š์„ ๋•Œ๋Š” ์—ฌ๊ธฐ์— ๋‘์ง€๋งˆ.
Then the movie will skip the text and continue with the next screen.
Movie ๋Š” text ์™€ ๋‹ค์Œ screen ์„ skip ํ•  ์ˆ˜ ์žˆ๋‹ค.
If something is not clear or goes too fast, you can always use the control buttons and the slider
below on this screen.
๋ฌด์–ถ๊ฐ€ ๋ช…ํ™•ํ•˜์ง€ ์•Š๊ฑฐ๋‚˜ ๋นจ๋ฆฌ ๋„˜๊ธฐ๊ณ ์ž ํ•  ๋•Œ, ํ•ญ์ƒ control button ๊ณผ ์ด screen ๋ฐ‘์— ์žˆ๋Š” slider
๋ฐ”๋ฅผ ์‚ฌ์šฉํ•ด.
He, try it out and click on the hotspot to skip this text and to go to the next screen now!!!
๋„์ ‚ํ•ด๋ด. ๊ทธ๋ฆฌ๊ณ  ์ด text ์™€ ๋‹ค์Œ screen ์„ ๋ณด๊ธฐ ์œ„ํ•ด hotspot ์„ click ํ•ด.
During the whole movie you can click this spot to leave immediately
์ด movie ์–ด๋””์—์„œ๋‚˜ ์ฆ‰์‹œ ๋– ๋‚˜๊ธฐ ์œ„ํ•ด ์ด spot ์„ click ํ•  ์ˆ˜ ์žˆ๋‹ค.
2. Tools and target
์ด๊ฒƒ๋„ ๋˜‘๊ฐ™์Œ
The tools for today are : Ollydebug andโ€ฆ your brain.
์˜ค๋Š˜ ๋„๊ตฌ๋“ค์€ Ollydebug ์™€ ๋„ˆ์˜ ๋‘๋‡Œ์•ผ.
The first can be obtained for free at
์ฒซ๋ฒˆ์งธ ๋ฌด๋ฃŒ๋กœ ์–ป์„ ์ˆ˜ ์žˆ๋‹ค.
http://www.ollydbg.de
Again, the second is your responsibility
๋‹ค์‹œ ํ•œ๋ฒˆ, ๋‘ ๋ฒˆ์งธ๋Š” ๋„ˆ์˜ ์ฑ…์ž„๊ฐ์ด๋‹ค.
Todays target is a program called Coffecup Visualsite Designer 3.0. It is a program to design
websites in the WYSIWYG system.
์˜ค๋Š˜ target program ์€ Coffeecup Visualsite Designer 3.0 ์œผ๋กœ ๋ถˆ๋ฆฐ๋‹ค. ๊ทธ๊ฒƒ์€ WYSIWYG
system ์—์„œ website ๋ฅผ design ํ•˜๊ธฐ ์œ„ํ•œ program ์ด๋‹ค.
I included the main exe and the needed dll's to run the program for your research
๋‚˜๋Š” main exe ๋ฅผ ์ฒจ๋ถ€ํ–ˆ๋‹ค. ๊ทธ๋ฆฌ๊ณ  ๋„ˆ์˜ ์—ฐ๊ตฌ๋ฅผ ์œ„ํ•ด program ์„ ์‹คํ–‰ํ•˜๊ธฐ ์œ„ํ•ด dll ์ด ํ•„์š”ํ•˜๋‹ค.
3. Behaviour of the program
Let's study that together.
Run the application in Olly.
ํ•จ๊ป˜ ๊ณต๋ถ€๋ฅผ ์‹œ์ž‘ํ•˜์ž.
Olly ์—์„œ application ์„ ์‹คํ–‰ ํ•ด.
First shows a nag screen saying that this is a trial version.
๋จผ์ €, nag scree ์€ trial version ๋ผ๋Š” ๊ฒƒ์„ ๋ณด์—ฌ์ฃพ๋‹ค.
Which asks us to buy now
ํ˜„์žฌ ์‚ฌ๊ฒ ๋ƒ๊ณ  ๋ฌป๋Š”๋‹ค.
And telling us that we can try this program 10 times (this is the first startup)
๊ทธ๋ฆฌ๊ณ  ์šฐ๋ฆฌ๊ฐ€ program ์„ 10 ํšŒ ์‹คํ–‰ํ•  ์ˆ˜ ์žˆ๋‹ค๊ณ  ๋งํ•œ๋‹ค.(์ œ์ผ ์ฒ˜์Œ์— ์‹คํ–‰ ๋์„ ๋•Œ)
I want to emphasize once again that all this also proves that at this point, the program must
already have made a check
๋‚˜๋Š” ์ด๊ฒƒ์„ ๋‹ค์‹œ ํ•œ ๋ฒˆ ๊ฐ•์กฐํ•˜๊ธฐ ์œ„ํ•ด ํ–ˆ๋‹ค. ๋˜ํ•œ point ๋ฅผ ์ฆ๋ช…ํ•œ๋‹ค. Program ์€ ์ด๋ฏธ check ๋ฅผ ํ–ˆ๋‹ค.
"Am I registered or not ?"
๋“ฑ๋ก๋๋ƒ? ์•ˆ๋๋ƒ?
If registered, this nag can't be shown !!!
๋งŠ์•ฝ์— ๋“ฑ๋ก ๋˜์—ˆ๋‹ค๋ฉด, nag ์€ ๋ณด์ด์ง€ ์•Š๋Š”๋‹ค.
INFO :
Keep your mouse pointer here and click whenever you are ready reading on each textscreen
Mouse pointer ๋ฅผ ์—ฌ๊ธฐ์— ์œ ์ง€ํ•ด. ๋„ค๊ฐ€ textscreen ์„ ์ฝ์—ˆ์„ ๋•Œ click ํ•ด.
For now, let's continue studying the program
์ด์ œ, program ์„ ๋ฐฐ์šฐ์ž.
Then comes some welcome message with wizard facilities. It is not important for us, so let's skip
this screen for next times.
ํ™–์˜ message ๊ฐ€ ๋งˆ๋ฒ•์ ์ธ ์„ค๋น„์™€ ํ•จ๊ป˜ ์˜จ๋‹ค. ๊ทธ๊ฒƒ์€ ์šฐ๋ฆฌ์—๊ฒŒ ์ค‘์š”ํ•˜์ง€ ์•Š๋‹ค, ๊ทธ๋ž˜์„œ ๋‹ค์Œ์—๋Š” ์ด
screen ์„ skip ํ•œ๋‹ค.
So now, we can see the program.
Let's also dig a little deeper.
์ด์ œ, ์šฐ๋ฆฌ๋Š” program ์„ ๋ณผ ์ˆ˜ ์žˆ๋‹ค.
์กฐ๊ธˆ ๊นŠ๊ฒŒ ๋“ค์–ด๊ฐ€์ž.
Although the website states the application was updated 2003, here it says 2000 โ€ฆ..
Website state ์—์„œ 2003 ๋…„๋„์— update ๋ผ๊ณ  ํ•˜๋Š”๋ฐ ์ด๊ณณ์€ 2000 ์ด๋ผ๊ณ  ๋งํ•œ๋‹ค.
Ok, I suppose we know enough?
Ok, ์šฐ๋ฆฌ๋Š” ์ถฉ๋ถ„ํžˆ ์•Œ์•˜๋‹ค๊ณ  ์ƒ๊ฐํ•˜์ง€?
Oops. Aha, there is also an ugly advertising screen as closing nag. It will be a nice feature to test
our reversing capabilities.
์›์Šค. ์•„ํ•˜, ๊ทธ๊ณณ์€ ๋˜ํ•œ closing nag ํ•  ๋•Œ ๋ชป ๋œ ๊ด‘๊ณ  screen ์ด ์žˆ๋‹ค. ์ด๊ฒƒ์€ ์šฐ๋ฆฌ์˜ reversing
๋Šฅ๋ ฅ์„ test ํ•˜๊ธฐ ์œ„ํ•œ ์ข‹์€ ํ˜„์ƒ์ด๋‹ค.
Fine, let's study all this better in the code.
์ข‹์•„, code ๋ฅผ study ํ•˜์ž.
So, restart the application until you โ€ฆ
โ€ฆ land here in Olly, at the EP of the program
๊ทธ๋ž˜์„œ, program ์˜ EP ์ธ ์—ฌ๊ธฐ์— ๋„์ฐฉํ•  ๋•Œ๊นŒ์ง€ application ์„ restart ํ•ด๋ผ.
4. Finding the patches
In this Part5, I will show you how to manually find the patches to make in an application.
์ด๋ฒˆ Part5 ๋Š”, ๋„ˆ์—๊ฒŒ application ์—์„œ ์–ด๋–ป๊ฒŒ ์ˆ˜๋™์œผ๋กœ patch ๋ฅผ ์ฐพ์•„์•ผ ํ•˜๋Š”์ง€ ๋ณด์—ฌ์ฃผ๊ฒ ๋‹ค.
Let's think that over first. If a program shows a behaviour that changes when registered or not,
then โ€ฆ there also must be changes in the code followed, right?
๋จผ์ € ์ƒ๊ฐํ•ด๋ด. ๋งŠ์•ฝ์— ๋“ฑ๋กํ–ˆ๊ฑฐ๋‚˜ ๋“ฑ๋กํ•˜์ง€ ์•Š์•˜์„ ๋•Œ program ์€ ๋ฐ”๋€ ํ–‰๋™์„ ๋ณด์—ฌ์ฃพ๋‹ค. ๋˜ํ•œ
code ์—์„œ ๋ฐ”๋€ ์ ์ด ์žˆ๋‹ค.
Other behaviour ==> other code followed !!
์šฐ๋ฆฌ์˜ ํ–‰๋™ ==> ์šฐ๋ฆฌ์˜ code ๋ฅผ ๋”ฐ๋ผ ๋‹ค๋‹Œ๋‹ค.
An example will make this more clear : the nags that are shown in this application, are only
shown when NOT registered.
์ด example ์€ ๋ช…ํ™•ํ•˜๊ฒŒ ๋งŠ๋“ ๋‹ค : ์˜ค์ง ๋“ฑ๋ก๋˜์ง€ ์•Š์•˜์„ ๋•Œ nags ๋Š” application ์—์„œ ๋‚˜ํƒ€๋‚œ๋‹ค.
So, there must be some conditional jumps somewhere as follows : (or similar, this is example)
Unregistered --> don't jump
Registered --> jump past nag
๊ทธ๋ž˜์„œ, ์•ฝ๊ฐ‚์˜ ์กฐ๊ฑด jump ๋Š” ์žˆ๋‹ค. ๋”ฐ๋ผ ๋‹ค๋‹ ๋•Œ ( ๋น„์Šทํ•˜๊ฑฐ๋‚˜, ์ด ์˜ˆ์ œ)
๋ฏธ๋“ฑ๋ก --> No jump
๋“ฑ๋ก --> nag ์„ jump
Now, if we can find these conditional jumps โ€ฆ
์ด์ œ, ์šฐ๋ฆฌ๋Š” ๋‹ค๋ฅธ ์กฐ๊ฑด jump ๋ฅผ ์ฐพ์„ ์ˆ˜ ์žˆ๋‹ค.
We also immediately find an indication for the registration scheme : just before the conditional
jump, there will be a compare to see if the program is already registered.
์šฐ๋ฆฌ๋Š” ๋˜ํ•œ ๋“ฑ๋ก๋œ scheme ์„ ์œ„ํ•ด ์ฆ‰์‹œ ์ง€์‹œ์ž๋ฅผ ์ฐพ์„ ์ˆ˜ ์žˆ๋‹ค. ๊ทธ๋Ÿฌ๊ณ ๋‚˜์„œ ์กฐ๊ฑด jump ํ•œ๋‹ค.
Program ์ด ์ด๋ฏธ ๋“ฑ๋ก๋˜์–ด ์žˆ๋‹ค๋ฉด ๊ทธ๊ฒƒ์€ ๋ณด๊ธฐ ์œ„ํ•ด ๋น„๊ต๋๋‹ค.
We need to find that !!
์šฐ๋ฆฌ๋Š” ๊ทธ๊ฒƒ์„ ์ฐพ๊ธฐ ์œ„ํ•ด ํ•„์š”ํ•˜๋‹ค.
Remark : when I say "conditional jump", I also include the variable jumps. A variable jump is for
example JMP eax+1C
์ฃผ๋ชฉ : "conditional jump"๋ฅผ ๋งํ•  ๋•Œ, ๋‚˜๋Š” ๋‹ค์–‘ํ•œ jump ๋ฅผ ํฌํ•จํ–ˆ๋‹ค. ๋ณ€์ˆ˜ jump ๋Š” ์ด example ์—์„œ
JMP EAX+1C ๋‹ค.
In this case, depending on a changing value for EAX if registered or not, it could jump the nag or
not.
๋“ฑ๋กํ•˜๊ฑฐ๋‚˜ ๋“ฑ๋กํ•˜์ง€ ์•Š์€ ๊ฒฝ์šธ, EAX ์˜ ๋ณ€ํ™”๋˜๋Š” ๊ฐ’์— ์˜์กด์ ์ด๋‹ค. ๊ทธ๊ฒƒ์€ nag ์„ jump ํ•  ์ˆ˜
์žˆ๊ฑฐ๋‚˜ ์—†๋‹ค.
Example : when not registered, EAX holds the value 00401354
์˜ˆ : ๋“ฑ๋ก๋˜์ง€ ์•Š์•˜์„ ๋•Œ, EAX ๋Š” 00401354 ๋ฅผ ์žก๊ณ  ์žˆ๋‹ค.
when registered, EAX holds the value 004013A0 which could jump past the nag.
Don't forget them in the future !!!
BTW, there are none here in this program.
๋“ฑ๋ก๋˜์—ˆ์„ ๋•Œ, EAX ๋Š” 004013A0 ๋ฅผ ์žก๊ณ  ์žˆ๋‹ค. ๊ทธ๊ฒƒ์€ past nag ์„ jump ํ•  ์ˆ˜ ์žˆ๋‹ค.
๊ทธ๊ฒƒ์„ ๋ฏธ๋ž˜์—๋„ ์žŠ์ง€๋งˆ !!!
By the way, ๊ทธ๊ฒƒ์€ ์ด program ์— ์—†๋‹ค.
What have we done so far? We studied the behaviour from the program, but I have also already
restarted the program in Olly and done some work
์šฐ๋ฆฌ๋Š” ์ง€๊ธˆ๊นŒ์ง€ ๋ฌด์—‡์„ ํ–ˆ๋‚˜? ์šฐ๋ฆฌ๋Š” program ์œผ๋กœ๋ถ€ํ„ฐ behaviour ๋ฅผ ๋ฐฐ์› ๋‹ค. ๊ทธ๋Ÿฌ๋‚˜ ๋‚˜๋Š” ์ด๋ฏธ
program ์„ restart ํ–ˆ๋‹ค. ๊ทธ๋ฆฌ๊ณ  ์•ฝ๊ฐ‚์˜ ์ผ์„ ๋๋ƒˆ๋‹ค.
: I also stepped the app completely, starting at the EP and stepping F8 and F7 "Through" the first
nag, "through" the main program and through the closing nag, Exactly like I will do once more
now.
๋‚˜๋Š” app ์„ ์™„๋ฒฝํžˆ step ํ–ˆ๋‹ค. EP ์—์„œ ์‹œ์ž‘ํ•˜๋Š” ๊ฒƒ๊ณผ F8 ์„ ๋ˆŒ๋Ÿฌ stepping ํ•˜๊ณ  F7 ์„ ๋ˆŒ๋Ÿฌ ์ฒซ๋ฒˆ์งธ
nag ์„ ํ†ต๊ณผํ•˜์—ฌ, main program ์„ ํ†ต๊ณผํ•˜๊ณ  closing nag ์„ ํ†ต๊ณผํ•œ๋‹ค. ์ •ํ™•ํžˆ ๋‚˜๋Š” ํ•œ ๋ฒˆ ๋” ํ•˜๋Š”
๊ฒƒ์ด๋‹ค.
But I have removed it from this movie to reduce its size and to skip repetitive tasks.
๋‚˜๋Š” ์ด movie ์—์„œ size ๋ฅผ ์ฃฟ์ด๊ณ  ๋ฐ˜๋ณต์ ์ธ ์ž„๋ฌด๋ฅผ ์‚ญ์ œํ–ˆ๋‹ค.
Important : I have studied all conditional jumps (+ variable) and noted down if they jump or
not !!!!
์ค‘์š” : ๋‚˜๋Š” ๋ชจ๋“  ์กฐ๊ฑด jump ๋ฅผ ๊ณต๋ถ€ํ–ˆ๋‹ค. ๊ทธ๋ฆฌ๊ณ  ๊ทธ๊ฒƒ์ด jump ํ•˜๋Š”์ง€ ์•ˆ ํ•˜๋Š”์ง€ ์ ์—ˆ๋‹ค.
That way, I can detect where the code chooses another path because meanwhile โ€ฆ I have also
expired the program by using all 10 available trials !!!
๊ทธ ๋ฐฉ๋ฒ•์€, ๋‹ค๋ฅธ ๊ฒฝ๋กœ๋ฅผ ์„ ํƒํ•˜๋Š” code ๋ฅผ ๋ฐœ๊ฒฌํ•  ์ˆ˜ ์žˆ๋‹ค. program ์ด 10 ๋ฒˆ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋Š” ์ œํ•œ์—
์˜ํ•ด ์ข…๋ฃŒ๋๋‹ค.
Conclusion : if I find the jumps where the code path changes, then I will easily have found a way
to register the program !!!
๊ฒฐ๋กž : ๋‚ด๊ฐ€ ๊ฒฝ๋กœ๋ฅผ ๋ฐ”๊ฟ€ ์ˆ˜ ์žˆ๋Š” jump ๋ฅผ ์ฐพ๋Š”๋‹ค๋ฉด, ๋‚˜๋Š” ๋งค์šฐ ์‰ฝ๊ฒŒ ๋“ฑ๋กํ•œ program ์„ ์ฐพ๋Š”๋‹ค.
Well, let's do that, but first, this is also an ideal opportunity to explain another nice feature of
Olly : animate over/in (Ctrl + F8 / F7)
์ข‹์•„, ์‹œ์ž‘ํ•˜์ž, ๋จผ์ € ์ด๊ฒƒ์€ Olly ์—์„œ ๋‹ค๋ฅธ ์ข‹์€ ํŠน์ง•๋“ค์„ ์„ค๋ช…ํ•˜๊ธฐ ์œ„ํ•œ ์ด์ƒ์ ์ธ ๊ธฐํšŒ๋‹ค. Animate
over/in (Ctrl + F8/F7)
To reduce the size of this movie, I won't show it here, but you : go ahead, and press CTRL+F8
(animate over) and look at what happens.
Movie ์˜ size ๋ฅผ ์ฃฟ์ด๊ธฐ ์œ„ํ•ด, ๋‚˜๋Š” ์—ฌ๊ธฐ์—์„œ ๋ณด์—ฌ์ฃผ์ง€ ์•Š๋Š”๋‹ค, ๊ทธ๋Ÿฌ๋‚˜ ๋„ˆ๋Š” ํ•ด๋ด. Ctrl + F8(animate
over)์„ ๋ˆ„๋ฅด๊ณ  ์–ด๋–ค ์ผ์ด ์ผ์–ด๋‚˜๋Š”์ง€ ๋ด
Some of my stuff from today is based upon it and I will come back later on this. It is also
important that you can see once how code is executed.
์˜ค๋Š˜๋‚  ์•ฝ๊ฐ‚์˜ ๋‚ด ์žฌ๋ฃŒ๋“ค์€ ๊ธฐ๋ณธ์ด๋‹ค. ๊ทธ๋ฆฌ๊ณ  ๋‚˜๋Š” ๋‹ค์Œ์— ๋Œ์•„์˜จ๋‹ค. ์ด๊ฒƒ์€ ๋˜ํ•œ Code ๊ฐ€ ์–ด๋–ป๊ฒŒ
์‹คํ–‰๋˜๋Š”์ง€ ๋ณด๋Š” ๊ฒŒ ์ค‘์š”ํ•˜๋‹ค.
Remark : I will already tell you that a more advanced feature for this is TC (trace call == run trace),
where you can log and set conditions. But we will discuss that feature in another part of this
series.
์ฃผ๋ชฉ : ๋‚˜๋Š” ์ด๋ฏธ ๋„ˆ์—๊ฒŒ TC ๋ฅผ ์œ„ํ•ด ๋ง‹์€ ์ง‚ํ™”๋œ ์‚ฌ์‹ค๋“ค์„ ๋งํ–ˆ๋‹ค.(trace call == ์ถ”์  ์‹คํ–‰) ๊ทธ๊ณณ์€
log ๋ฅผ ๋‚จ๊ธฐ๊ณ  condition ์„ set ํ•  ์ˆ˜ ์žˆ๋‹ค. ๊ทธ๋Ÿฌ๋‚˜ ์šฐ๋ฆฌ๋Š” series ์˜ ๋‹ค๋ฅธ part ์—์„œ feature ๋ฅผ
์˜๋…ผํ•œ๋‹ค.
Ok. Have you seen it?
Now, to stop animating, you can always press F12 or click the pause button.
์ง€๊ธˆ๊นŒ์ง€ ๋ณธ ์  ์žˆ์–ด?
์ด์ œ, animating ์„ ๋ฉˆ์ถœ๊ป˜. ๋„ˆ๋Š” ํ•ญ์ƒ F12 ๋ฅผ ๋ˆ„๋ฅด๊ฑฐ๋‚˜ pause button ์„ click ํ•˜๋ฉด ๋ผ.
Ok, restart and come back here to EP. I'm still at the EP of the soft. See me step F8, but I will stop
my stepping when necessary to show you some important stuff.
Ok, ์žฌ์‹œ์ž‘ํ•˜๊ณ  EP ๋กœ ๋Œ์•„์˜ค์ž. ๋‚˜๋Š” ๊ณ„์† EP ์— ์žˆ์„๊ฑฐ์•ผ. F8 ๋ˆŒ๋Ÿฌ, ์ค‘์š”ํ•œ ์žฌ๋ฃŒ๋ฅผ ๋ณด์—ฌ์ฃผ๊ณ 
ํ•„์š”ํ•˜๋‹ค๊ณ  ๋Š๊ปด์งˆ ๋•Œ ๋‚˜์˜ stepping ์„ stop ํ• ๊ฑฐ์•ผ.
Let's finally start exploring F8
๋งˆ์ง€๋ง‰์œผ๋กœ F8 ๋กœ ํƒํ—˜์„ ์‹œ์ž‘ํ•˜์ž.
Meanwhile, I will come at an example I like to show to you โ€ฆ.
๋‚˜๋Š” example ์„ ๋ณด์—ฌ์ฃฟ ๊ฒƒ์ด๋‹ค.
...see the JNZ here
JNZ ๊ฐ€ ์ด๊ณณ์ธ ๊ฑธ ๋ด.
Well, in my first round of stepping the code F8 and this movie, I already studied this conditional
jump and have noted down that the jump was taken by writing a "V" in the comment line.
์ข‹์•„, ์ฒซ๋ฒˆ์งธ๋กœ code F8 ์„ ๋ˆŒ๋Ÿฌ stepping ํ•  ์ˆ˜ ์žˆ๋‹ค. ๋‚˜๋Š” ์ด๋ฏธ ์กฐ๊ฑด jump ๋ฅผ ๊ณต๋ถ€ํ–ˆ๋‹ค. Comment
line ์— Jump ๋˜๋Š” ๊ณณ์€ V ๋กœ ์ ์—ˆ๋‹ค.
So : V means the jump was taken when the program was still registered for x trials.
๊ทธ๋ž˜์„œ : V ๋Š” Program ์ด x trial ์„ ์œ„ํ•ด ๋“ฑ๋ก ๋์„ ๋•Œ jump ๋ฅผ ํ–ˆ๋‹ค.
No change : we will also jump now that I'm out of trials. It makes this jump unimportant. Now do
the complete program like this until changes are found.
์•ˆ ๋ฐ”๋€ ์  : ์šฐ๋ฆฌ๋Š” ์ด์ œ jump ํ•  ์ˆ˜ ์žˆ๋‹ค. Trial ์—์„œ ๋‚˜๊ฐ‚๋‹ค. ๊ทธ๊ฒƒ์€ jump ๊ฐ€ ์ค‘์š”ํ•˜์ง€ ์•Š๋‹ค. ์ด์ œ
๋ฐ”๋€ ์ ์„ ์ฐพ์„ ๋•Œ๊นŒ์ง€ ์™„๋ฒฝํ•œ program ์ด๋‹ค.
Let's continueโ€ฆ
Now, scroll up
๊ณ„์†ํ•˜์ž.
์ด์ œ, ์Šคํฌ๋กŸ ์˜ฌ๋ ค
Didn't jump when "registered" for x trials
Doesn't jump either now,
so, no change and we continue
๋“ฑ๋ก ๋˜์—ˆ์„ ๋•Œ jump ํ•˜์ง€ ์•Š๋Š”๋‹ค.
์–ด๋Š ๊ฒƒ ํ•˜๋‚˜ jump ํ•˜์ง€ ์•Š๋Š”๋‹ค.
๊ทธ๋ž˜์„œ ๋ฐ”๊พธ์ง€ ์•Š๋Š”๋‹ค. ๊ทธ๋ฆฌ๊ณ  ์šฐ๋ฆฌ๋Š” ๊ณ„์†ํ•œ๋‹ค.
...and get in a loop with cond jumps.
Loop ๋ฅผ ์กฐ๊ฑด jump ์™€ ํ•จ๊ป˜ ๋“ค์–ด๊ฐ‚๋‹ค.
Well, a loop is first studied, we see that the loop is only going to read an unimportant "location"
string
Loop ์ œ์ผ ๋จผ์ € ๋ฐฐ์šด๋‹ค.
loop ๊ฐ€ ์˜ค์ง ์ค‘์š”ํ•˜์ง€ ์•Š์€ "location" string ์„ ์ฝ๊ธฐ ์œ„ํ•ด ๋ˆ๋‹ค.
So, it's unimportant. That's also why I haven't made any V or X comments here. Else, we must
count the number of loops taken.
๊ทธ๋ž˜์„œ, ์ด๊ฒƒ์€ ์ค‘์š”ํ•˜์ง€ ์•Š๋‹ค. ๊ทธ๊ฒƒ์€ ๋˜ํ•œ ์—ฌ๊ธฐ์— ์–ด๋– ํ•œ V ๋‚˜ X ๋ฅผ ๋งŠ๋“ค์ง€ ๋ชปํ–ˆ๋‹ค. ์šฐ๋ฆฌ๋Š” loop
์–ผ๋งˆ๋‚˜ ๋„๋Š”์ง€ ํšŸ์ˆ˜๋ฅผ ์„ผ๋‹ค.
...and get in a loop with cond jumps.
๊ทธ๋ฆฌ๊ณ  ์šฐ๋ฆฌ๋Š” cond jump ์™€ ํ•จ๊ป˜ loop ๋ฅผ ๋ˆ๋‹ค.
Also notice that this is the place where we will jump to leave the loop
๋˜ํ•œ ์žฅ์†Œ๋ผ๋Š” ๊ฒƒ์„ ์•Œ๋ฆฐ๋‹ค. ๊ทธ ์žฅ์†Œ์—์„œ loop ๋ฅผ ๋– ๋‚˜๊ธฐ ์œ„ํ•ด jump ํ•œ๋‹ค.
So, we can safely put a BP there
๊ทธ๋ž˜์„œ ์šฐ๋ฆฌ๋Š” ์•ˆ์ ‚ํ•˜๊ฒŒ ์ด๊ณณ์— BP ๋ฅผ ๋„ฃ๋Š”๋‹ค.
And now, press F9 to run the loop
This way, we don't have to trace rounds like a squirrel in a wheel.
Yep, we remove the BP
๊ทธ๋ฆฌ๊ณ  ์ด์ œ, loop ๋ฅผ ์‹คํ–‰ํ•˜๊ธฐ ์œ„ํ•ด F9 ๋ฅผ ๋ˆŒ๋Ÿฌ.
์ด ๋ฐฉ๋ฒ•์€, ์ถ”์ ํ•˜๊ธฐ ์œ„ํ•ด ๋‹ค๋žŒ์ฅ ๋งˆ๋ƒฅ ์ณ‡๋ฐ”ํ€ด๋ฅผ ๋Œ์ง€ ์•Š๋Š”๋‹ค.
์˜ˆ, BP ๋ฅผ ์‚ญ์ œํ•ด.
Notice that this step doesn't bring any changes either
์•Œ๋ฆฐ๋‹ค. ์ด step ์—์„œ๋Š” ๋ฐ”๋€ ์–ด๋–ค ๊ฒƒ๋„ ๊ฐ€์ ธ์˜ค์ง€ ์•Š๋Š”๋‹ค.
BTW, making changes in the comment line is done by doubleclicking the comment line.
By the way, ์ฃผ์„ ๋ผ์ธ์˜ ๋ณ€ํ™”๋ฅผ ๋งŠ๋“œ๋Š” ๊ฒƒ์€ comment line ์„ doubleclick ์„ ํ•˜๋ฉด ๋œ๋‹ค.
Normally, I write these down on a piece of paper (old school huh). But for your convenience, I've
done it in the comment line this time, so that you can follow it all easily. See how to do it โ€ฆ
๋ณดํ†ต, ๊ทธ๊ฒƒ๋“ค์„ ์ข…์ด ์œ„์— ์ ๋Š”๋‹ค. (์˜ˆ์ ‚ ๋ฐฉ์‹ ํ›„..) ๊ทธ๋Ÿฌ๋‚˜ ๋„ˆ์˜ ํŽธ๋ฆฌํ•จ์„ ์œ„ํ•ด, ๋‚ด๊ฐ€ ์ด๋ฏธ comment
line ์— ํ•ด๋†จ๋‹ค. ๊ทธ๋ž˜์„œ ๋„ˆ๋Š” ์‰ฝ๊ฒŒ ๋”ฐ๋ผ๊ฐˆ ์ˆ˜ ์žˆ๋‹ค. ์–ด๋–ป๊ฒŒ ํ•˜๋Š”์ง€ ๋ด.
:)
BTW, when stepping a call F8 and the nag appears, you have to BP the call and restart the app.
By the way, ์šฐ๋ฆฌ๊ฐ€ call ์„ F8 ๋กœ ๋„˜๊ธฐ๊ณ  nag ์ด ๋‚˜ํƒ€๋‚  ๋•Œ, ๋„ˆ๋Š” ๊ทธ call ์— BP ๋ฅผ ๊ฑธ๊ณ  app ์„ ์žฌ์‹œ์ž‘
ํ•ด.
Then run till BP to step F7 in the call and continue F8 to dig deeper and deeper till you finally
find where exactly the window (for nag or program) is created.
BP ๊นŒ์ง€ ์‹คํ–‰ํ•˜๊ณ  F7 ๋กœ call ์•ˆ์œผ๋กœ ๋“ค์–ด๊ฐ€ ๊ทธ๋ฆฌ๊ณ  F8 ๋กœ ๊นŠ๊ฒŒ ํŒŒ๊ณ ๋“ค์–ด ๊ทธ๋ฆฌ๊ณ  ๋งˆ์ง€๋ง‰์œผ๋กœ ์ •ํ™•ํžˆ
์œˆ๋„์šฐ๊ฐ€(nag ์ด๋‚˜ program) ๋งŠ๋“ค์–ด์ง‚ ๊ณณ์„ ์ฐพ์•„๋ผ.
Remark : if a change would take place deep in a call for example, we would also notice changes
in program behaviour here. For example by an apparition of another nag.
์ฃผ๋ชฉ : ๋งŠ์•ฝ์— ๋ณ€ํ™”๊ฐ€ ์ด ์˜ˆ์ œ์—์„œ์ฒ˜๋Ÿผ ๊นŠ๋‹ค๋ฉด, ์šฐ๋ฆฌ๋Š” ๋˜ํ•œ program behaviour ๊ฐ€ ๋ฐ”๋€ ๊ฒƒ์„ ๋Š๋‚€๋‹ค.
์ด ์˜ˆ์ œ์—์„œ์ฒ˜๋Ÿผ ๋‹ค๋ฅธ nag ์˜ ์œ ๋ น๊ฐ™์ด.
We would always easily find the change in the code.
์šฐ๋ฆฌ๋Š” ํ•ญ์ƒ code ์—์„œ ์‰ฝ๊ฒŒ ๋ณ€ํ™”๋ฅผ ์ฐพ์„ ์ˆ˜ ์žˆ๋‹ค.
So again, continue stepping F8 and keep looking for changes in the jumps.
๊ทธ๋ž˜์„œ ๊ณ„์† F8 ์„ ๋ˆŒ๋Ÿฌ. ๊ทธ๋ฆฌ๊ณ  jump ์—์„œ ๋ณ€ํ™”๋œ ์ ์„ ์ฃผ์˜ ๊นŠ๊ฒŒ ๋ด.
Scroll up
์Šคํฌ๋กŸ ์˜ฌ๋ ค
OK
The first time I stepped this code F8 โ€ฆ
์ฒซ๋ฒˆ์งธ๋กœ code ๋ฅผ ๋„˜๊ธฐ๊ธฐ ์œ„ํ•ด F8 ์„ ๋ˆŒ๋Ÿฌ.
I noticed that the nag showed up when stepping this call F8
Call ์„ F8 ๋กœ ๋„˜๊ธธ ๋•Œ, nag ์ด ๋‚˜ํƒ€๋‚˜๋Š” ๊ฒƒ์„ ๋Š๋‚€๋‹ค.
So, now I know that I have to step IN the call F7
๊ทธ๋ž˜์„œ, ๋‚˜๋Š” call ์—์„œ step ์„ ๋„˜๊ธฐ๊ธฐ ์œ„ํ•ด F7 ์„ ๋ˆŒ๋Ÿฌ์•ผ ํ•œ๋‹ค.
To find where the nag is created.
Nag ์ด ๋งŠ๋“ค์–ด์ง€๋Š” ๊ณณ์„ ์ฐพ์•„๋ผ.
On this line, press F7 and remember that this is the very first call where the nag is shown
์ด line ์—์„œ, F7 ์„ ๋ˆ„๋ฅด๊ณ  nag ์ด ๋‚˜ํƒ€๋‚˜๋Š” ์ฒซ๋ฒˆ์งธ call ์ด๋ผ๋Š” ๊ฒƒ์„ ๊ธฐ์–ตํ•ด๋ผ.
To land here in the call. Same here โ€ฆ
Because again, the nag showed here, โ€ฆ
And so now, press
F7 to step in the call
Call ์•ˆ์˜ ์ด๊ณณ์— ๋„์ฐฉํ–ˆ๋‹ค. ๋˜‘๊ฐ™์€ ์œ„์น˜๋‹ค.
์™œ๋ƒํ•˜๋ฉด ๋‹ค์‹œ, nag ์ด ๋‚˜ํƒ€๋‚œ๋‹ค.
๊ทธ๋ฆฌ๊ณ  F7 ์„ ๋ˆŒ๋Ÿฌ call ์•ˆ์œผ๋กœ ๋“ค์–ด๊ฐ€๋ผ.
To land here. Notice that we will jump to a โ€ฆ
windows dll(system dll)
์—ฌ๊ธฐ์— ๋„์ฐฉํ•œ๋‹ค. ์šฐ๋ฆฌ๊ฐ€ windows dll ๋กœ(system dll) jump ํ•˜๋Š” ๊ฑธ ์ธ์‹ํ•œ๋‹ค.
"What now?" you probably ask. Well, we need to know "Is the nag created here ?" or is this only
"passing through" ?
"๋ญ์•ผ?" ๋„ˆ๋Š” ์•„๋งˆ ๋ฌผ์„ ๊ฑฐ์•ผ. ์ข‹์•„, ์šฐ๋ฆฌ๋Š” "์–ด๋””์—์„œ nag ์ด ์ƒ์„ฑ๋˜๋Š”์ง€" ์•Œ๊ธฐ ์œ„ํ•˜๊ฑฐ๋‚˜ "ํ†ต๊ณผ"๊ฐ€
ํ•„์š”ํ•˜๋‹ค.
We can find the answer in different ways because there is no need to verify the jumps in a
windows dll : they always stay the same.
์šฐ๋ฆฌ๋Š” ๋‹ค๋ฅธ ๋ฐฉ๋ฒ•์œผ๋กœ answer ๋ฅผ ์ฐพ์•˜๋‹ค. ์™œ๋ƒํ•˜๋ฉด ๊ทธ๊ณณ์€ windows dll ์—์„œ jump ๋ฅผ ๊ฒ€์ฆํ•˜๊ธฐ ์œ„ํ•ด
ํ•„์š”์—†๋‹ค. : ๊ทธ๋“ค์€ ํ•ญ์ƒ ๊ฐ™์€ ์ž๋ฆฌ์— ๋จธ๋ฌผ๋Ÿฌ ์žˆ์œผ๋‹ˆ๊นŒ.
Remark : but you do need to verify them in application specific dll's of course !!!!!
์ฃผ๋ชฉ : ๋„ค๊ฐ€ ๊ทธ๊ฒƒ๋“ค์„ ์ด application ์—์„œ ๊ฒ€์ฆํ•˜๊ธฐ ์œ„ํ•ด ํŠน์ • dll ์ด ํ•„์š”ํ•˜๋‹ค
Different ways to verify are for example placing a memory BP on code section.
๊ฒ€์ฆํ•˜๊ธฐ ์œ„ํ•œ ๋‹ค๋ฅธ ๋ฐฉ๋ฒ•์€ ์ด example ์ฒ˜๋Ÿผ Code section ์˜ memory BP ์— ๋†“์—ฌ์žˆ๋‹ค.
I will discuss that later in another Part.
๋‚˜๋Š” ๋‚˜์ค‘์— ๋‹ค๋ฅธ part ์—์„œ ์˜๋…ผํ•  ๊ฒƒ์ด๋‹ค.
This time, I want to use hardware BP's (HW BP's). But I will need to give you two words of
explanation first
์ด๋ฒˆ ์‹œ๊ฐ‚์—๋Š”, hardware BP's ๋ฅผ ์‚ฌ์šฉํ•˜๊ธฐ ์›ํ•œ๋‹ค.(HW BP's). ๋จผ์ € 2 ๊ฐ€์ง€ ์„ค๋ช…์„ ํ•˜๊ฒ ๋‹ค.
Basically, there are 2 kinds of breakpoints we can set : software breakpoints and hardware
breakpoints.
๊ธฐ๋ณธ์ ์œผ๋กœ, 2 ๊ฐ€์ง€ breakpoint ๋ฅผ set ํ•  ์ˆ˜ ์žˆ๋‹ค. : software breakpoints and hardware breakpoints
You could suspect a third one, the memory breakpoints, but see these as special software BP's
that can be set on the memory Olly has of a process(program).
๋„ˆ๋Š” ์„ธ๋ฒˆ์งธ Memory breakpoints ์˜์‹ฌ์Šค๋Ÿฝ๋‹ค. ์ด๊ฒƒ๋“ค์„ ๋ด๋ผ. Special software BP's ๊ฐ€
memory ์—์„œ set ๋์„ ๋•Œ Olly ๋Š” process ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค.
You can only set one mem BP at a time.
๋„ˆ๋Š” ์˜ค์ง mem ์— BP ๋ฅผ set ํ•  ์ˆ˜ ์žˆ๋‹ค.
If you set another one, the first is removed! To set this breakpoint, OllyDbg needs to alter the
attributes of the memory block containing the selection (in chunks of 4096 bytes).
๋งŠ์•ฝ์— ๋„ค๊ฐ€ ๋‹ค๋ฅธ ๊ฒƒ์„ set ํ•œ๋‹ค๋ฉด, ์ฒซ๋ฒˆ์งธ ๊ฒƒ์€ ์ œ๊ฑฐ๋œ๋‹ค. Breakpoints ๋ฅผ set ํ•˜๊ธฐ ์œ„ํ•ด์„œ,
OllyDbg ๋Š” memory block ์ด ํฌํ•จํ•˜๊ณ  ์žˆ๋Š” ๋ฒ”์œ„์˜ ์†์„ฑ์ด ๋ณ€ํ•˜๋Š” ๊ฒŒ ํ•„์š”ํ•˜๋‹ค.(4096 bytes ๋‹จ์œ„)
Memory breakpointing just one single byte will force Olly to "guard" the whole block.
Memory breakpointing ์„ single byte ๋งŠ ํ•˜๋ฉด, Olly ๊ฐ€ ์ ‚์ฒด block ์„ "๋ณดํ˜ธ" ํ•  ๊ฒƒ์ž…๋‹ˆ๋‹ค.
It is clear that this will result in a lot of false breaks.
์ด๊ฒƒ์€ ๋ช…ํ™•ํ•˜๋‹ค. ๊ฝค ๋ง‹์€ false break ์ด ๋ฐœ์ƒํ•  ๊ฒƒ์ด๋‹ค.
Memory BP's substantially lower Olly's speed of processing because Olly constantly also needs to
verify the memory he has about the process.
Memory BP's Olly ์˜ processing speed ๋Š” ์ƒ๋‹นํžˆ ๋‚ฎ๋‹ค. ์™œ๋ƒํ•˜๋ฉด Olly ๋Š” ๋Š์ž„์—†์ด memory ๊ฒ€์ฆ์ด
ํ•„์š”ํ•˜๋‹ค. Olly ๋Š” ๊ทธ๋Ÿฐ process ๋ฅผ ๊ฐ€์ง€๊ณ  ์žˆ๋‹ค.
I already briefly mentioned the standard software breakpoint in a previous part. In Olly, you can
set these by pressing F2 on the line or by doubleclicking the opcodes.
๋‚˜๋Š” ์ด๋ฏธ ์ ‚ Part ์—์„œ Standard software breakpoint ๋ฅผ ๊ฐ‚๋‹จํžˆ ์–ถ๊ธ‰ํ–ˆ๋‹ค. Olly ์—์„œ F2 ๋ฅผ ๋ˆ„๋ฅด๊ฑฐ๋‚˜
doubleclick ์œผ๋กœ set ํ•  ์ˆ˜ ์žˆ๋‹ค.
Remember that a software BP is set by the debugger (Olly) who needs to "rewrite" the code to
place a INT3 instruction (==Trap to Debugger) (== CC opcode) in front of the command.
๊ธฐ์–ตํ•ด๋ผ. Software BP ๋Š” Debugger ์— ์˜ํ•ด set ๋๋‹ค. Code ์— "rewrite" ํ•˜๊ธฐ ์œ„ํ•ด INT3
instruction ์„ ๋†“๊ธฐ ์œ„ํ•ด ํ•„์š”ํ•˜๋‹ค.
Without wanting to jump too deep into it : when such a INT3 instruction is encountered, the
handler gets control about what's up next. Hehe, and there comes Olly in the game :)
๊นŠ๊ฒŒ jump ํ•˜๊ธฐ๋ฅผ ์›์น˜ ์•Š๋Š”๋‹ค๋ฉด : IN3 instruction ๊ณผ ๋งˆ์ฃผ์น  ๋•Œ, handler ๋Š” ๋‹ค์Œ ๊ฒƒ์„ control
ํ•˜๊ธฐ๋ฅผ ์›ํ•œ๋‹ค. ํ—คํ—ค, Olly ๊ฐ€ ์˜จ๋‹ค.
Hardware BP's however are completely different. These are originated in their respective debug
registers who can each hold one breakpoint address, directly in the CPU.
Hardware BP ๋Š” ์™„๋ฒฝํžˆ ๋‹ค๋ฅด๋‹ค. ๊ฐ์ž์˜ debug register ์—์„œ CPU ์— ์ง์ ‘์ ์œผ๋กœ breakpoint
address ๋ฅผ ์žก๊ณ  ์žˆ๋Š” ๊ฒƒ์—์„œ ๋น„๋กฏ๋๋‹ค.
You understand already there must be 4 debug registers because there are 4 HW BP's possible.
๋„ˆ๋Š” ์ด๋ฏธ 4 debug register ๋ฅผ ์ดํ•ดํ•˜๊ณ  ์žˆ์„ ๊ฒƒ์ด๋‹ค. ์™œ๋ƒํ•˜๋ฉด 4 HW BP ๋Š” ๊ฐ€๋Šฅ์„ฑ์ด ์žˆ๋‹ค.
Again, without wanting to dig deeper into this : when such a BP is encountered, the CPU
generates a INT1 exception which is then given to the exception handlerโ€ฆ and that is Olly in our
case :)
๋‹ค์‹œ ํ•œ๋ฒˆ ๋งํ•˜์ž๋ฉด, ๊นŠ๊ฒŒ jump ๋ฅผ ํ•˜๊ณ  ์‹ถ์ง€ ์•Š๋‹ค๋ฉด ; BP ๋Š” ๋งˆ์ฃผ์น  ๋•Œ, CPU ๋Š” INT1 ์˜ˆ์™ธ๋ฅผ
์ƒ์‚ฐํ•ด๋‚ธ๋‹ค. INT1 exception ์€ ๊ทธ๋ฆฌ๊ณ  ์ด case ์—์„œ์ฒ˜๋Ÿผ Olly ์—๊ฒŒ exception handler ์„ ์ฃพ๋‹ค.
BTW, HW BP's are not available under win95/98
By the way, HW BP's ๋Š” win95/98 ์•„๋ž˜ ๋ฒ„์ ‚์€ ๊ฐ€๋Šฅํ•˜์ง€ ์•Š๋‹ค.
Your next questions is undoubtedly :
๋„ˆ์˜ ๋‹ค์Œ ์งˆ๋ฌธ์€ ํ™•์‹คํ•˜๋‹ค.
"And how to know which kind of BP to use?" In fact, it is not difficult.
๊ทธ๋ž˜์„œ ์–ด๋–ป๊ฒŒ ์‚ฌ์šฉํ•  ๋•Œ ๋‹ค๋ฅธ๊ฐ€?" ์‚ฌ์‹ค, ์ด๊ฒƒ์€ ์–ด๋ ค์šด ๊ฒƒ์ด ์•„๋‹ˆ๋‹ค.
They each have their own restrictions in use. The INT3 BP's (software BP's) for example can
basically only be set on commands in the CPU window.
๊ฐ์ž ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋Š” ๋ฒ”์œ„์˜ ์ œ์•ฝ์ด ์žˆ๋‹ค. ์ด ์˜ˆ์ œ์—์„œ์ฒ˜๋Ÿผ INT3 BP ๋Š” ๊ธฐ๋ณธ์ ์œผ๋กœ ์˜ค์ง CPU
window ์—์„œ set ๋  ์ˆ˜ ์žˆ๋‹ค.
Also, they can't be set on data or in the middle of a command. In our specific case here, we will
use the HW BP's because INT3 BP's in windows dll's are not saved by Olly although there is a way
around this with the BP manager plugin or specific settings.
๋˜ํ•œ, ๊ทธ๋“ค์€ ๋ช…๋ น์˜ ์ค‘๊ฐ‚์—์„œ data ๋ฅผ set ํ•  ์ˆ˜ ์—†๋‹ค. ์ด๋Ÿฐ ๋ช…ํ™•ํ•œ ๊ฒฝ์šฐ์—, ์šฐ๋ฆฌ๋Š” HW BP ๋ฅผ ์‚ฌ์šฉํ• 
์ˆ˜ ์žˆ์„ ๊ฒƒ์ด๋‹ค. ์™œ๋ƒํ•˜๋ฉด INT3 BP's ๋Š” Olly ์— ์˜ํ•ด window dll's ์— ์ €์žฅ์ด ๋˜์ง€ ์•Š๋Š”๋‹ค. ๋‹ค๋ฅธ
๋ฐฉ๋ฒ•์œผ๋กœ BP manager plugin ์„ ์“ฐ๊ฑฐ๋‚˜ ๋ช…ํ™•ํ•œ setting ์„ ํ•œ๋‹ค.
It's clear that when restarting a program, the memory about it was deleted and so, obviously,
mem BP's can't be used here either. Some practice will quickly learn you what kind of breakpoint
to use in which circumstances.
์ด๊ฒƒ์€ ๋ช…ํ™•ํ•ฉ๋‹ˆ๋‹ค. ์šฐ๋ฆฌ๊ฐ€ program ์„ restart ํ•  ๋•Œ, memory ๋Š” ์‚ญ์ œ๋๋‹ค. ๊ทธ๋ฆฌ๊ณ  ์ •ํ™•ํžˆ, memory
BP ๋Š” ์‚ฌ์šฉ๋  ์ˆ˜ ์—†๋‹ค. ์•ฝ๊ฐ‚์˜ ์—ฐ์Šต์„ ํ•˜๋ฉด ์–ด๋–ค ์ข…๋ฅ˜์˜ breakpoint ๋ฅผ ์–ด๋–ค ์ƒํ™ฉ์—์„œ ์“ฐ๋Š”์ง€ ๋นจ๋ฆฌ
๋ฐฐ์šธ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
Now that you understand this, let me show you how to use the HW BP's in this MFC42.dll
because you need to understand indeed : the usual software BP's in windows dll's are not saved
by Olly.
์ด์ œ ์ด๊ฒƒ์„ ์ดํ•ดํ–ˆ์„ ๊ฒƒ์ด๋‹ค, ๋‚˜๋Š” ๋„ˆ์—๊ฒŒ MFC42.dll ์—์„œ HW BP ๋ฅผ ์–ด๋–ป๊ฒŒ ์‚ฌ์šฉํ•˜๋Š”์ง€ ๋ณด์—ฌ์ฃผ๊ฒ ๋‹ค.
์™œ๋ƒํ•˜๋ฉด ๋„ˆ๋Š” ์ •๋ง๋กœ ์ดํ•ดํ•˜๋Š” ๊ฒƒ์ด ํ•„์š”ํ•˜๋‹ค. : ๋ณดํ†ต software BP ๋Š” Olly ์— ์˜ํ•ด windows dll's
์—์„œ ์ €์žฅ๋˜์ง€ ์•Š๋Š”๋‹ค.
(I said already that you can circumvent this with the BP manager plugin or specific settings +
some other plugins). But first, let's continue stepping F8.
(๋‚˜๋Š” ์ด๋ฏธ ๋งํ–ˆ๋‹ค. ๋„ˆ๋Š” BP manger plug ์ด๋‚˜ ํŠน์ •ํ•œ setting + ๋‹ค๋ฅธ plugin) ํ”ผํ•ด๊ฐˆ ์ˆ˜ ์žˆ๋‹ค. ๊ทธ๋Ÿฌ๋‚˜
๋จผ์ €, F8 ์„ ๋ˆŒ๋Ÿฌ ๊ณ„์† ํ•˜๊ฒ ๋‹ค.
The program is running?
Program ์ด ์‹คํ–‰๋˜๊ณ  ์žˆ๋‹ˆ?
Aha, the startup nag is created.
์•„ํ•˜, startup nag ๋Š” ๋งŠ๋“ค์–ด์กŒ๋‹ค.
Now, we need to verify if this nag is generated here at this place in the windows dll or โ€ฆ. Or if we
need to dig deeper into this call to find the creation of the nag.
์ด์ œ, ์šฐ๋ฆฌ๋Š” ๊ฒ€์ฆํ•˜๋Š” ๊ฒƒ์ด ํ•„์š”ํ•˜๋‹ค. ๋งŠ์•ฝ์— ์ด nag ๊ฐ€ windows dll ์ด ๊ณณ์—์„œ ์ƒ์„ฑ๋๋‹ค๊ฑฐ๋‚˜ ์šฐ๋ฆฌ๋Š”
์ด call ์†์œผ๋กœ ๊นŠ๊ฒŒ ํŒŒ๊ณ ๋“ค์–ด nag ์„ ๋งŠ๋“œ๋Š” ๊ณณ์„ ์ฐพ๋Š” ๊ฒƒ์ด ํ•„์š”ํ•˜๋‹ค.
INFO:
A more advanced info is that this application is compiled with MFC support (MFC42.dll).
๋ง‹์€ ๋ฐœ์ ‚๋œ ์ •๋ณด๋Š” application ์ด MFC ์™€ ํ•จ๊ป˜ compile ๋๋‹ค.(MFC42.dll)
Hence, it's rather special but that's also why I have chosen this application: it makes things not so
clear as usual which is exactly what I was after
๊ทธ๋ฆฌํ•˜์—ฌ, ์ด๊ฒƒ์€ ๊ฝค special ํ•˜๋‹ค. ๊ทธ๋Ÿฌ๋‚˜ ์ด๊ฒƒ์€ ๋˜ํ•œ ๋‚˜๋Š” ์ด application ์„ ์„ ํƒํ–ˆ๋‹ค : things ๊ฐ€
์ผ๋ฐ˜์ ์ผ ๋•Œ ๋ช…ํ™•ํ•˜์ง€ ์•Š๋‹ค. ๊ทธ๊ฒƒ์€ ์ •ํ™•ํžˆ ์˜€๋‹ค.
(unless we would help Olly with the analysis by showing him the path to these import libs)
(์šฐ๋ฆฌ๊ฐ€ Import libs ๊ฒฝ๋กœ๋ฅผ ๋ณด์—ฌ์คŒ์œผ๋กœ์จ ๋ถ„์„ํ•˜๋Š” Olly ๋ฅผ ๋„์™€์ฃฟ ์ˆ˜ ์—†๋‹ค๋ฉด)
(Olly menu --> Debug --> Select import libraries --> show Olly the path)
(Olly menu --> Debug --> Select import libraries --> show Olly the path)
(these libs don't come with Olly, but can easily be found when googling for them).
์ด lib ๋“ค์€ Olly ์™€ ํ•จ๊ป˜ ์˜ค์ง€ ์•Š๋Š”๋‹ค. ๊ทธ๋Ÿฌ๋‚˜ ๊ตฌ๊ธ€๋ง์œผ๋กœ ๊ทธ๊ฒƒ๋“ค์„ ์‰ฝ๊ฒŒ ์ฐพ์„ ์ˆ˜ ์žˆ๋‹ค.
Once again though: I wanted to show the technique with as little info as possible for best
learning!
๋‹ค์‹œ ํ•œ ๋ฒˆ ๋งํ•œ๋‹ค : ๋‚˜๋Š” ๊ธฐ์ˆ ์ ์ธ ๋ถ€๋ถ„์„ ๊ฐ€๋Šฅํ•œ ์ตœ๊ณ ์˜ ๊ณต๋ถ€๊ฐ€ ๋  ์ˆ˜ ์žˆ๋„๋ก ์•ฝ๊ฐ‚์˜ ์ •๋ณด์™€ ํ•จ๊ป˜
๋ณด์—ฌ์ฃผ๊ฒ ๋‹ค.
Probably this sounds like rubbish, but follow along and it will all become clear :)
์•„๋งˆ ๋ฏธ์นœ๋†ˆ ๊ฐ™์€ ์†Œ๋ฆฌ์ผ ๊ฒƒ์ด๋‹ค, ๊ทธ๋Ÿฌ๋‚˜ ๋”ฐ๋ผ์™€. ๊ทธ๋Ÿฌ๋ฉด ๋ช…ํ™•ํ•ด ์งˆ ๊ฒƒ์ด๋‹ค.
What I first want to do, is come back here again, but instead of stepping F8 all the way, I'm
gonna place a HW BP on this call and immediately "run" till here :)
๋‚ด๊ฐ€ ๋จผ์ € ๋ฌด์—‡์„ ํ•ด์•ผ ๋ ๊นŒ, ์ด๊ณณ์— ๋Œ์•„์™”๋‹ค. ๊ทธ๋Ÿฌ๋‚˜ F8 ๋ˆ„๋ฅด๋Š” ๋ฐฉ๋ฒ• ๋Œ€์‹ž์—, ๋‚˜๋Š” ์ด call ์— HW ๋ฅผ
์„ค์น˜ํ•˜๊ฒ ๋‹ค. ๊ทธ๋ฆฌ๊ณ  ์ฆ‰์‹œ ์ด๊ณณ๊นŒ์ง€ ์‹คํ–‰ํ•ด.
Remark : I have already said there are easier ways to do this, but it is important that you know
the basics too. Now, rightclick on the call line
์ฃผ๋ชฉ : ๋‚˜๋Š” ์ด๋ฏธ ๋งํ–ˆ๋‹ค. ๊ทธ๊ณณ์€ ๋งค์šฐ ์‰ฌ์šด ๋ฐฉ๋ฒ•์ด๋‹ค. ๊ทธ๋Ÿฌ๋‚˜ ์ด๊ฒƒ์€ ๋งค์šฐ ๋„ˆ๋„ ์•Œ๋‹ค์‹œํ”ผ ๊ธฐ๋ณธ์ ์ธ
๊ฒƒ์ด ์ค‘์š”ํ•˜๋‹ค. ์ด์ œ, call line ์—์„œ rightclick ํ•ด.
Right. That's it !!!
Remember: stepping F8 and the nag appears means : put BP and restart + run + F7 in the call +
F8 again till nag appearsโ€ฆ
๊ธฐ์–ตํ•ด : F8 ๋กœ ๋„˜๊ธฐ๊ณ  nag ์€ ๋‚˜ํƒ€๋‚œ๋‹ค. : BP ๋ฅผ ์„ค์น˜ํ•˜๊ณ  restart + run + F7 ์„ ๋ˆŒ๋Ÿฌ call ์•ˆ์œผ๋กœ +
nag ์ด ๋‚˜ํƒ€๋‚  ๋•Œ๊นŒ์ง€ F8 ์„ ๊ณ„์† ๋ˆŒ๋Ÿฌ
...to dig deeper in the call in the same way, always deeper and deeper till the nag appears.
Call ์—์„œ ๊ฐ™์€ ๋ฐฉ๋ฒ•์œผ๋กœ ๊ณ„์† ํŒŒ๊ณ ๋“ค๋ฉด, ํ•ญ์ƒ ๊นŠ๊ฒŒ ๊ทธ๋ฆฌ๊ณ  ๋˜ ๊นŠ๊ฒŒ nag ์ด ๋‚˜ํƒ€๋‚  ๋•Œ๊นŒ์ง€ ํŒŒ๊ณ ๋“ค์–ด.
To reduce movie size, I have done this but I have removed it from the movie
Movie size ๋ฅผ ์ฃฟ์ด๊ธฐ ์œ„ํ•ด์„œ ์‚ญ์ œํ–ˆ๋‹ค. ๋‚˜๋Š” ์ด๋ฏธ ํ–ˆ์–ด. ๊ทธ๋Ÿฌ๋‚˜ movie ์—์„œ ์‚ญ์ œํ–ˆ๋‹ค.
And so, we land here again in the same call in
๊ทธ๋ž˜์„œ, ์šฐ๋ฆฌ๋Š” ๊ฐ™์€ call ์•ˆ์˜ ์ด๊ณณ์— ๋‹ค์‹œ ๋„์ฐฉํ–ˆ๋‹ค.
The HW BP
Hardware breakpoint 1 at MFC42.73D4CF71
โ€ฆ and so, we step F7 in the call.
๊ทธ๋ฆฌ๊ณ , ์šฐ๋ฆฌ๋Š” call ์•ˆ์œผ๋กœ ๋“ค์–ด๊ฐ€๊ธฐ ์œ„ํ•ด F7 ์„ ๋ˆŒ๋Ÿฌ.
INFO : remember :
F8 == stepping over, executing the complete call with all underlying code at once
F7 == step in the call, no code is executed yet
๊ธฐ์–ตํ•ด :
F8 == ๋„˜๊ธฐ๋Š” ๊ฒƒ, call ์„ ํ•œ๋ฒˆ์— ๊ทผ๋ณธ์ ์œผ๋กœ code ๋ฅผ ์™„๋ฒฝํžˆ ์‹คํ–‰ ํ•˜๋Š” ๊ฒƒ.
F7 == call ์•ˆ์œผ๋กœ ๋“ค์–ด๊ฐ€๊ธฐ, code ๋Š” ์•„์ง ์‹คํ–‰๋˜์ง€ ์•Š์•˜๋‹ค.
Bam !! To land again in the main exe.
Notice that it was indeed NOT where the nag is created
!! ์šฐ๋ฆฌ๋Š” ๋‹ค์‹œ main exe ์— ๋„์ฐฉํ–ˆ๋‹ค.
๊ทธ๊ณณ์€ nag ์„ ์ƒ์„ฑํ•˜์ง€ ์•Š๋Š”๋‹ค.
INFO:
If you are a coder, then this is clear and known beforehand: of course this wasn't where the nag
is created. For the non-coder, a little experience and API's will learn this
๋งŠ์•ฝ์— ๋„ค๊ฐ€ code ๋ผ๋ฉด, ์ด๊ฒƒ์€ ๋ช…ํ™•ํ•˜๋‹ค ๊ทธ๋ฆฌ๊ณ  ์‚ฌ์ ‚์— ์•Œ์•˜๋‹ค : ๋ฌผ๋กž ์ด๊ฒƒ์€ nag ์ด ๋งŠ๋“ค์–ด์ง€๋Š”
๊ณณ์ด ์•„๋‹ˆ๋‹ค. Noncoder ๋ผ๋ฉด, ์•ฝ๊ฐ‚์˜ ๊ฒฝํ—˜๊ณผ API ๋ฅผ ๋ฐฐ์›Œ์•ผ ํ•œ๋‹ค.
Because we won't need the HW BP anymore, and because we have only 4 HW BPs at our disposal,
just remove it like this.
์™œ๋ƒํ•˜๋ฉด ์šฐ๋ฆฌ๋Š” HW BP ๊ฐ€ ๋” ์ด์ƒ ํ•„์š”ํ•˜์ง€ ์•Š๋‹ค. ๊ทธ๋ฆฌ๊ณ  ์šฐ๋ฆฌ๋Š” ์˜ค์ง 4 ๊ฐœ์˜ HW BP ๋ฅผ ์ฒ˜๋ฆฌํ•  ์ˆ˜
์žˆ๋‹ค. ์ด์ œ ์ด๊ฒƒ์„ ์‚ญ์ œํ•˜์ž.
And now continue stepping F8 on the search for the creation of the NAG.
๊ทธ๋ฆฌ๊ณ  nag ์ด ๋งŠ๋“ค์–ด์ง€๋Š” ๊ณณ์„ ์ฐพ์œผ๋ ค๊ณ  ๊ณ„์† F8 ์„ ๋ˆŒ๋Ÿฌ.
Notice also that we are getting deeper and deeper into the call at VA 004BD497 where the nag
was first shown !!! Still remember that ?
์šฐ๋ฆฌ๋Š” ๊นŠ๊ฒŒ ํŒŒ๊ณ ๋“ค๊ณ  call ์•ˆ์˜ 004BD497 ์— ๋„์ฐฉํ–ˆ๋‹ค. ์ด๊ณณ์€ nag ์ด ์ฒ˜์Œ์œผ๋กœ ๋ณด์—ฌ์ง€๋Š” ๊ณณ์ด๋‹ค.
๊ธฐ์–ตํ•˜๊ณ  ์žˆ์–ด?
And do you still remember the animate over/in function in Olly from the very beginning in this
Part?
๋งค์šฐ ๊ธฐ์ดˆ์ ์ธ Part ์—์„œ ํ–ˆ๋˜ Olly ์˜ animate over/in function ์„ ๊ธฐ์–ตํ•˜๊ณ  ์žˆ์–ด?
Now, this is the time to come back to that Ctrl-F8 you pressed then.
์ด์ œ, ๋Œ์•„์˜ฌ ์‹œ๊ฐ‚์ด ๋๋‹ค. Ctrl-F8 ์šธ ๋ˆŒ๋Ÿฌ.
If you have tried it, you will have seen that Olly animated straight towards the nag following the
exact path we too have followed so far and further !!!!
๋„์ ‚ํ•ด ๋ดค๋‹ค๋ฉด, Olly ๊ฐ€ ์ง์ ‘ nag ์ด ์‹คํ–‰๋˜๋Š” ์ •ํ™•ํ•œ ๊ฒฝ๋กœ๋ฅผ animation ์œผ๋กœ ๋ดค์„ ๊ฒƒ์ด๋‹ค. ์šฐ๋ฆฌ๋Š”
์ง€๊ธˆ๊นŒ์ง€ ๊ทธ๋ฆฌ๊ณ  ๋” ๋ฉ€๋ฆฌ ๋”ฐ๋ผ๊ฐ‚๋‹ค.
What we could have done is the following : from EP, press Ctrl-F8 to animate over the code till
the NAG where Olly pauses.
์šฐ๋ฆฌ๋Š” ๋”ฐ๋ผ ๋‹ค๋…”๋‹ค. : EP ์—์„œ, Ctrl+F8 ์„ ๋ˆŒ๋Ÿฌ. Nag ์ด ์žˆ๋Š” ๊ณณ๊นŒ์ง€ animation ์‹œ์ผœ. ๊ทธ๊ณณ์—์„œ
Olly ๋Š” ์ •์ง€ํ•œ๋‹ค.
Then press "-" to retrace Olly's steps till back at EP(this may take a while) and then retrace the
steps Olly has made, noting down all the cond jumps as well as the variable jumps.
-๋ฅผ ๋ˆŒ๋Ÿฌ. Olly ๋Š” ์›๋ž˜ ์™”๋˜ ๊ณณ์ธ EP ๋ฅผ ์ถ”์ ํ•œ๋‹ค.(์ž ์‹œ ๋™์•ˆ) ๊ทธ๋ฆฌ๊ณ  Olly ๊ฐ€ ๋งŠ๋“  step ์„ ์ถ”์ ํ•œ๋‹ค.
This way, you never need to BP, restart the app and run till the BP to step F7 in the call to search
for the nag.
์ด ๋ฐฉ๋ฒ•์€, ๋„ค๊ฒŒ BP ๊ฐ€ ๋” ์ด์ƒ ํ•„์š”ํ•˜์ง€ ์•Š๋‹ค. App ์„ ์žฌ์‹œ์ž‘ํ•˜๊ณ  BP ๊นŒ์ง€ ์‹คํ–‰ํ•ด. F7 ์„ ๋ˆŒ๋Ÿฌ call
์•ˆ์œผ๋กœ ๋“ค์–ด๊ฐ€์„œ nag ์„ ์ฐพ์ž.
REMARK : this is exactly what TC (trace call == run trace) can do and more. In fact, it would be
stupid to do it with animate over/in.
์ฃผ๋ชฉ : ์ด๊ฒƒ์€ ์ •ํ™•ํžˆ TC(trace call == run trace)์€ ์ข€ ๋” ํ•  ์ˆ˜ ์žˆ๋‹ค. ์‚ฌ์‹ค, ์ด๊ฒƒ์€ ๋ฉ์ฒญํ•œ ์ง“์ด๋‹ค.
Animate over/in ์œผ๋กœ ํ•  ์ˆ˜ ์žˆ๋‹ค.
My only goal here is to explain a little more in-depth what all possibilities you have in Olly.
์˜ค์ง ์ด๊ณณ์—์„œ ๋‚˜์˜ ๋ชฉํ‘œ๋Š” ์•ฝ๊ฐ‚์˜ ๊นŠ์ด ์žˆ๋Š” ๊ฒƒ์„ ์„ค๋ช…ํ•˜๊ธฐ ์œ„ํ•œ ๋ชจ๋“  ๊ฐ€๋Šฅ์„ฑ์„ Olly ๋Š” ๊ฐ€์ง€๊ณ  ์žˆ๋‹ค.
Now that you know all this, you will also understand that when animating over with Olly, I
immediately found where the nag is created, and I have put a BP there already.
์ด์ œ ๋„ˆ๋„ ๋ชจ๋“  ๊ฒƒ์„ ์•Œ ๊ฒƒ์ด๋‹ค, Animating ์ด ๋  ๋•Œ ์ดํ•ดํ•  ๊ฒƒ์ด๋‹ค. ๋‚˜๋Š” ์ฆ‰์‹œ Nag ์ด ์ƒ์„ฑ๋œ ๊ณณ์„
์ฐพ๋Š”๋‹ค. ๊ทธ๋ฆฌ๊ณ  ์ด๋ฏธ BP ๋ฅผ ์„ค์น˜ํ•ด ๋†จ๋‹ค.
One important remark however : always check the last steps from Olly till the created window to
verify if they are really the last ones.
์ค‘์š”ํ•œ ๊ฒƒ์€ ์ด๊ฒƒ์ด๋‹ค ์ฃผ๋ชฉ : ๋งŠ์•ฝ์— ๊ทธ๋“ค์ด ์ •๋ง ๋งˆ์ง€๋ง‰ ๊ฒƒ์ด๋ผ๋ฉด ํ•ญ์ƒ Olly ์—์„œ ๋งŠ๋“ค์–ด์ง‚
window ๋ฅผ ๊ฒ€์ฆํ•˜๊ธฐ ์œ„ํ•ด ๋งˆ์ง€๋ง‰ step ์„ check ํ•œ๋‹ค.
Olly sometimes animates OVER the last call -showing you the window too soon-instead of
animating IN itโ€ฆ.
Olly ๋Š” ๊ฐ€๋” ๋งˆ์ง€๋ง‰ call ์„ ๋ณด์—ฌ์ฃผ๊ธฐ ์œ„ํ•ด์„œ.(๋„ˆ์—๊ฒŒ ๋นจ๋ฆฌ ๋ณด์—ฌ์ฃผ๊ธฐ ์œ„ํ•ด) animate ๋ฅผ ํ•œ๋‹ค.
Now comes a long way of stepping F8 without jump changes. To reduce movie size, I have
removed it from this movie, and so, we arrive โ€ฆ.
Jump ์—†์ด F8 ์„ ๋ˆŒ๋Ÿฌ ์ง‚ํ–‰ํ•˜๋Š” ๋‹ค๋ฅธ ๋ฐฉ๋ฒ•์ด ์˜จ๋‹ค. Movie size ๋ฅผ ์ฃฟ์ด๊ธฐ ์œ„ํ•ด, ๋‚˜๋Š” ์ด movie ์—์„œ
์‚ญ์ œํ–ˆ๋‹ค. ๊ทธ๋ฆฌ๊ณ  ์šฐ๋ฆฌ๋Š” ๋„์ฐฉํ–ˆ๋‹ค.
โ€ฆhere, in a JE that again brings no changes to before.
์—ฌ๊ธฐ, JE ๋Š” ์ ‚๊ณผ ๋งˆ์ฐฌ๊ฐ€์ง€๋กœ ๋ฐ”๋€Œ์ง€ ์•Š๋Š”๋‹ค.
This jump could have been important though because it could jump to an XOR (setting register
to zero)
์ด jump ๋Š” ์ค‘์š”ํ–ˆ๋‹ค. ์™œ๋ƒํ•˜๋ฉด ๊ทธ๊ฒƒ์€ XOR ๋กœ jump ํ•  ์ˆ˜ ์žˆ๋‹ค.(register ๋ฅผ zero ๋กœ setting)
Remark where the nag was created when I first stepped this program. Let's continue stepping. Pay
attention because this is undoubtedly where it will all happen
์ฃผ๋ชฉ. ์ฒ˜์Œ์œผ๋กœ program ์„ ์ง‚ํ–‰ํ•  ๋•Œ ์ด ๊ณณ์—์„œ nag ์€ ์ƒ์„ฑ๋๋‹ค. ๊ณ„์† ํ•ด๋ณด์ž.
์ง‘์ค‘ํ•ด. ์™œ๋ƒํ•˜๋ฉด ์ด๊ฒƒ์€ ๋ฌด์Šจ ์ผ์ด ๋ฐœ์ƒํ• ์ง€ ํ™•์‹คํ•˜๋‹ค.
Remark that this JE if executed would jump over the nag.
Now scroll down to see the jump.
์ฃผ๋ชฉ. JE ๊ฐ€ ์‹คํ–‰๋œ๋‹ค๋ฉด nag ์„ jump ํ•  ๊ฒƒ์ด๋‹ค.
์Šคํฌ๋กŸ ๋ฐ‘์œผ๋กœ ๋‚ด๋ ค์„œ jump ํ•˜๋Š” ๊ณณ์„ ๋ด.
Mmmm, jumping could perhaps be a solution but let's first see what happens without trying this.
์Œ, jumping ์€ ์•„๋งˆ ํ•ด๊ฒฐ์ฑ…์ด๋‹ค. ๋„์ ‚ ์—†์ด ๋จผ์ € ๋ฌด์—‡์ด ๋ฐœ์ƒํ–ˆ๋Š”์ง€ ๋ด.
Scroll back up.
์Šคํฌ๋กŸ์„ ์›๋ž˜๋Œ€๋กœ ๋Œ๋ ค.
Later, we will find that this jump leads to program's exit.
์šฐ๋ฆฌ๋Š” jump ๊ฐ€ program ์„ exit ํ•˜๋Š” ๊ณณ์œผ๋กœ lead ํ•  ๊ฒƒ์ด๋‹ค.
Mmmm, and this JNZ, if executed, jumps past the Nag too โ€ฆ.
This is another possible solution
์Œ, ์ด JNZ ๊ฐ€ ์‹คํ–‰๋œ๋‹ค๋ฉด, nag ์„ jump ํ•œ๋‹ค.
์ด๊ฒƒ์€ ๋‹ค๋ฅธ ํ•ด๊ฒฐ์ฑ…์ด๋‹ค.
Oho, and this is the one that has changed!
See how easy it is in this way to find what needs to be patched !!!!
์˜คํ˜ธ, ์ด๊ฒƒ์€ ๋ฐ”๋€Œ์—ˆ๋‹ค.
ํŒจ์น˜๊ฐ€ ํ•„์š”ํ•œ๋ฐ ๊ทธ ๋ฐฉ๋ฒ•์ด ์–ผ๋งˆ๋‚˜ ์‰ฌ์šด์ง€ ์ด ๋ฐฉ๋ฒ•์„ ํ†ตํ•ด ์ฐพ์•„๋ณด์ž.
Notice that this jump, now executed because of trial expiration, will bring us over the nag.
์ด jump ๋Š”, ์™œ๋ƒํ•˜๋ฉด trial ๋งŠ๊ธฐ๋ฅผ ์‹คํ–‰ํ–ˆ๋‹ค. Nag ์„ ์‹คํ–‰ํ•˜์ง€ ์•Š๋Š”๋‹ค.
Let's first see what happens now before deciding what and where to patch.
So press F8 to take the jump
์ฒซ๋ฒˆ์งธ๋กœ ๋ฌด์—‡์ด ๋ฐœ์ƒํ•˜๋Š”์ง€ ๋ณด๊ณ  ๋ฌด์—‡์„ ๊ทธ๋ฆฌ๊ณ  ์–ด๋””์— patch ํ• ์ง€ ๊ฒฐ์ •ํ•ด.
๊ทธ๋ž˜์„œ F8 ์„ ๋ˆŒ๋Ÿฌ jump ๋ฅผ ํ•˜์ž.
And we land here.
Continue stepping F8
์šฐ๋ฆฌ๋Š” ์—ฌ๊ธฐ์— ๋„์ฐฉํ•œ๋‹ค.
F8 ์„ ๋ˆŒ๋Ÿฌ ๊ณ„์†ํ•˜์ž.
See what happens if a trial limit has been reached.
Trial ์ด ์ œํ•œ์ด ๋๋‹ค๋ฉด ๋ฌด์—‡์ด ๋ฐœ์ƒํ•˜๋Š”์ง€ ๋ด.
This nag was generated in this call huh. Breakpointing it is also a good visual aid.
์ด nag ์€ ์ด call ์—์„œ ์ƒ์„ฑ๋๋‹ค. ๋˜ํ•œ Breakpoint ์€ ์ข‹๋‹ค.
Now, we only need to study the code further as we partially did already. You can do it for
yourself and detect that there are different possibilities (like stated already).
์ด์ œ, ์šฐ๋ฆฌ๊ฐ€ ์ด๋ฏธ ๋ถ€๋ถ„์ ์œผ๋กœ ํ–ˆ์„ ๋•Œ ์šฐ๋ฆฌ๋Š” code ๋ฅผ ๋ฉ€๋ฆฌ ๊ณต๋ถ€ํ•˜๋Š” ๊ฒŒ ํ•„์š”ํ•˜๋‹ค. ์ž์‹ž์„ ์œ„ํ•ด ํ• 
์ˆ˜ ์žˆ๋‹ค. ๊ทธ๋ฆฌ๊ณ  ๋‹ค๋ฅธ ๊ฐ€๋Šฅ์„ฑ์„ ๋ฐœ๊ฒฌํ–ˆ๋‹ค.(์ด๋ฏธ ์ •ํ•ด์ง‚ ๊ฒƒ์ฒ˜๋Ÿผ)
The cond jump, just above this screen at 004898D8 (not visible here, see before) leads to exiting
the app : no need to touch that. Which leaves us with two other possibilities.
์กฐ๊ฑด jump ๋Š”, ์ด screen ์˜ 004898D8 ์—์„œ(์ด๊ณณ์—์„œ๋Š” ๋ณด์—ฌ์ง€์ง€ ์•Š๋Š”๋‹ค, ๋‚˜์ค‘์— ๋ณด์ž) app ์ข…๋ฃŒ๋กœ
์ด๋ˆ๋‹ค. ๋” ์ด์ƒ ์ œ์–ด๊ฐ€ ํ•„์š”ํ•˜์ง€ ์•Š๋‹ค. ์šฐ๋ฆฌ๋Š” 2 ๊ฐ€์ง€ ๊ฐ€๋Šฅ์„ฑ๊ณผ ํ•จ๊ป˜ ๋– ๋‚œ๋‹ค.
Right. If we would take this jump, it jumps past both nags.
๋งž์•„. ์šฐ๋ฆฌ๊ฐ€ jump ๋ฅผ ํ•œ๋‹ค๋ฉด, 2 ๊ฐ€์ง€ nag ์„ jump ํ•  ์ˆ˜ ์žˆ๋‹ค.
Also, if executed, doesn't it jump to exit the program ???
๋˜ํ•œ, ์‹คํ–‰๋œ๋‹ค๋ฉด, program ์ด ์ข…๋ฃŒ๋˜๋Š” jump ๊ฐ€ ํ•„์š”ํ•˜์ง€ ์•Š๋‹ค.
This will prove to be the easiest patch.
์‰ฌ์šด patch ์ธ์ง€ ์ฆ๋ช…ํ•  ์ˆ˜ ์žˆ๋‹ค.
I'll come back to this solution later.
๋‚˜๋Š” ๋‚˜์ค‘์— ๋‹ค๋ฅธ ํ•ด๊ฒฐ์ฑ…์„ ๊ฐ€์ง€๊ณ  ๋Œ์•„์˜ฌ ๊ฒƒ์ด๋‹ค.
But because we are here to learn, let's also study the other possibilities
์™œ๋ƒํ•˜๋ฉด ์šฐ๋ฆฌ๋Š” ์—ฌ๊ธฐ์—์„œ ๋ฐฐ์›Œ์•ผ ํ•œ๋‹ค. ๋˜ํ•œ ๋‹ค๋ฅธ ๊ฐ€๋Šฅ์„ฑ์„ ๋ฐฐ์šฐ์ž.
The other possibility is to NOP this JLE so that we do not jump but so that the code runs
automatically till the first nag.
์ด JLE ์—์„œ jump ํ•˜์ง€ ์•Š๋„๋ก ๋‹ค๋ฅธ ๊ฐ€๋Šฅ์„ฑ์ด ์žˆ๋Š” ๊ฒƒ์€ NOP ๋‹ค. code ๊ฐ€ ์ž๋™์ ์œผ๋กœ ์ฒซ๋ฒˆ์งธ
nag ๊นŒ์ง€ ์‹คํ–‰๋œ๋‹ค.
Of which we see this an immediate call for the nag creation : do understand that the nag is
generated in the above call at 004898FE, but is effectively created in MFC42.dll in this call at
489912.
์ฆ‰์‹œ nag ๋งŠ๋“œ๋Š” call ์„ ๋ณธ๋‹ค. : ์ด call ์˜ 004898FE ์œ„์—์„œ nag ์ด ์ƒ์„ฑ๋˜๋Š” ๊ณณ์„ ์ดํ•ดํ•  ์ˆ˜ ์žˆ๋‹ค.
ํšจ๊ณผ์ ์œผ๋กœ MFC42.dll ์•ˆ์˜ 489912 ์—์„œ ์ƒ์„ฑ๋˜์—ˆ๋‹ค.
If we NOP this call here and the JLE above, then the application will also run as if registered !
์šฐ๋ฆฌ๋Š” ์ด call ์—์„œ ์•„๋ฌด ๋™์ž‘ํ•˜์ง€ ์•Š๊ณ  JLE ๊ฐ€ ์œ„์— ์žˆ์œผ๋ฉด, application ์€ ๋“ฑ๋ก๋œ ๊ฒƒ์ฒ˜๋Ÿผ ์‹คํ–‰๋œ๋‹ค.
Of course there are always other possibilities.
๋ฌผ๋กž ๊ทธ๊ฒƒ์€ ํ•ญ์ƒ ๋‹ค๋ฅธ ๊ฐ€๋Šฅ์„ฑ๋“ค์ด ์žˆ๋‹ค.
For example : assembling this line from the call as MOV EAX, 1 instead of NOP'ing it โ€ฆ
์˜ˆ : call ๋กœ๋ถ€ํ„ฐ MOV EAX, 1 ์ผ ๋•Œ ๋Œ€์‹žํ•ด์„œ ์ด line ์„ assembling ํ•ด์„œ NOP ํ•ด์•ผ ๋œ๋‹ค.
Registers the app and jumps straight to the main program
App ์„ ๋“ฑ๋กํ•˜๊ณ  main program ์œผ๋กœ ์ง์ ‘ jump ํ•˜์ž.
However, in the case, each other start up unregisters the app because of a doublecheck
With another annoying nag as result.
Then you also need to make the following changes to also jump over that nag :
๊ทธ๋Ÿฌ๋‚˜, ์ด๋ฒˆ ๊ฒฝ์šฐ๋Š” ๊ฐ๊ฐ ๋‹ค๋ฅธ start up app ์ด ๋ฏธ๋“ฑ๋ก ๋˜์—ˆ๋‹ค. ์™œ๋ƒํ•˜๋ฉด ๋‹ค๋ฅธ nag ์„ ํšŒํ”ผํ•  ๋•Œ 2 ๋ฒˆ
check ํ•œ๋‹ค.
๋„ˆ๋Š” ๋˜ nag ์„ jump ํ•˜๊ธฐ ์œ„ํ•ด ๋‹ค์Œ ๋ณ€๊ฒฝ์ด ํ•„์š”ํ•˜๋‹ค.
RVA 488C83 MOV AL,1
Or
RVA 488C85 JMP 488D10
(or other possibilities to jump past that nag)
(๊ณผ๊ฑฐ์˜ nag ์„ jump ํ•˜๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฐ€๋Šฅ์„ฑ)
Try it out if you want to learn !!!
๋„ค๊ฐ€ ๋ฐฐ์šฐ๊ธฐ๋ฅผ ์›ํ•œ๋‹ค๋ฉด ๋„์ ‚ ํ•ด๋ด.
Another possibility is not noping this JLE but jump always
๋‹ค๋ฅธ ๊ฐ€๋Šฅ์„ฑ์€ NOP ์„ ํ•˜์ง€ ์•Š๋Š”๋‹ค. ์ด JLE ์—์„œ๋Š” ํ•ญ์ƒ jump ๊ฐ€
But then change this Call to the expired nag (remark that is the same call as above)
๊ทธ๋Ÿฌ๋‚˜ ์ข…๋ฃŒ๋˜๋Š” nag ์—์„œ ์ด call ์„ ๋ฐ”๊ฟ”์•ผ ํ•œ๋‹ค.(์ฃผ๋ชฉ. ์ด๊ฒƒ์€ ์œ„์™€ ๊ฐ™์€ call ์ด๋‹ค.)
And assemble this call as
MOV EAX, 1
etc etc etc
As you can see, plenty of possibilities for you to try out(they all are working solutions)
๊ทธ๋ฆฌ๊ณ  ์ด call ์ด MOV EAX,1 ์ผ ๋•Œ assemble.
๋„ค๊ฐ€ ๋ณผ ๋•Œ, ๋„์ ‚ํ•˜๊ธฐ ์œ„ํ•œ ๋ง‹์€ ๊ฐ€๋Šฅ์„ฑ์ด ๋„ˆ์—๊ฒŒ ์žˆ๋‹ค.(๊ทธ๋“ค์€ ๋ชจ๋‘ ํ›Œ๋ฅญํ•œ ํ•ด๊ฒฐ์ฑ…์ด๋‹ค.)
Indeed, let's come back to our first possibility to jump past both nags at once
์ •๋ง, ๊ณผ๊ฑฐ์˜ 2 ๊ฐœ์˜ nag ์„ ํ•œ ๋ฒˆ์— jump ํ•˜๊ธฐ ์œ„ํ•ด ์ฒซ๋ฒˆ์งธ ๊ฐ€๋Šฅ์„ฑ์œผ๋กœ ๋Œ์•„์™€.
If you tried it out, you will have found that it turns out as the easiest solution because it's only
one patch.
๋งŠ์•ฝ์— ๋„ค๊ฐ€ ๋„์ ‚ํ•œ๋‹ค๋ฉด, ๋„ˆ๋Š” ๋Œ์•„์˜ค๋Š” ๊ฒƒ์„ ์ฐพ์„ ๊ฒƒ์ด๋‹ค. ๋งค์šฐ ์‰ฌ์šด ๋ฐฉ๋ฒ•์ด๋‹ค. ์™œ๋ƒํ•˜๋ฉด ์˜ค์ง 1 ๋ฒˆ
patch ํ•˜๋ฉด ๋œ๋‹ค.
I tried it too, but it is something you understand by now and so I removed it from this movie to
reduce the movie's size.
๋‚˜๋Š” ๋„์ ‚ํ–ˆ๋‹ค, ๊ทธ๋Ÿฌ๋‚˜ ๊ทธ๊ฒƒ์€ ๋ฌด์—‡์ด๋‹ค. ์ง€๊ธˆ ๋„ค๊ฐ€ ์ดํ•ดํ–ˆ๊ณ  ๋‚˜๋Š” ๊ทธ๊ฒƒ์„ Movie size ๋•Œ๋ฌธ์—
์‚ญ์ œํ–ˆ๋‹ค.
BTW, it causes no other nags either
By the way, ๊ทธ๊ฒƒ์€ ๋‹ค๋ฅธ nag ์˜ ์›์ธ์„ ์ดˆ๋ž˜ํ•˜์ง€ ์•Š์•˜๋‹ค.
Conclusion :
TEST AL, AL means :
"Is the soft registered ?"
Scroll down.
๊ฒฐ๋กž :
TEST AL, AL ๋œป :
"์–ด๋–ป๊ฒŒ soft ๋“ฑ๋ก์„ ํ•ด?"
์Šคํฌ๋กŸ ๋‚ด๋ ค๋ด.
This is the cond jump that leads to exiting the app.
์ด ์กฐ๊ฑด jump ๋Š” app ์„ ์ข…๋ฃŒ ์‹œํ‚จ๋‹ค.
We decided to patch 004898E1 to jump always. This will be plain stupid patching.
I will come back to this in next tutorials.
์šฐ๋ฆฌ๋Š” 004898E1 ์„ ํ•ญ์ƒ jump ํ•˜๊ธฐ๋กœ ๊ฒฐ์ •ํ–ˆ๋‹ค. ์ด๊ฒƒ์€ ๋ถ„๋ช…ํžˆ ๋ฉ์ฒญํ•œ patch ๋‹ค.
๋‚˜๋Š” ๋‹ค์Œ tutorial ์— ์ด๊ฒƒ์„ ๊ฐ€์ง€๊ณ  ๋Œ์•„์˜ค๊ฒ ๋‹ค.
For now, I'll just state that indeed, we could dig deeper and find out where EDI+E0 is set
์ง€๊ธˆ์€, ๋ช…์‹œํ–ˆ๋‹ค. ์šฐ๋ฆฌ๊ฐ€ ๊นŠ๊ฒŒ ๋“ค์–ด๊ฐ€๊ณ  EDI+E0 ์ด set ๋œ ๊ฒƒ์„ ์ฐพ์•„.
Do you understand that the value for EDI+E0 is where the decision on being registered or not is
stored ???
์ดํ•ดํ–ˆ์–ด. EDI+E0 ๊ฐ’์ด ๋“ฑ๋ก ๋๋Š”์ง€ ์•„๋‹Œ์ง€ ๊ฒฐ์ •ํ•œ๋‹ค.
Try to understand this already but it's no problem if you don't understand here, as said, I'll come
back to such situations in later parts
์ดํ•ดํ•˜๊ธฐ ์œ„ํ•ด ๋…ธ๋ ฅํ•ด๋ด. ๋„ค๊ฐ€ ์—ฌ๊ธฐ์—์„œ ์ดํ•ดํ•˜์ง€ ๋ชปํ•ด๋„, ๋ฌธ์ œ ์—†์–ด. ๋‚ด๊ฐ€ "๋‚˜๋Š” ๋‚˜์ค‘ part ์—์„œ ๋‹ค๋ฅธ
ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•์œผ๋กœ ๋Œ์•„์˜ฌ ๊ฑฐ์•ผ." ๋ผ๊ณ  ๋งํ–ˆ์ง€.
To quickly show you the results, I first removed this BP (where we exit app) and re-ran the soft till
โ€ฆ
๋น ๋ฅด๊ฒŒ ๊ฒฐ๊ณผ๋ฅผ ๋ณด์—ฌ์ฃฟ๊ป˜, ๋จผ์ € ์ฒซ๋ฒˆ์งธ BP ๋ฅผ ์‚ญ์ œํ•ด(์ด๊ฒƒ์€ app ์„ ์ข…๋ฃŒํ•œ๋‹ค.) ๊ทธ๋ฆฌ๊ณ  ๋‹ค์‹œ ์—ฌ๊ธฐ๊นŒ์ง€
์‹œ์ž‘ํ•ด.
...breaking here again.(Removed it for size)
์—ฌ๊ธฐ์— ๋ฉˆ์ถฐ(size ๋•Œ๋ฌธ์— movie ์—์„œ ์‚ญ์ œํ–ˆ๋‹ค)
Remember that we decided that the program will be in registered status if we always jump here.
๊ธฐ์–ตํ•ด. ์šฐ๋ฆฌ๊ฐ€ ํ•ญ์ƒ ์ด๊ณณ์„ jump ํ•˜๋ฉด Program ์ด ๋“ฑ๋ก๋œ ์ƒํƒœ๋กœ ๋œ๋‹ค.
Let me first show you once more how this can be tested, but remember that if we want to make
these changes permanent, that we will need to assemble this as JMP 00489A29
๋จผ์ € ์–ด๋–ป๊ฒŒ test ํ•˜๋Š”์ง€ ๋ณด์—ฌ์ฃฟ๊ป˜. ๊ทธ๋Ÿฌ๋‚˜ ๊ธฐ์–ตํ•ด. ์˜์›ํžˆ ๋ฐ”๊ฟ”์•ผ ๋ผ. ์šฐ๋ฆฌ๋Š” JMP 00489A29 ๋ฅผ
assemble ํ•˜๋Š” ๊ฒŒ ํ•„์š”ํ•˜๋‹ค.
You know the system if you've seen the previous Parts!
๋„ค๊ฐ€ ์ด์ ‚ ๊ฐ•์˜๋ฅผ ๋ดค๋‹ค๋ฉด ์•Œ๊ณ  ์žˆ์„ ๊ฑฐ์•ผ.
Once again : I hope you understand that if this works, we will have to change this JNZ to always
jump
๋‹ค์‹œ ํ•œ ๋ฒˆ : ๋‚˜๋Š” ์ด๊ฒƒ์ด ๋ฌด์Šจ ์ผ์„ ํ•˜๋Š”์ง€ ๋„ค๊ฐ€ ์ดํ•ดํ–ˆ์„ ๊ฑฐ๋ผ ์ƒ๊ฐํ•ด. ์šฐ๋ฆฌ๋Š” JNZ ๋ฅผ ํ•ญ์ƒ JMP
ํ•˜๊ฒŒ ๋ฐ”๊ฟ€ ๊ฒƒ์ด๋‹ค.
So, jump will be taken now.
๊ทธ๋ž˜์„œ, ์ด์ œ jump ๋ฅผ ํ•  ๊ฑฐ์•ผ.
Press F9 to run
F9 ๋ฅผ ๋ˆŒ๋Ÿฌ ์‹คํ–‰ ํ•ด.
And bamโ€ฆ..we land immediately in the main program window. No starting nag anymore
Of course, all this has no influence on the closing nag.
์˜ค..์šฐ๋ฆฌ๋Š” ์ฆ‰์‹œ main program window ์— ๋„์ฐฉํ–ˆ๋‹ค. ๋ฌผ๋กž ๋” ์ด์ƒ starting nag ์ด ์—†๋‹ค. Closing
nag ์˜ ์˜ํ–ฅ๋„ ์—†๋‹ค.
So, let's see what happens if we close the app
๊ทธ๋ž˜์„œ, ์šฐ๋ฆฌ๊ฐ€ app ์„ ๋‹ซ์•˜์„ ๋•Œ ๋ฌด์Šจ ์ผ์ด ๋ฐœ์ƒํ•˜๋Š”์ง€ ๋ด๋ผ.
Indeed. Now, this is a completely useless advertisement, right? Let's investigate if our reversing
capabilities are that good already that we find how to remove this nag :)
์ •๋ง, ์ด์ œ ์™„๋ฒฝํžˆ ๋ถˆํ•„์š”ํ•œ ๊ด‘๊ณ ๋‹ค. ๊ทธ๋ ‡์ง€? ์กฐ์‚ฌํ•˜์ž. ์šฐ๋ฆฌ๋Š” reversing ๋Šฅ๋ ฅ์ด ์ด๋ฏธ ์žˆ๋‹ค. ์šฐ๋ฆฌ๋Š” ์ด
nag ์„ ์–ด๋–ป๊ฒŒ ์‚ญ์ œํ• ์ง€ ์ฐพ์„ ๊ฒƒ์ด๋‹ค.
I also want to show you a quick way to find your way in a program using the Call Stack.
๋‚˜๋Š” ๋„ˆ์—๊ฒŒ ๋ณด์—ฌ์ฃผ๊ธฐ ์œ„ํ•ด program ์˜ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ๋Š” Call Stack ์—์„œ ๋น ๋ฅธ ๋ฐฉ๋ฒ•์„ ์ฐพ๊ธฐ๋ฅผ ์›ํ•œ๋‹ค.
Again, I'll come back to this in next tutorials with more practice on this.
๋‹ค์‹œ, ๋‚˜๋Š” ๋‹ค์Œ tutorial ์—์„œ ์ข€ ๋” ๋ง‹์€ ์—ฐ์Šต์œผ๋กœ ๋Œ์•„์˜ฌ ๊ฒƒ์ด๋‹ค.
BTW, the Stack can bring us there too (see also next tuts)
By the way, stack ์€ ์šฐ๋ฆฌ์—๊ฒŒ ๊ฐ€์ ธ์˜ฌ ๊ฒƒ์ด๋‹ค(๋‹ค์Œ tuts)
Or animating over ;)
์•„๋‹ˆ๋ฉด animating ์„ ํ•ด๋ด.
Or F8 and F7 of course ;)
์•„๋‹ˆ๋ฉด F8 ๊ณผ F7 ์„ ๋ˆŒ๋Ÿฌ.
Now, to use the Call Stack, we need to pause Olly.
์ด์ œ, Call Stack ์„ ์‚ฌ์šฉํ•˜๊ธฐ ์œ„ํ•ด์„œ Olly ๋ฅผ ๋ฉˆ์ถฐ์•ผ ํ•œ๋‹ค.
Other way to pause Olly is to set focus to Olly (instead of the nag screen) by clicking here and
then pressing F12
๋‹ค๋ฅธ ๋ฐฉ๋ฒ•์œผ๋กœ clicking ์„ ํ•˜๊ฑฐ๋‚˜ F12 ๋ฅผ ๋ˆ„๋ฆ„์œผ๋กœ ์ธํ•ด Olly ๋ฅผ ๋ฉˆ์ถ”๊ธฐ ์œ„ํ•ด ์ง‘์ค‘ํ•˜์ž. (nag screen
๋Œ€์‹ž์—)
BTW, if you want to see where in the code the app waits for your input, you can always press
Ctrl-F8 (animate over) when Olly is paused and see it all happen with your own eyes
By the way, ๋งŠ์•ฝ์— code ์—์„œ ๋„ˆ์˜ ์ž…๋ ฅ์„ ๊ธฐ๋‹ค๋ฆฌ๋Š” ๊ฒƒ์„ ๋ณด๊ธฐ ์›ํ•œ๋‹ค๋ฉด. Olly ๊ฐ€ ๋ฉˆ์ท„์„ ๋•Œ ๋„ˆ๋Š”
ํ•ญ์ƒ Ctrl-F8(animate over)๋ฅผ ๋ˆ„๋ฅผ ์ˆ˜ ์žˆ๋‹ค. ๊ทธ๋ฆฌ๊ณ  ๋ฌด์Šจ ์ผ์ด ์ผ์–ด๋‚˜๋Š”์ง€ ๋‘ ๋ˆˆ์œผ๋กœ ๋ด.
And this can always be done if Olly is not running. I trust you understand this "animate over"
feature can frequent be used to understand how Olly and how programs work
Olly ๊ฐ€ ์‹คํ–‰ ์ค‘์ด ์•„๋‹ ๋•Œ ํ•ญ์ƒ ์‹คํ–‰๋๋‹ค. ๋‚˜๋Š” ๋„ค๊ฐ€ "animate over" ํŠน์ง•์„ ๋นˆ๋ฒˆํžˆ ์‚ฌ์šฉํ•  ๊ฒƒ์ด๋‹ค.
Olly ์—์„œ ์–ด๋–ป๊ฒŒ ์‚ฌ์šฉํ•˜๊ณ  program ์€ ์–ด๋–ป๊ฒŒ ์ž‘๋™ํ•˜๋Š”์ง€ ์ดํ•ด ํ–ˆ์„ ๊ฒƒ์ด๋ผ ๋ฏฟ๋Š”๋‹ค.
Call Stack
So, this is a new window for you huh?
์ด๊ฒƒ์€ ๋„ˆ๋ฅผ ์œ„ํ•œ ์ƒˆ๋กœ์šด window ๋‹ค.
Let me say for now that the Call Stack can be seen as a line-up from Olly for all calls that were
executed that lead "in straight line" to screens that are shown.
์ด์ œ Call Stack ์„ ๋ณธ ๊ฒƒ์— ๋Œ€ํ•ด์„œ ์ด์•ผ๊ธฐ ํ•˜๊ฒ ๋‹ค. Olly ์—์„œ ๋ชจ๋“  call ์ด ์‹คํ–‰ ๋์„ ๋•Œ line-up ์ด ๋œ๋‹ค.
๋ณด์—ฌ์ฃผ๊ธฐ ์œ„ํ•ด "์ง์ ‘์ ์ธ line"์œผ๋กœ ์ด๋ˆ๋‹ค.
Yeah yeah, I know, this is a bit shortsighted, but this is a good way to visualize it. More exact
would be that it's an attempt from Olly to backtrace the sequence of calls on the stack.
์˜ˆ, ๋‚˜๋„ ์•Œ์•„, ๊ฝค ๊ทผ์‹œ์•ˆ์ ์ด๋ผ๋Š” ๊ฒƒ์„. ๊ทธ๋Ÿฌ๋‚˜ ์ด๊ฒƒ์€ ์‹œ๊ฐํ™”ํ•˜๊ธฐ ์ข‹์€ ๋ฐฉ๋ฒ•์ด๋‹ค. ์ข€๋” ์ •ํ™•ํ•˜๊ฒŒ
Olly ์—์„œ stack ์—์„œ call ์˜ ์ˆœ์„œ๋ฅผ ์ถ”์ ํ•˜๊ธฐ ์œ„ํ•ด ์‹œ๋„ํ•ด ๋ณผ๋งŠํ•˜๋‹ค.
BTW, we start from bottom and go up.
์šฐ๋ฆฌ๋Š” ๋ฐ”๋‹ฅ์—์„œ ์œ„๋กœ ์˜ฌ๋ผ๊ฐ‚๋‹ค.
Notice that somewhere, Olly must have lost track, only the latest calls are shown.
It's clear that we didn't start in user32.dll huh :)
Olly ๊ฐ€ ๊ธธ์„ ์žƒ์€ ๊ณณ์„ ์•Œ๋ ค์ฃพ๋‹ค. ์˜ค์ง ์ตœ๊ทผ call ์„ ๋ณด์—ฌ์ฃพ๋‹ค.
์ด๊ฒƒ์€ ๋ช…ํ™•ํ•˜๋‹ค. ์šฐ๋ฆฌ๋Š” user32.dll ์—์„œ ์‹œ์ž‘ํ•˜์ง€ ์•Š์•˜๋‹ค.
Now, study this a little and you will quickly understand that this nag was called by the program at
this address
์ด์ œ, ์ด๊ณณ์„ ๊ณต๋ถ€ํ•ด๋ณด์ž. ๊ทธ๋ฆฌ๊ณ  ๋„ˆ๋Š” Program ์˜ ์ด ์ฃผ์†Œ์—์„œ Nag ์ด ๋ถˆ๋Ÿฌ์ง€๋Š” ๊ฒƒ์„ ๋น ๋ฅด๊ฒŒ ์ดํ•ดํ• 
๊ฒƒ์ด๋‹ค.
And was then created in the MFC32.dll here.
Notice the API
๊ทธ๋ฆฌ๊ณ  MFC32.dll ์ด๊ณณ์—์„œ ์ƒ์„ฑ๋๋‹ค.
์ด๊ฒƒ์€ API ๋‹ค.
In Olly, we can doubleclick this line to go there in the code. Let's do that too
Olly ์—์„œ ์šฐ๋ฆฌ๋Š” ์ด line ์„ doubleclick ํ•˜์—ฌ ๊ฐˆ ์ˆ˜ ์ˆ˜ ์žˆ๋‹ค. ํ•ด๋ณด์ž.
Aha, so this is the call to the nag
์•„ํ•˜, ์ด call ์€ nag ์œผ๋กœ ํ–ฅํ•œ๋‹ค.
And indeed, see the same call MFC42.dll.#2514 again. Let's place a BP here and scroll up to get a
better view on the code above
์ •๋ง, ์šฐ๋ฆฌ๋Š” ๊ฐ™์€ MFC42.dll.#2514 call ์„ ๋‹ค์‹œ ๋ณธ๋‹ค. ์ด๊ณณ์— BP ๋ฅผ ์„ค์น˜ํ•˜๊ณ  ์ข€ ๋” ์ข‹์€ ์‹œ์•ผ๋ฅผ ์œ„ํ•ด
scroll ์˜ฌ๋ ค.
Mmmm, all right.
This is an easy one.
This is a direct call to the nag creation.
If we NOP this call,
The nag screen will be gone forever.
Let's first try it out.
So, restart
Remember this address for patching later !!!
์Œ, ์ข‹์•„.
์ด๊ฒƒ์€ ์‰ฝ๋‹ค.
์ด๊ฒƒ์€ ์ง์ ‘์ ์œผ๋กœ nag ์„ ์ƒ์„ฑํ•˜๋Š” ๊ณณ์œผ๋กœ call ํ•œ๋‹ค.
์šฐ๋ฆฌ๋Š” ์ด call ์„ NOP ํ•œ๋‹ค๋ฉด,
Nag ์€ ์˜์›ํžˆ ์—†์–ด์งˆ ๊ฒƒ์ด๋‹ค.
๋จผ์ € ์‹œ์ž‘ํ•ด ๋ณด์ž.
๊ทธ๋ž˜์„œ, ์žฌ์‹œ์ž‘
๋‚˜์ค‘์— patch ๋ฅผ ์œ„ํ•ด ์ด ์ฃผ์†Œ๋ฅผ ๊ธฐ์–ตํ•ด.
5. Patching and testing
Yep, we land in the BPs from the cond jumps to the nags
์˜ˆ, ์šฐ๋ฆฌ๋Š” nag ์œผ๋กœ ํ–ฅํ•˜๋Š” ์กฐ๊ฑด jump ๊ฐ€ ์žˆ๋Š” BP ์— ๋„์ฐฉํ–ˆ๋‹ค.
Now, we have found before that changing this JNZ to always jump was the best solution
(remember it ?)
์ด์ œ, ์šฐ๋ฆฌ๋Š” ํ•ด๊ฒฐ์ฑ…์„ ์ฐพ์•˜๋‹ค. ๊ทธ๋Ÿฌ๊ณ ๋‚˜์„œ JNZ ๋ฅผ ํ•ญ์ƒ jump ๋กœ ๋ฐ”๊พธ๋Š” ๊ฒƒ์ด ๊ฐ€์žฅ ์ข‹์€
ํ•ด๊ฒฐ์ฑ…์ด๋‹ค.(๊ธฐ์–ตํ•ด?)
Let's make this permanent but first study how this can be done.
์˜์›ํžˆ ๋ฐ”๊พผ๋‹ค. ๊ทธ๋Ÿฌ๋‚˜ ๋จผ์ € ์–ด๋–ป๊ฒŒ ํ•˜๋Š”์ง€ ๊ณต๋ถ€ํ•˜์ž.
Scroll up a little.
์Šคํฌ๋กŸ ์˜ฌ๋ ค๋ด.
Mmmm, there are different possibilities of course
์Œ, ์ด๊ณณ์€ ๋‹ค๋ฅธ ๊ฐ€๋Šฅ์„ฑ์ด ์žˆ๋‹ค.
Do you see one?
๋ณด์—ฌ?
Right, this for example
์ข‹์€ ์˜ˆ๋‹ค.
Or the same change the line above
๊ฑฐ๋‚˜ ์œ„์˜ line ๋„ ๊ฐ™์ด ๋ฐ”๊พผ๋‹ค.
Anyway, this change also makes Al equal 1 and that's always more secure then just plain stupid
patching the JNZ to JMP
์–ด์จŒ๋“ , ์ด ๋ณ€ํ™”๋Š” Al ์„ 1 ๊ณผ ๊ฐ™์ด ๋งŠ๋“ ๋‹ค. ๊ทธ๋ฆฌ๊ณ  ๋ถ„๋ช…ํžˆ ๋ฉ์ฒญํ•œ JNZ to JMP patch ๋ณด๋‹ค ํ•ญ์ƒ
์•ˆ์ ‚ํ•˜๋‹ค.
Now, save these changes to file in the usual way. Because you know how to do it, I skipped this
in the movie to reduce its size.
์ด์ œ, ๋ฐ”๋€ ๋ณ€ํ™”๋“ค์„ ์ผ๋ฐ˜์ ์ธ ๋ฐฉ๋ฒ•์œผ๋กœ ํŒŒ์ผ๋กœ ์ €์žฅํ•˜์ž. ์™œ๋ƒํ•˜๋ฉด ์šฐ๋ฆฌ๊ฐ€ ์–ด๋–ป๊ฒŒ ํ–ˆ๋Š”์ง€ ์•Œ๊ฒ ์ง€.
Movie size ๋ฅผ ์ฃฟ์ด๊ธฐ ์œ„ํ•ด์„œ skip ํ–ˆ๋‹ค.
And so we land here to start the saved app again. Notice that the app has been saved under
another name. Let's see if it works.
๊ทธ๋ฆฌ๊ณ  ์šฐ๋ฆฌ๋Š” ์ด๊ณณ์— ์ €์žฅ๋œ app ์„ ๋‹ค์‹œ ์‹œ์ž‘ํ•˜๊ธฐ ์œ„ํ•ด ๋„์ฐฉํ–ˆ๋‹ค. App ์€ ๋ฐ‘์—์„œ ๋‹ค๋ฅธ ์ด๋ฆ„์œผ๋กœ
์ €์žฅ๋๋‹ค. ์–ด๋–ป๊ฒŒ ์ž‘๋™ํ•˜๋Š”์ง€ ๋ณด์ž.
Run
Aha ! The starting nag is killed.
์‹คํ–‰
์•„ํ•˜! Starting nag ์ด ์ฃฝ์—ˆ๋‹ค.
So now, let's attack the annoying closing nag.
Go to Olly and โ€ฆ.
์ด์ œ ํšŒํ”ผํ•˜๋Š” closing nag ์„ ๊ณต๊ฒฉํ•˜์ž.
Olly ๋กœ ๋Œ์•„๊ฐ€.
โ€ฆ we land here in the nag code because I meanwhile used the goto button to come here
(removed from video for size)
์šฐ๋ฆฌ๋Š” nag code ๊ฐ€ ์žˆ๋Š” ์ด๊ณณ์— ๋„์ฐฉํ–ˆ๋‹ค. ์™œ๋ƒํ•˜๋ฉด ๋‚˜๋Š” goto button ์„ ๊ฐ€๊ธฐ ์œ„ํ•ด ์‚ฌ์šฉํ–ˆ๋‹ค.
(movie size ๋ฅผ ์ฃฟ์ด๊ธฐ ์œ„ํ•ด ์‚ญ์ œํ–ˆ๋‹ค.)
Told you to remember the address huh?
๋‚ด๊ฐ€ ์ด์•ผ๊ธฐํ–ˆ๋˜ ์ฃผ์†Œ ๊ธฐ์–ตํ•ด?
Remember this was the NAG?
Nag ์ด๋ผ๋Š”๊ฑธ ๊ธฐ์–ตํ•ด?
Of course, the BP's are not here anymore because the application was restarted under a different
name.
๋ฌผ๋กž, BP ๋Š” ์ด๊ณณ์— ๋” ์ด์ƒ ์—†๋‹ค. ์™œ๋ƒํ•˜๋ฉด application ์„ ๋‹ค๋ฅธ ์ด๋ฆ„์œผ๋กœ ์žฌ์‹œ์ž‘ ํ–ˆ๊ธฐ ๋•Œ๋ฌธ์ด๋‹ค.
I'll show you how it looked when we last left here :)
๋‚˜๋Š” ๋„ˆ์—๊ฒŒ ์šฐ๋ฆฌ๊ฐ€ ๋งˆ์ง€๋ง‰์— ๋จธ๋ฌผ๋ €๋˜ ์ด๊ณณ์„ ์–ด๋–ป๊ฒŒ ๋ณด๋Š”์ง€ ๋ณด์—ฌ์ฃฟ ๊ฒƒ์ด๋‹ค.
And also remember that we can NOP this right away, without needing to dig deeper in the dll
๊ทธ๋ฆฌ๊ณ  ๊ธฐ์–ตํ•ด. ์šฐ๋ฆฌ๋Š” NOP ์„ ํ•  ์ˆ˜ ์žˆ๋‹ค. Dll ์†์œผ๋กœ ๊นŠ์ด ๋“ค์–ด๊ฐ€๋Š” ๊ฒŒ ํ•„์š”ํ•˜์ง€ ์•Š๋‹ค.
Ok. Let's also make these changes permanent and save them to file
Ok. ์˜์›ํžˆ ๋ฐ”๊พธ์ž. ๊ทธ๋ฆฌ๊ณ  file ๋กœ ์ €์žฅํ•ด.
:)
:)
Let's immediately test the saved file
์ฆ‰์‹œ ์ €์žฅ๋œ file ์„ test ํ•˜์ž.
:)
Mmmm, this all seems all right, and now, what's with the closing nag ????
์Œ, ์ข‹์•„, ์ด์ œ, closing nag ์€ ์–ด๋–ป๊ฒŒ ๋์ง€?
Starting and closing nags are gone !!
Starting ๊ณผ closing nag ์ด ์—†์–ด์กŒ๋‹ค !!
The program is working like if it were registered.
๋“ฑ๋ก๋œ ๊ฒƒ์ฒ˜๋Ÿผ Program ์€ ์ผํ•œ๋‹ค.
6. Conclusion
์งˆ๋ฌธ
์ž˜ ์ดํ•ด๊ฐ€ ์•ˆ๋จ. ๋‹ค์‹œ ํ•œ ๋ฒˆ ํŒจ์น˜ํ•˜๋Š” ๋ถ€๋ถ„์„ ์ดํ•ดํ•ด์•ผ ๋จ. ์ ํ”„๋›ฐ๋Š” ๋ถ€๋ถ„์ด ์ž˜ ์ดํ•ด๊ฐ€ ์•ˆ๋ผ. ํ•œ๊ธ€ํŒ๋„
๋ณด๋ฉด์„œ ์ดํ•ดํ•ด ๋ณด์ž.
In this part 5, the primary goal was to get the feeling of the code, to understand how code is
executed.
์ด๋ฒˆ part 5 ์—์„œ๋Š”, ๊ฐ€์žฅ ์ค‘์š”ํ•œ ๋ชฉํ‘œ๋Š” code ์— ๋Œ€ํ•œ ๋Š๋‚Œ์„ ์–ป๋Š” ๊ฒƒ์ด๋‹ค. Code ๊ฐ€ ์–ด๋–ป๊ฒŒ
์‹คํ–‰๋˜๋Š”์ง€ ์ดํ•ดํ–ˆ์„ ๊ฒƒ์ด๋‹ค.
Also, we learned to find how and where to patch a program that shows visible other behaviour
when or when not registered by simple stepping and comparing the conditional jumps.
๋˜ํ•œ, ์šฐ๋ฆฌ๋Š” ์–ด๋–ป๊ฒŒ ์ฐพ๋Š”์ง€ program ์„ ํŒจ์น˜ํ•˜๋Š”์ง€ ๋ฐฐ์› ๋‹ค. ๋‹ค๋ฅธ behaviour ๋ฅผ ๋ณด์—ฌ์ฃพ๋‹ค. ๊ฐ‚๋‹จํ•œ
์ง‚ํ–‰๊ณผ ์กฐ๊ฑด jump ์˜ ๋น„๊ต์— ์˜ํ•ด ๋“ฑ๋ก ๋์„ ๋•Œ๋‚˜ ๋“ฑ๋ก๋ผ์ง€ ์•Š์•˜์„ ๋•Œ ๋ณด์—ฌ์ฃพ๋‹ค.
Meanwhile, we also learned something about animate over/in and setting different breakpoints.
๊ทธ ๋™์•ˆ, ์šฐ๋ฆฌ๋Š” ๋˜ํ•œ ๋ฌด์–ถ๊ฐ€๋ฅผ animate over/in ํ•˜๋Š” ๊ฒƒ๊ณผ ๋‹ค๋ฅธ breakpoint setting ๋ฒ•์„ ๋ฐฐ์› ๋‹ค.
I hope you understood everything fine and I also hope someone somewhere learned something
from this. See me back in part 06 ;)
๋ชจ๋“  ๊ฒƒ์„ ์ž˜ ์ดํ•ดํ–ˆ๊ธฐ๋ฅผ ๋ฐ”๋ž€๋‹ค. ๊ทธ๋ฆฌ๊ณ  ๋‚˜๋Š” ๋ˆ„๊ตฌ๋“ ์ง€ ์–ด๋Š ๊ณณ์—์„œ๋“ ์ง€ ์ด๊ฒƒ์—์„œ ๋ฌด์—‡์ด๋“ ์ง€
๋ฐฐ์› ๊ธฐ๋ฅผ ๋ฐ”๋ž€๋‹ค. Part 06 ์—์„œ ๋Œ์•„์˜ฌ ๊ฒƒ์ด๋‹ค
The other parts are available at
๋‹ค๋ฅธ parts ๋Š” ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•˜๋‹ค.
http://tinyurl.com/27dzdn (tuts4you)
http://tinyurl.com/r89zq (SnD Filez)
http://tinyurl.com/l6srv (fixdown)
Regards to all and especially to you for taking the time to look at this tutorial.
Lena151 (2006, updated 2007)
๋ชจ๋‘์—๊ฒŒ ์•ˆ๋ถ€๋ฅผ ์ ‚ํ•˜๊ณ  ํŠน๋ณ„ํžˆ ์ด tutorial ์— ์‹œ๊ฐ‚์„ ํˆฌ์žํ•ด์ฃพ ๋„ˆ์—๊ฒŒ ๊ฐ์‚ฌํ•œ๋‹ค.

More Related Content

Viewers also liked

แ„‡แ…ณแ„…แ…ตแ„‘แ…ตแ†ผ 2013แ„‚แ…งแ†ซ 4แ„‹แ…ฏแ†ฏ 1แ„Œแ…ฎแ„Žแ…ก แ„€แ…ณแ†ทแ„‹แ…ฒแ†ผแ„Œแ…ฅแ†ผแ„‡แ…ฉแ„แ…กแ†ฏแ„Žแ…ฑ by re4lfl0w
แ„‡แ…ณแ„…แ…ตแ„‘แ…ตแ†ผ 2013แ„‚แ…งแ†ซ 4แ„‹แ…ฏแ†ฏ 1แ„Œแ…ฎแ„Žแ…ก แ„€แ…ณแ†ทแ„‹แ…ฒแ†ผแ„Œแ…ฅแ†ผแ„‡แ…ฉแ„แ…กแ†ฏแ„Žแ…ฑ by re4lfl0wแ„‡แ…ณแ„…แ…ตแ„‘แ…ตแ†ผ 2013แ„‚แ…งแ†ซ 4แ„‹แ…ฏแ†ฏ 1แ„Œแ…ฎแ„Žแ…ก แ„€แ…ณแ†ทแ„‹แ…ฒแ†ผแ„Œแ…ฅแ†ผแ„‡แ…ฉแ„แ…กแ†ฏแ„Žแ…ฑ by re4lfl0w
แ„‡แ…ณแ„…แ…ตแ„‘แ…ตแ†ผ 2013แ„‚แ…งแ†ซ 4แ„‹แ…ฏแ†ฏ 1แ„Œแ…ฎแ„Žแ…ก แ„€แ…ณแ†ทแ„‹แ…ฒแ†ผแ„Œแ…ฅแ†ผแ„‡แ…ฉแ„แ…กแ†ฏแ„Žแ…ฑ by re4lfl0wre4lfl0w
ย 
Yogesh_Kadam
Yogesh_KadamYogesh_Kadam
Yogesh_KadamYogesh kadam
ย 
Malzilla tutorial2
Malzilla tutorial2Malzilla tutorial2
Malzilla tutorial2re4lfl0w
ย 
01.olly assembler patching a basic reverseme hangul
01.olly   assembler   patching a basic reverseme hangul01.olly   assembler   patching a basic reverseme hangul
01.olly assembler patching a basic reverseme hangulre4lfl0w
ย 
Who I Am
Who I AmWho I Am
Who I AmKameron_CHS
ย 
Journal Club for prosthodontics
Journal Club for prosthodonticsJournal Club for prosthodontics
Journal Club for prosthodonticsDr Mujtaba Ashraf
ย 
Tutorial bpocf
Tutorial bpocfTutorial bpocf
Tutorial bpocfkoeverstrep
ย 
Development of tongue, Speech & Prosthodontic consideration
Development of tongue, Speech & Prosthodontic considerationDevelopment of tongue, Speech & Prosthodontic consideration
Development of tongue, Speech & Prosthodontic considerationDr Mujtaba Ashraf
ย 
Tarnish & corrosion in dentistry
Tarnish & corrosion in dentistryTarnish & corrosion in dentistry
Tarnish & corrosion in dentistryDr Mujtaba Ashraf
ย 
Dental Casting alloy
Dental Casting alloyDental Casting alloy
Dental Casting alloyDr Mujtaba Ashraf
ย 
Physical properties of dental materials by Dr Mujtaba Ashraf
Physical properties of dental materials by Dr Mujtaba AshrafPhysical properties of dental materials by Dr Mujtaba Ashraf
Physical properties of dental materials by Dr Mujtaba AshrafDr Mujtaba Ashraf
ย 

Viewers also liked (12)

แ„‡แ…ณแ„…แ…ตแ„‘แ…ตแ†ผ 2013แ„‚แ…งแ†ซ 4แ„‹แ…ฏแ†ฏ 1แ„Œแ…ฎแ„Žแ…ก แ„€แ…ณแ†ทแ„‹แ…ฒแ†ผแ„Œแ…ฅแ†ผแ„‡แ…ฉแ„แ…กแ†ฏแ„Žแ…ฑ by re4lfl0w
แ„‡แ…ณแ„…แ…ตแ„‘แ…ตแ†ผ 2013แ„‚แ…งแ†ซ 4แ„‹แ…ฏแ†ฏ 1แ„Œแ…ฎแ„Žแ…ก แ„€แ…ณแ†ทแ„‹แ…ฒแ†ผแ„Œแ…ฅแ†ผแ„‡แ…ฉแ„แ…กแ†ฏแ„Žแ…ฑ by re4lfl0wแ„‡แ…ณแ„…แ…ตแ„‘แ…ตแ†ผ 2013แ„‚แ…งแ†ซ 4แ„‹แ…ฏแ†ฏ 1แ„Œแ…ฎแ„Žแ…ก แ„€แ…ณแ†ทแ„‹แ…ฒแ†ผแ„Œแ…ฅแ†ผแ„‡แ…ฉแ„แ…กแ†ฏแ„Žแ…ฑ by re4lfl0w
แ„‡แ…ณแ„…แ…ตแ„‘แ…ตแ†ผ 2013แ„‚แ…งแ†ซ 4แ„‹แ…ฏแ†ฏ 1แ„Œแ…ฎแ„Žแ…ก แ„€แ…ณแ†ทแ„‹แ…ฒแ†ผแ„Œแ…ฅแ†ผแ„‡แ…ฉแ„แ…กแ†ฏแ„Žแ…ฑ by re4lfl0w
ย 
Yogesh_Kadam
Yogesh_KadamYogesh_Kadam
Yogesh_Kadam
ย 
Malzilla tutorial2
Malzilla tutorial2Malzilla tutorial2
Malzilla tutorial2
ย 
01.olly assembler patching a basic reverseme hangul
01.olly   assembler   patching a basic reverseme hangul01.olly   assembler   patching a basic reverseme hangul
01.olly assembler patching a basic reverseme hangul
ย 
Who I Am
Who I AmWho I Am
Who I Am
ย 
Journal Club for prosthodontics
Journal Club for prosthodonticsJournal Club for prosthodontics
Journal Club for prosthodontics
ย 
Tutorial bpocf
Tutorial bpocfTutorial bpocf
Tutorial bpocf
ย 
Development of tongue, Speech & Prosthodontic consideration
Development of tongue, Speech & Prosthodontic considerationDevelopment of tongue, Speech & Prosthodontic consideration
Development of tongue, Speech & Prosthodontic consideration
ย 
Tarnish & corrosion in dentistry
Tarnish & corrosion in dentistryTarnish & corrosion in dentistry
Tarnish & corrosion in dentistry
ย 
Blood group
Blood groupBlood group
Blood group
ย 
Dental Casting alloy
Dental Casting alloyDental Casting alloy
Dental Casting alloy
ย 
Physical properties of dental materials by Dr Mujtaba Ashraf
Physical properties of dental materials by Dr Mujtaba AshrafPhysical properties of dental materials by Dr Mujtaba Ashraf
Physical properties of dental materials by Dr Mujtaba Ashraf
ย 

Similar to 05.comparing on changes in cond jumps, animate overin, breakpoints hangul

06.the plain stupid patching method, searching for textstrings hangul
06.the plain stupid patching method, searching for textstrings hangul06.the plain stupid patching method, searching for textstrings hangul
06.the plain stupid patching method, searching for textstrings hangulre4lfl0w
ย 
03.basic nag removal header problems hangul
03.basic nag removal   header problems hangul03.basic nag removal   header problems hangul
03.basic nag removal header problems hangulre4lfl0w
ย 
02.keyfiling the reverseme assembler hangul
02.keyfiling the reverseme  assembler hangul02.keyfiling the reverseme  assembler hangul
02.keyfiling the reverseme assembler hangulre4lfl0w
ย 
แ„‹แ…ตแ†ซแ„แ…ฅแ„…แ…ขแ†จ แ„‰แ…กแ„‹แ…ญแ†ผแ„‰แ…ฅแ†ผแ„‘แ…งแ†ผแ„€แ…กแ„‰แ…ณแ„แ…ณแ„…แ…ตแ†ธแ„แ…ณ แ„Žแ…ฌ์ข…
แ„‹แ…ตแ†ซแ„แ…ฅแ„…แ…ขแ†จ แ„‰แ…กแ„‹แ…ญแ†ผแ„‰แ…ฅแ†ผแ„‘แ…งแ†ผแ„€แ…กแ„‰แ…ณแ„แ…ณแ„…แ…ตแ†ธแ„แ…ณ แ„Žแ…ฌ์ข…แ„‹แ…ตแ†ซแ„แ…ฅแ„…แ…ขแ†จ แ„‰แ…กแ„‹แ…ญแ†ผแ„‰แ…ฅแ†ผแ„‘แ…งแ†ผแ„€แ…กแ„‰แ…ณแ„แ…ณแ„…แ…ตแ†ธแ„แ…ณ แ„Žแ…ฌ์ข…
แ„‹แ…ตแ†ซแ„แ…ฅแ„…แ…ขแ†จ แ„‰แ…กแ„‹แ…ญแ†ผแ„‰แ…ฅแ†ผแ„‘แ…งแ†ผแ„€แ…กแ„‰แ…ณแ„แ…ณแ„…แ…ตแ†ธแ„แ…ณ แ„Žแ…ฌ์ข…jiyein
ย 
์Šคํƒ€ํŠธ์—… ์ธํ„ด ๊ฐœ๋ฐœ์ž 3๋‹ฌ๊ฐ„์˜ ๊ณ ๊ตฐ๋ถ„ํˆฌ๊ธฐ ๊น€์€ํ–ฅ
์Šคํƒ€ํŠธ์—… ์ธํ„ด ๊ฐœ๋ฐœ์ž 3๋‹ฌ๊ฐ„์˜ ๊ณ ๊ตฐ๋ถ„ํˆฌ๊ธฐ ๊น€์€ํ–ฅ์Šคํƒ€ํŠธ์—… ์ธํ„ด ๊ฐœ๋ฐœ์ž 3๋‹ฌ๊ฐ„์˜ ๊ณ ๊ตฐ๋ถ„ํˆฌ๊ธฐ ๊น€์€ํ–ฅ
์Šคํƒ€ํŠธ์—… ์ธํ„ด ๊ฐœ๋ฐœ์ž 3๋‹ฌ๊ฐ„์˜ ๊ณ ๊ตฐ๋ถ„ํˆฌ๊ธฐ ๊น€์€ํ–ฅEunhyang Kim
ย 
์„ฑ์งˆ๊ธ‰ํ•œ ์”จ์˜ ํƒ€์ž„๋ผ์ธ ์ ์šฉ๊ธฐ
์„ฑ์งˆ๊ธ‰ํ•œ ์”จ์˜ ํƒ€์ž„๋ผ์ธ ์ ์šฉ๊ธฐ์„ฑ์งˆ๊ธ‰ํ•œ ์”จ์˜ ํƒ€์ž„๋ผ์ธ ์ ์šฉ๊ธฐ
์„ฑ์งˆ๊ธ‰ํ•œ ์”จ์˜ ํƒ€์ž„๋ผ์ธ ์ ์šฉ๊ธฐJaesup Jang
ย 
์„ฑ์งˆ ๊ธ‰ํ•œ J์”จ์˜ ํŽ˜์ด์Šค๋ถ ํƒ€์ž„๋ผ์ธ ์ ์šฉ๊ธฐ
์„ฑ์งˆ ๊ธ‰ํ•œ J์”จ์˜ ํŽ˜์ด์Šค๋ถ ํƒ€์ž„๋ผ์ธ ์ ์šฉ๊ธฐ์„ฑ์งˆ ๊ธ‰ํ•œ J์”จ์˜ ํŽ˜์ด์Šค๋ถ ํƒ€์ž„๋ผ์ธ ์ ์šฉ๊ธฐ
์„ฑ์งˆ ๊ธ‰ํ•œ J์”จ์˜ ํŽ˜์ด์Šค๋ถ ํƒ€์ž„๋ผ์ธ ์ ์šฉ๊ธฐJaesup Jang
ย 
Python Recipes for django girls seoul
Python Recipes for django girls seoulPython Recipes for django girls seoul
Python Recipes for django girls seoulJoeun Park
ย 
Script
ScriptScript
Scriptrururuadf
ย 
16 แ„’แ…กแ†จแ„‰แ…ฎแ†ฏแ„Œแ…ฆ แ„†แ…กแ„†แ…ฎแ„…แ…ต แ„Œแ…กแ„…แ…ญ
16 แ„’แ…กแ†จแ„‰แ…ฎแ†ฏแ„Œแ…ฆ แ„†แ…กแ„†แ…ฎแ„…แ…ต แ„Œแ…กแ„…แ…ญ16 แ„’แ…กแ†จแ„‰แ…ฎแ†ฏแ„Œแ…ฆ แ„†แ…กแ„†แ…ฎแ„…แ…ต แ„Œแ…กแ„…แ…ญ
16 แ„’แ…กแ†จแ„‰แ…ฎแ†ฏแ„Œแ…ฆ แ„†แ…กแ„†แ…ฎแ„…แ…ต แ„Œแ…กแ„…แ…ญJunyoung Jung
ย 
Light Tutorial Django
Light Tutorial DjangoLight Tutorial Django
Light Tutorial DjangoKwangyoun Jung
ย 
์ง ํ…Œ์ŠคํŠธ(Pair Testing) ์†Œ๊ฐœ์™€ ์‚ฌ๋ก€
์ง ํ…Œ์ŠคํŠธ(Pair Testing) ์†Œ๊ฐœ์™€ ์‚ฌ๋ก€์ง ํ…Œ์ŠคํŠธ(Pair Testing) ์†Œ๊ฐœ์™€ ์‚ฌ๋ก€
์ง ํ…Œ์ŠคํŠธ(Pair Testing) ์†Œ๊ฐœ์™€ ์‚ฌ๋ก€SangIn Choung
ย 
๊ตฌ๊ธ€์•ฑ์—”์ง„+์Šคํ”„๋ง+์Šคํ”„๋งdatajpa+๋ฉ”์ด๋ธ
๊ตฌ๊ธ€์•ฑ์—”์ง„+์Šคํ”„๋ง+์Šคํ”„๋งdatajpa+๋ฉ”์ด๋ธ๊ตฌ๊ธ€์•ฑ์—”์ง„+์Šคํ”„๋ง+์Šคํ”„๋งdatajpa+๋ฉ”์ด๋ธ
๊ตฌ๊ธ€์•ฑ์—”์ง„+์Šคํ”„๋ง+์Šคํ”„๋งdatajpa+๋ฉ”์ด๋ธ๋ผํ•œ์‚ฌ ์•„
ย 
์™ธ๊ณ„์–ด ์Šคํ„ฐ๋”” 1/5 - Overview
์™ธ๊ณ„์–ด ์Šคํ„ฐ๋”” 1/5 - Overview์™ธ๊ณ„์–ด ์Šคํ„ฐ๋”” 1/5 - Overview
์™ธ๊ณ„์–ด ์Šคํ„ฐ๋”” 1/5 - Overview๋ฏผํƒœ ๊น€
ย 
[๊ฐ•์˜์†Œ๊ฐœ] ์•ˆ๋“œ๋กœ์ด๋“œ ์•ฑ ๊ฐœ๋ฐœ ์ž…๋ฌธ ์บ ํ”„ 4๊ธฐ
[๊ฐ•์˜์†Œ๊ฐœ] ์•ˆ๋“œ๋กœ์ด๋“œ ์•ฑ ๊ฐœ๋ฐœ ์ž…๋ฌธ ์บ ํ”„ 4๊ธฐ[๊ฐ•์˜์†Œ๊ฐœ] ์•ˆ๋“œ๋กœ์ด๋“œ ์•ฑ ๊ฐœ๋ฐœ ์ž…๋ฌธ ์บ ํ”„ 4๊ธฐ
[๊ฐ•์˜์†Œ๊ฐœ] ์•ˆ๋“œ๋กœ์ด๋“œ ์•ฑ ๊ฐœ๋ฐœ ์ž…๋ฌธ ์บ ํ”„ 4๊ธฐFAST CAMPUS
ย 
[HYSS 2016] ์‰ฝ๊ณ  ๋น ๋ฅด๊ฒŒ ์‹œ์ž‘ํ•˜๋Š” Volatility Plugin ๊ฐœ๋ฐœ
[HYSS 2016] ์‰ฝ๊ณ  ๋น ๋ฅด๊ฒŒ ์‹œ์ž‘ํ•˜๋Š” Volatility Plugin ๊ฐœ๋ฐœ[HYSS 2016] ์‰ฝ๊ณ  ๋น ๋ฅด๊ฒŒ ์‹œ์ž‘ํ•˜๋Š” Volatility Plugin ๊ฐœ๋ฐœ
[HYSS 2016] ์‰ฝ๊ณ  ๋น ๋ฅด๊ฒŒ ์‹œ์ž‘ํ•˜๋Š” Volatility Plugin ๊ฐœ๋ฐœ๋™ํ˜„ ๊น€
ย 
[Kerference] ์‰ฝ๊ณ  ๋น ๋ฅด๊ฒŒ ์‹œ์ž‘ํ•˜๋Š” Volatility plugin ๊ฐœ๋ฐœ - ๊น€๋™ํ˜„(BoB)
[Kerference] ์‰ฝ๊ณ  ๋น ๋ฅด๊ฒŒ ์‹œ์ž‘ํ•˜๋Š” Volatility plugin ๊ฐœ๋ฐœ - ๊น€๋™ํ˜„(BoB)[Kerference] ์‰ฝ๊ณ  ๋น ๋ฅด๊ฒŒ ์‹œ์ž‘ํ•˜๋Š” Volatility plugin ๊ฐœ๋ฐœ - ๊น€๋™ํ˜„(BoB)
[Kerference] ์‰ฝ๊ณ  ๋น ๋ฅด๊ฒŒ ์‹œ์ž‘ํ•˜๋Š” Volatility plugin ๊ฐœ๋ฐœ - ๊น€๋™ํ˜„(BoB)NAVER D2
ย 
DebugIt/chapter1~4
DebugIt/chapter1~4DebugIt/chapter1~4
DebugIt/chapter1~4stupidfox
ย 
Native A/V
Native A/VNative A/V
Native A/VSungmin Park
ย 
๋„ค์ด๋ฒ„ SW๊ต์œก ๊ต์‚ฌ ์—ฐ์ˆ˜์ž๋ฃŒ_ ์†ก์ƒ์ˆ˜
๋„ค์ด๋ฒ„ SW๊ต์œก ๊ต์‚ฌ ์—ฐ์ˆ˜์ž๋ฃŒ_ ์†ก์ƒ์ˆ˜๋„ค์ด๋ฒ„ SW๊ต์œก ๊ต์‚ฌ ์—ฐ์ˆ˜์ž๋ฃŒ_ ์†ก์ƒ์ˆ˜
๋„ค์ด๋ฒ„ SW๊ต์œก ๊ต์‚ฌ ์—ฐ์ˆ˜์ž๋ฃŒ_ ์†ก์ƒ์ˆ˜Sangsu Song
ย 

Similar to 05.comparing on changes in cond jumps, animate overin, breakpoints hangul (20)

06.the plain stupid patching method, searching for textstrings hangul
06.the plain stupid patching method, searching for textstrings hangul06.the plain stupid patching method, searching for textstrings hangul
06.the plain stupid patching method, searching for textstrings hangul
ย 
03.basic nag removal header problems hangul
03.basic nag removal   header problems hangul03.basic nag removal   header problems hangul
03.basic nag removal header problems hangul
ย 
02.keyfiling the reverseme assembler hangul
02.keyfiling the reverseme  assembler hangul02.keyfiling the reverseme  assembler hangul
02.keyfiling the reverseme assembler hangul
ย 
แ„‹แ…ตแ†ซแ„แ…ฅแ„…แ…ขแ†จ แ„‰แ…กแ„‹แ…ญแ†ผแ„‰แ…ฅแ†ผแ„‘แ…งแ†ผแ„€แ…กแ„‰แ…ณแ„แ…ณแ„…แ…ตแ†ธแ„แ…ณ แ„Žแ…ฌ์ข…
แ„‹แ…ตแ†ซแ„แ…ฅแ„…แ…ขแ†จ แ„‰แ…กแ„‹แ…ญแ†ผแ„‰แ…ฅแ†ผแ„‘แ…งแ†ผแ„€แ…กแ„‰แ…ณแ„แ…ณแ„…แ…ตแ†ธแ„แ…ณ แ„Žแ…ฌ์ข…แ„‹แ…ตแ†ซแ„แ…ฅแ„…แ…ขแ†จ แ„‰แ…กแ„‹แ…ญแ†ผแ„‰แ…ฅแ†ผแ„‘แ…งแ†ผแ„€แ…กแ„‰แ…ณแ„แ…ณแ„…แ…ตแ†ธแ„แ…ณ แ„Žแ…ฌ์ข…
แ„‹แ…ตแ†ซแ„แ…ฅแ„…แ…ขแ†จ แ„‰แ…กแ„‹แ…ญแ†ผแ„‰แ…ฅแ†ผแ„‘แ…งแ†ผแ„€แ…กแ„‰แ…ณแ„แ…ณแ„…แ…ตแ†ธแ„แ…ณ แ„Žแ…ฌ์ข…
ย 
์Šคํƒ€ํŠธ์—… ์ธํ„ด ๊ฐœ๋ฐœ์ž 3๋‹ฌ๊ฐ„์˜ ๊ณ ๊ตฐ๋ถ„ํˆฌ๊ธฐ ๊น€์€ํ–ฅ
์Šคํƒ€ํŠธ์—… ์ธํ„ด ๊ฐœ๋ฐœ์ž 3๋‹ฌ๊ฐ„์˜ ๊ณ ๊ตฐ๋ถ„ํˆฌ๊ธฐ ๊น€์€ํ–ฅ์Šคํƒ€ํŠธ์—… ์ธํ„ด ๊ฐœ๋ฐœ์ž 3๋‹ฌ๊ฐ„์˜ ๊ณ ๊ตฐ๋ถ„ํˆฌ๊ธฐ ๊น€์€ํ–ฅ
์Šคํƒ€ํŠธ์—… ์ธํ„ด ๊ฐœ๋ฐœ์ž 3๋‹ฌ๊ฐ„์˜ ๊ณ ๊ตฐ๋ถ„ํˆฌ๊ธฐ ๊น€์€ํ–ฅ
ย 
์„ฑ์งˆ๊ธ‰ํ•œ ์”จ์˜ ํƒ€์ž„๋ผ์ธ ์ ์šฉ๊ธฐ
์„ฑ์งˆ๊ธ‰ํ•œ ์”จ์˜ ํƒ€์ž„๋ผ์ธ ์ ์šฉ๊ธฐ์„ฑ์งˆ๊ธ‰ํ•œ ์”จ์˜ ํƒ€์ž„๋ผ์ธ ์ ์šฉ๊ธฐ
์„ฑ์งˆ๊ธ‰ํ•œ ์”จ์˜ ํƒ€์ž„๋ผ์ธ ์ ์šฉ๊ธฐ
ย 
์„ฑ์งˆ ๊ธ‰ํ•œ J์”จ์˜ ํŽ˜์ด์Šค๋ถ ํƒ€์ž„๋ผ์ธ ์ ์šฉ๊ธฐ
์„ฑ์งˆ ๊ธ‰ํ•œ J์”จ์˜ ํŽ˜์ด์Šค๋ถ ํƒ€์ž„๋ผ์ธ ์ ์šฉ๊ธฐ์„ฑ์งˆ ๊ธ‰ํ•œ J์”จ์˜ ํŽ˜์ด์Šค๋ถ ํƒ€์ž„๋ผ์ธ ์ ์šฉ๊ธฐ
์„ฑ์งˆ ๊ธ‰ํ•œ J์”จ์˜ ํŽ˜์ด์Šค๋ถ ํƒ€์ž„๋ผ์ธ ์ ์šฉ๊ธฐ
ย 
Python Recipes for django girls seoul
Python Recipes for django girls seoulPython Recipes for django girls seoul
Python Recipes for django girls seoul
ย 
Script
ScriptScript
Script
ย 
16 แ„’แ…กแ†จแ„‰แ…ฎแ†ฏแ„Œแ…ฆ แ„†แ…กแ„†แ…ฎแ„…แ…ต แ„Œแ…กแ„…แ…ญ
16 แ„’แ…กแ†จแ„‰แ…ฎแ†ฏแ„Œแ…ฆ แ„†แ…กแ„†แ…ฎแ„…แ…ต แ„Œแ…กแ„…แ…ญ16 แ„’แ…กแ†จแ„‰แ…ฎแ†ฏแ„Œแ…ฆ แ„†แ…กแ„†แ…ฎแ„…แ…ต แ„Œแ…กแ„…แ…ญ
16 แ„’แ…กแ†จแ„‰แ…ฎแ†ฏแ„Œแ…ฆ แ„†แ…กแ„†แ…ฎแ„…แ…ต แ„Œแ…กแ„…แ…ญ
ย 
Light Tutorial Django
Light Tutorial DjangoLight Tutorial Django
Light Tutorial Django
ย 
์ง ํ…Œ์ŠคํŠธ(Pair Testing) ์†Œ๊ฐœ์™€ ์‚ฌ๋ก€
์ง ํ…Œ์ŠคํŠธ(Pair Testing) ์†Œ๊ฐœ์™€ ์‚ฌ๋ก€์ง ํ…Œ์ŠคํŠธ(Pair Testing) ์†Œ๊ฐœ์™€ ์‚ฌ๋ก€
์ง ํ…Œ์ŠคํŠธ(Pair Testing) ์†Œ๊ฐœ์™€ ์‚ฌ๋ก€
ย 
๊ตฌ๊ธ€์•ฑ์—”์ง„+์Šคํ”„๋ง+์Šคํ”„๋งdatajpa+๋ฉ”์ด๋ธ
๊ตฌ๊ธ€์•ฑ์—”์ง„+์Šคํ”„๋ง+์Šคํ”„๋งdatajpa+๋ฉ”์ด๋ธ๊ตฌ๊ธ€์•ฑ์—”์ง„+์Šคํ”„๋ง+์Šคํ”„๋งdatajpa+๋ฉ”์ด๋ธ
๊ตฌ๊ธ€์•ฑ์—”์ง„+์Šคํ”„๋ง+์Šคํ”„๋งdatajpa+๋ฉ”์ด๋ธ
ย 
์™ธ๊ณ„์–ด ์Šคํ„ฐ๋”” 1/5 - Overview
์™ธ๊ณ„์–ด ์Šคํ„ฐ๋”” 1/5 - Overview์™ธ๊ณ„์–ด ์Šคํ„ฐ๋”” 1/5 - Overview
์™ธ๊ณ„์–ด ์Šคํ„ฐ๋”” 1/5 - Overview
ย 
[๊ฐ•์˜์†Œ๊ฐœ] ์•ˆ๋“œ๋กœ์ด๋“œ ์•ฑ ๊ฐœ๋ฐœ ์ž…๋ฌธ ์บ ํ”„ 4๊ธฐ
[๊ฐ•์˜์†Œ๊ฐœ] ์•ˆ๋“œ๋กœ์ด๋“œ ์•ฑ ๊ฐœ๋ฐœ ์ž…๋ฌธ ์บ ํ”„ 4๊ธฐ[๊ฐ•์˜์†Œ๊ฐœ] ์•ˆ๋“œ๋กœ์ด๋“œ ์•ฑ ๊ฐœ๋ฐœ ์ž…๋ฌธ ์บ ํ”„ 4๊ธฐ
[๊ฐ•์˜์†Œ๊ฐœ] ์•ˆ๋“œ๋กœ์ด๋“œ ์•ฑ ๊ฐœ๋ฐœ ์ž…๋ฌธ ์บ ํ”„ 4๊ธฐ
ย 
[HYSS 2016] ์‰ฝ๊ณ  ๋น ๋ฅด๊ฒŒ ์‹œ์ž‘ํ•˜๋Š” Volatility Plugin ๊ฐœ๋ฐœ
[HYSS 2016] ์‰ฝ๊ณ  ๋น ๋ฅด๊ฒŒ ์‹œ์ž‘ํ•˜๋Š” Volatility Plugin ๊ฐœ๋ฐœ[HYSS 2016] ์‰ฝ๊ณ  ๋น ๋ฅด๊ฒŒ ์‹œ์ž‘ํ•˜๋Š” Volatility Plugin ๊ฐœ๋ฐœ
[HYSS 2016] ์‰ฝ๊ณ  ๋น ๋ฅด๊ฒŒ ์‹œ์ž‘ํ•˜๋Š” Volatility Plugin ๊ฐœ๋ฐœ
ย 
[Kerference] ์‰ฝ๊ณ  ๋น ๋ฅด๊ฒŒ ์‹œ์ž‘ํ•˜๋Š” Volatility plugin ๊ฐœ๋ฐœ - ๊น€๋™ํ˜„(BoB)
[Kerference] ์‰ฝ๊ณ  ๋น ๋ฅด๊ฒŒ ์‹œ์ž‘ํ•˜๋Š” Volatility plugin ๊ฐœ๋ฐœ - ๊น€๋™ํ˜„(BoB)[Kerference] ์‰ฝ๊ณ  ๋น ๋ฅด๊ฒŒ ์‹œ์ž‘ํ•˜๋Š” Volatility plugin ๊ฐœ๋ฐœ - ๊น€๋™ํ˜„(BoB)
[Kerference] ์‰ฝ๊ณ  ๋น ๋ฅด๊ฒŒ ์‹œ์ž‘ํ•˜๋Š” Volatility plugin ๊ฐœ๋ฐœ - ๊น€๋™ํ˜„(BoB)
ย 
DebugIt/chapter1~4
DebugIt/chapter1~4DebugIt/chapter1~4
DebugIt/chapter1~4
ย 
Native A/V
Native A/VNative A/V
Native A/V
ย 
๋„ค์ด๋ฒ„ SW๊ต์œก ๊ต์‚ฌ ์—ฐ์ˆ˜์ž๋ฃŒ_ ์†ก์ƒ์ˆ˜
๋„ค์ด๋ฒ„ SW๊ต์œก ๊ต์‚ฌ ์—ฐ์ˆ˜์ž๋ฃŒ_ ์†ก์ƒ์ˆ˜๋„ค์ด๋ฒ„ SW๊ต์œก ๊ต์‚ฌ ์—ฐ์ˆ˜์ž๋ฃŒ_ ์†ก์ƒ์ˆ˜
๋„ค์ด๋ฒ„ SW๊ต์œก ๊ต์‚ฌ ์—ฐ์ˆ˜์ž๋ฃŒ_ ์†ก์ƒ์ˆ˜
ย 

05.comparing on changes in cond jumps, animate overin, breakpoints hangul

  • 1. 05.Comparing on changes in cond jumps, animate over/in, breakpoints 2012 ๋…„ 1 ์›” 28 ์ผ ํ† ์š”์ผ ์˜คํ›„ 1:16 Hello everybody. ๋ชจ๋‘๋“ค ์•ˆ๋…• Welcome to this Part 5 in my series about reversing for newbies/beginners. ๋‚˜์˜ ์ดˆ๋ณด์ž๋ฅผ ์œ„ํ•œ reversing series Part 5 ์— ์™€์„œ ๋ฐ˜๊ฐ€์›Œ. This "saga" is intended for complete starters in reversing, also for those without any programming experience at all. ์ด "saga"๋Š” ์™„๋ฒฝํžˆ reversing ์ดˆ๋ณด์ž๋ฅผ ๋งž์ถฐ์„œ ๋งŠ๋“ค์–ด์กŒ๋‹ค. ๋˜ํ•œ ์–ด๋– ํ•œ programming ๊ฒฝํ—˜์ด ์—†์–ด๋„ ๋œ๋‹ค. Lena151 (2006) 1. Abstract In this Part 5, we will reverse a "real" application to learn something about finding the places to patch. ์ด๋ฒˆ Part 5 ์—์„œ, ์šฐ๋ฆฌ๋Š” "real" application ์„ ๋ฌด์–ถ๊ฐ€๋ฅผ ๋ฐฐ์šฐ๊ณ  patch ๋ฅผ ์ฐพ๊ธฐ ์œ„ํ•ด reverse ํ•œ๋‹ค. That is because indeed, the best practice is found in the real applications. ์ด๊ฒƒ์€ real application ์—์„œ ๋งค์šฐ ์ข‹์€ ๋ฐฉ๋ฒ•์„ ์ฐพ์•˜๋‹ค. For better comprehension, I advise you to first see the first parts in this series before looking at this if you are a newbie. ์ดํ•ด๋ ฅ์„ ์œ„ํ•ด ์ข‹๋‹ค, ๋„ค๊ฐ€ newbie ๋ผ๋ฉด ์ด movie ๋ฅผ ๋ณด๊ธฐ ์ ‚์— ์ด series ์˜ ์ฒซ๋ฒˆ์งธ part ๋ถ€ํ„ฐ ๋ด. The goal of this tutorial is to teach you something about a program's behaviour In my search not to harm anybody, I came across Coffeecup Visualsite Designer. ์ด tutorial ์˜ ๋ชฉํ‘œ๋Š” ๋ˆ„๊ตฌ์—๊ฒŒ๋“ ์ง€ ํ•ด๋ฅผ ์ฃผ์ง€ ์•Š๋Š” ๋ฒ”์œ„ ๋‚ด์—์„œ ๋„ˆ์—๊ฒŒ program ์˜ ํ–‰๋™์„ ๊ฐ€๋ฅด์น˜๋Š” ๊ฒƒ์ด๋‹ค. ๋‚˜๋Š” Coffeecup Visualsite Designer ๋ฅผ ๋ด์™”๋‹ค. This is a program not updated since 11/2003 and thus probably no longer updated. ์ด program ์€ 2003/11 ์ดํ›„๋กœ update ๋˜์ง€ ์•Š์•˜๊ณ  ์•„๋งˆ ๋” ์ด์ƒ update ๋˜์ง€ ์•Š๋Š”๋‹ค. However, because it could be misused, I only included the main executable and some more necessary dll's to run (not the install exe !) for your research in the shown techniques. ๊ทธ๋Ÿฌ๋‚˜, ๋‚จ์šฉํ•˜์ง€ ๋ง์ž, ๋ณด์—ฌ์ฃพ technique ์—์„œ ๋„ˆ์˜ ์—ฐ๊ตฌ๋ฅผ ์œ„ํ•ด ์˜ค์ง main executable ๊ณผ ์‹คํ–‰ํ•˜๊ธฐ ์œ„ํ•ด ํ•„์š”ํ•œ ์•ฝ๊ฐ‚์˜ dll ์„ ํฌํ•จํ–ˆ๋‹ค.(install exe ๋Š” ์—†๋‹ค) This makes the program useless for other purposes then study material. Taking a look in the specialized media, I also found this application to be "cracked" numerous times before. ์ด๊ฒƒ์€ ๋‹ค๋ฅธ ๋ชฉ์ ์œผ๋กœ ์“ธ๋ชจ ์—†๋Š” program ์„ ๋งŠ๋“ญ๋‹ˆ๋‹ค. ํŠน๋ณ„ํ•œ media ๋ฅผ ๋ด, ๋‚˜๋Š” application ์ด ๋ง‹์ด "crack"๋œ ๊ฒƒ์„ ์ฐพ์•˜๋‹ค.
  • 2. Although the registration is not important because the app has no limitations in unregistered state, the patches will also "register" the app by securing the app to run always. ๋“ฑ๋ก์ด ์•ˆ๋œ ์ƒํƒœ์ž„์—๋„ ๋ถˆ๊ตฌํ•˜๊ณ  Registration ์€ ์ค‘์š”ํ•˜์ง€ ์•Š๋‹ค. ์™œ๋ƒํ•˜๋ฉด app ์€ ์ œํ•œ์ด ์—†๋‹ค. Patches ๋Š” ํ•ญ์ƒ ์‹คํ–‰ํ•˜๊ธฐ ์œ„ํ•ด ๋ณดํ˜ธ๋œ app ์— ์˜ํ•ด app ์„ ๋“ฑ๋กํ•œ๋‹ค. Here, this application is only picked because it is ideal for this tutorial in reversing and it is targeted for educational purposes only. ์—ฌ๊ธฐ, ์ด application ์€ ์„ ๋ฐœ๋๋‹ค. ์™œ๋ƒํ•˜๋ฉด ์ด๊ฒƒ์€ reversing tutorial ์— ์ด์ƒ์ ์ด๊ณ  ์˜ค์ง ๊ต์œก์ ์ธ ๋ชฉ์ ์ธ target ์ด๋‹ค. I hope you will exploit your newly acquired knowledge in a positive way. ๋„ค๊ฐ€ ์ƒˆ๋กœ ์–ป์€ ์ง€์‹์„ ๊ธ์ •์ ์ธ ๋ฐฉํ–ฅ์œผ๋กœ ์ด์šฉํ•˜๊ธฐ๋ฅผ ๋ฐ”๋ž€๋‹ค. In this matter, I also want to refer to Part 1. ์ด ๋ฌธ์ œ๋Š”, part 1 ์„ ์ฐธ๊ณ ํ•˜๊ธฐ๋ฅผ ๋ฐ”๋ž€๋‹ค. ์ด๊ฒƒ๋„ ๋˜‘๊ฐ™์Œ Set your screen resolution to 1152*864 and press F11 to see the movie full screen !!! Again, I have made this movie interactive. You screen ํ•ด์ƒ๋„๋ฅผ 1152*864 ๋กœ ์„ค์ •ํ•ด ๊ทธ๋ฆฌ๊ณ  full screen ์œผ๋กœ movie ๋ฅผ ๋ณด๊ธฐ ์œ„ํ•ด F11 ๋ฅผ ๋ˆŒ๋Ÿฌ So, if you are a fast reader and you want to continue to the next screen, just click here on this invisible hotspot. You don't see it, but it IS there on text screens. ๊ทธ๋ž˜์„œ, ๋„ค๊ฐ€ ์ด๊ฒƒ์„ ๋นจ๋ฆฌ ์ฝ๊ณ  ๋‹ค์Œ screen ์„ ๋ณด๊ณ  ์‹ถ๋‹ค๋ฉด, ๋ณด์ด๋Š” hotspot ์—ฌ๊ธฐ๋ฅผ ๋ˆŒ๋Ÿฌ. ๋ณด๊ณ  ์‹ถ์ง€ ์•Š์„ ๋•Œ๋Š” ์—ฌ๊ธฐ์— ๋‘์ง€๋งˆ. Then the movie will skip the text and continue with the next screen. Movie ๋Š” text ์™€ ๋‹ค์Œ screen ์„ skip ํ•  ์ˆ˜ ์žˆ๋‹ค. If something is not clear or goes too fast, you can always use the control buttons and the slider below on this screen. ๋ฌด์–ถ๊ฐ€ ๋ช…ํ™•ํ•˜์ง€ ์•Š๊ฑฐ๋‚˜ ๋นจ๋ฆฌ ๋„˜๊ธฐ๊ณ ์ž ํ•  ๋•Œ, ํ•ญ์ƒ control button ๊ณผ ์ด screen ๋ฐ‘์— ์žˆ๋Š” slider ๋ฐ”๋ฅผ ์‚ฌ์šฉํ•ด. He, try it out and click on the hotspot to skip this text and to go to the next screen now!!! ๋„์ ‚ํ•ด๋ด. ๊ทธ๋ฆฌ๊ณ  ์ด text ์™€ ๋‹ค์Œ screen ์„ ๋ณด๊ธฐ ์œ„ํ•ด hotspot ์„ click ํ•ด. During the whole movie you can click this spot to leave immediately ์ด movie ์–ด๋””์—์„œ๋‚˜ ์ฆ‰์‹œ ๋– ๋‚˜๊ธฐ ์œ„ํ•ด ์ด spot ์„ click ํ•  ์ˆ˜ ์žˆ๋‹ค. 2. Tools and target ์ด๊ฒƒ๋„ ๋˜‘๊ฐ™์Œ The tools for today are : Ollydebug andโ€ฆ your brain. ์˜ค๋Š˜ ๋„๊ตฌ๋“ค์€ Ollydebug ์™€ ๋„ˆ์˜ ๋‘๋‡Œ์•ผ. The first can be obtained for free at
  • 3. ์ฒซ๋ฒˆ์งธ ๋ฌด๋ฃŒ๋กœ ์–ป์„ ์ˆ˜ ์žˆ๋‹ค. http://www.ollydbg.de Again, the second is your responsibility ๋‹ค์‹œ ํ•œ๋ฒˆ, ๋‘ ๋ฒˆ์งธ๋Š” ๋„ˆ์˜ ์ฑ…์ž„๊ฐ์ด๋‹ค. Todays target is a program called Coffecup Visualsite Designer 3.0. It is a program to design websites in the WYSIWYG system. ์˜ค๋Š˜ target program ์€ Coffeecup Visualsite Designer 3.0 ์œผ๋กœ ๋ถˆ๋ฆฐ๋‹ค. ๊ทธ๊ฒƒ์€ WYSIWYG system ์—์„œ website ๋ฅผ design ํ•˜๊ธฐ ์œ„ํ•œ program ์ด๋‹ค. I included the main exe and the needed dll's to run the program for your research ๋‚˜๋Š” main exe ๋ฅผ ์ฒจ๋ถ€ํ–ˆ๋‹ค. ๊ทธ๋ฆฌ๊ณ  ๋„ˆ์˜ ์—ฐ๊ตฌ๋ฅผ ์œ„ํ•ด program ์„ ์‹คํ–‰ํ•˜๊ธฐ ์œ„ํ•ด dll ์ด ํ•„์š”ํ•˜๋‹ค. 3. Behaviour of the program Let's study that together. Run the application in Olly. ํ•จ๊ป˜ ๊ณต๋ถ€๋ฅผ ์‹œ์ž‘ํ•˜์ž. Olly ์—์„œ application ์„ ์‹คํ–‰ ํ•ด. First shows a nag screen saying that this is a trial version. ๋จผ์ €, nag scree ์€ trial version ๋ผ๋Š” ๊ฒƒ์„ ๋ณด์—ฌ์ฃพ๋‹ค. Which asks us to buy now ํ˜„์žฌ ์‚ฌ๊ฒ ๋ƒ๊ณ  ๋ฌป๋Š”๋‹ค. And telling us that we can try this program 10 times (this is the first startup) ๊ทธ๋ฆฌ๊ณ  ์šฐ๋ฆฌ๊ฐ€ program ์„ 10 ํšŒ ์‹คํ–‰ํ•  ์ˆ˜ ์žˆ๋‹ค๊ณ  ๋งํ•œ๋‹ค.(์ œ์ผ ์ฒ˜์Œ์— ์‹คํ–‰ ๋์„ ๋•Œ)
  • 4. I want to emphasize once again that all this also proves that at this point, the program must already have made a check ๋‚˜๋Š” ์ด๊ฒƒ์„ ๋‹ค์‹œ ํ•œ ๋ฒˆ ๊ฐ•์กฐํ•˜๊ธฐ ์œ„ํ•ด ํ–ˆ๋‹ค. ๋˜ํ•œ point ๋ฅผ ์ฆ๋ช…ํ•œ๋‹ค. Program ์€ ์ด๋ฏธ check ๋ฅผ ํ–ˆ๋‹ค. "Am I registered or not ?" ๋“ฑ๋ก๋๋ƒ? ์•ˆ๋๋ƒ? If registered, this nag can't be shown !!! ๋งŠ์•ฝ์— ๋“ฑ๋ก ๋˜์—ˆ๋‹ค๋ฉด, nag ์€ ๋ณด์ด์ง€ ์•Š๋Š”๋‹ค. INFO : Keep your mouse pointer here and click whenever you are ready reading on each textscreen Mouse pointer ๋ฅผ ์—ฌ๊ธฐ์— ์œ ์ง€ํ•ด. ๋„ค๊ฐ€ textscreen ์„ ์ฝ์—ˆ์„ ๋•Œ click ํ•ด. For now, let's continue studying the program ์ด์ œ, program ์„ ๋ฐฐ์šฐ์ž. Then comes some welcome message with wizard facilities. It is not important for us, so let's skip this screen for next times. ํ™–์˜ message ๊ฐ€ ๋งˆ๋ฒ•์ ์ธ ์„ค๋น„์™€ ํ•จ๊ป˜ ์˜จ๋‹ค. ๊ทธ๊ฒƒ์€ ์šฐ๋ฆฌ์—๊ฒŒ ์ค‘์š”ํ•˜์ง€ ์•Š๋‹ค, ๊ทธ๋ž˜์„œ ๋‹ค์Œ์—๋Š” ์ด screen ์„ skip ํ•œ๋‹ค. So now, we can see the program. Let's also dig a little deeper. ์ด์ œ, ์šฐ๋ฆฌ๋Š” program ์„ ๋ณผ ์ˆ˜ ์žˆ๋‹ค. ์กฐ๊ธˆ ๊นŠ๊ฒŒ ๋“ค์–ด๊ฐ€์ž. Although the website states the application was updated 2003, here it says 2000 โ€ฆ.. Website state ์—์„œ 2003 ๋…„๋„์— update ๋ผ๊ณ  ํ•˜๋Š”๋ฐ ์ด๊ณณ์€ 2000 ์ด๋ผ๊ณ  ๋งํ•œ๋‹ค. Ok, I suppose we know enough? Ok, ์šฐ๋ฆฌ๋Š” ์ถฉ๋ถ„ํžˆ ์•Œ์•˜๋‹ค๊ณ  ์ƒ๊ฐํ•˜์ง€? Oops. Aha, there is also an ugly advertising screen as closing nag. It will be a nice feature to test our reversing capabilities. ์›์Šค. ์•„ํ•˜, ๊ทธ๊ณณ์€ ๋˜ํ•œ closing nag ํ•  ๋•Œ ๋ชป ๋œ ๊ด‘๊ณ  screen ์ด ์žˆ๋‹ค. ์ด๊ฒƒ์€ ์šฐ๋ฆฌ์˜ reversing ๋Šฅ๋ ฅ์„ test ํ•˜๊ธฐ ์œ„ํ•œ ์ข‹์€ ํ˜„์ƒ์ด๋‹ค. Fine, let's study all this better in the code. ์ข‹์•„, code ๋ฅผ study ํ•˜์ž. So, restart the application until you โ€ฆ โ€ฆ land here in Olly, at the EP of the program ๊ทธ๋ž˜์„œ, program ์˜ EP ์ธ ์—ฌ๊ธฐ์— ๋„์ฐฉํ•  ๋•Œ๊นŒ์ง€ application ์„ restart ํ•ด๋ผ.
  • 5. 4. Finding the patches In this Part5, I will show you how to manually find the patches to make in an application. ์ด๋ฒˆ Part5 ๋Š”, ๋„ˆ์—๊ฒŒ application ์—์„œ ์–ด๋–ป๊ฒŒ ์ˆ˜๋™์œผ๋กœ patch ๋ฅผ ์ฐพ์•„์•ผ ํ•˜๋Š”์ง€ ๋ณด์—ฌ์ฃผ๊ฒ ๋‹ค. Let's think that over first. If a program shows a behaviour that changes when registered or not, then โ€ฆ there also must be changes in the code followed, right? ๋จผ์ € ์ƒ๊ฐํ•ด๋ด. ๋งŠ์•ฝ์— ๋“ฑ๋กํ–ˆ๊ฑฐ๋‚˜ ๋“ฑ๋กํ•˜์ง€ ์•Š์•˜์„ ๋•Œ program ์€ ๋ฐ”๋€ ํ–‰๋™์„ ๋ณด์—ฌ์ฃพ๋‹ค. ๋˜ํ•œ code ์—์„œ ๋ฐ”๋€ ์ ์ด ์žˆ๋‹ค. Other behaviour ==> other code followed !! ์šฐ๋ฆฌ์˜ ํ–‰๋™ ==> ์šฐ๋ฆฌ์˜ code ๋ฅผ ๋”ฐ๋ผ ๋‹ค๋‹Œ๋‹ค. An example will make this more clear : the nags that are shown in this application, are only shown when NOT registered. ์ด example ์€ ๋ช…ํ™•ํ•˜๊ฒŒ ๋งŠ๋“ ๋‹ค : ์˜ค์ง ๋“ฑ๋ก๋˜์ง€ ์•Š์•˜์„ ๋•Œ nags ๋Š” application ์—์„œ ๋‚˜ํƒ€๋‚œ๋‹ค. So, there must be some conditional jumps somewhere as follows : (or similar, this is example) Unregistered --> don't jump Registered --> jump past nag ๊ทธ๋ž˜์„œ, ์•ฝ๊ฐ‚์˜ ์กฐ๊ฑด jump ๋Š” ์žˆ๋‹ค. ๋”ฐ๋ผ ๋‹ค๋‹ ๋•Œ ( ๋น„์Šทํ•˜๊ฑฐ๋‚˜, ์ด ์˜ˆ์ œ) ๋ฏธ๋“ฑ๋ก --> No jump ๋“ฑ๋ก --> nag ์„ jump Now, if we can find these conditional jumps โ€ฆ ์ด์ œ, ์šฐ๋ฆฌ๋Š” ๋‹ค๋ฅธ ์กฐ๊ฑด jump ๋ฅผ ์ฐพ์„ ์ˆ˜ ์žˆ๋‹ค. We also immediately find an indication for the registration scheme : just before the conditional jump, there will be a compare to see if the program is already registered. ์šฐ๋ฆฌ๋Š” ๋˜ํ•œ ๋“ฑ๋ก๋œ scheme ์„ ์œ„ํ•ด ์ฆ‰์‹œ ์ง€์‹œ์ž๋ฅผ ์ฐพ์„ ์ˆ˜ ์žˆ๋‹ค. ๊ทธ๋Ÿฌ๊ณ ๋‚˜์„œ ์กฐ๊ฑด jump ํ•œ๋‹ค. Program ์ด ์ด๋ฏธ ๋“ฑ๋ก๋˜์–ด ์žˆ๋‹ค๋ฉด ๊ทธ๊ฒƒ์€ ๋ณด๊ธฐ ์œ„ํ•ด ๋น„๊ต๋๋‹ค. We need to find that !! ์šฐ๋ฆฌ๋Š” ๊ทธ๊ฒƒ์„ ์ฐพ๊ธฐ ์œ„ํ•ด ํ•„์š”ํ•˜๋‹ค. Remark : when I say "conditional jump", I also include the variable jumps. A variable jump is for example JMP eax+1C ์ฃผ๋ชฉ : "conditional jump"๋ฅผ ๋งํ•  ๋•Œ, ๋‚˜๋Š” ๋‹ค์–‘ํ•œ jump ๋ฅผ ํฌํ•จํ–ˆ๋‹ค. ๋ณ€์ˆ˜ jump ๋Š” ์ด example ์—์„œ JMP EAX+1C ๋‹ค. In this case, depending on a changing value for EAX if registered or not, it could jump the nag or not. ๋“ฑ๋กํ•˜๊ฑฐ๋‚˜ ๋“ฑ๋กํ•˜์ง€ ์•Š์€ ๊ฒฝ์šธ, EAX ์˜ ๋ณ€ํ™”๋˜๋Š” ๊ฐ’์— ์˜์กด์ ์ด๋‹ค. ๊ทธ๊ฒƒ์€ nag ์„ jump ํ•  ์ˆ˜ ์žˆ๊ฑฐ๋‚˜ ์—†๋‹ค. Example : when not registered, EAX holds the value 00401354
  • 6. ์˜ˆ : ๋“ฑ๋ก๋˜์ง€ ์•Š์•˜์„ ๋•Œ, EAX ๋Š” 00401354 ๋ฅผ ์žก๊ณ  ์žˆ๋‹ค. when registered, EAX holds the value 004013A0 which could jump past the nag. Don't forget them in the future !!! BTW, there are none here in this program. ๋“ฑ๋ก๋˜์—ˆ์„ ๋•Œ, EAX ๋Š” 004013A0 ๋ฅผ ์žก๊ณ  ์žˆ๋‹ค. ๊ทธ๊ฒƒ์€ past nag ์„ jump ํ•  ์ˆ˜ ์žˆ๋‹ค. ๊ทธ๊ฒƒ์„ ๋ฏธ๋ž˜์—๋„ ์žŠ์ง€๋งˆ !!! By the way, ๊ทธ๊ฒƒ์€ ์ด program ์— ์—†๋‹ค. What have we done so far? We studied the behaviour from the program, but I have also already restarted the program in Olly and done some work ์šฐ๋ฆฌ๋Š” ์ง€๊ธˆ๊นŒ์ง€ ๋ฌด์—‡์„ ํ–ˆ๋‚˜? ์šฐ๋ฆฌ๋Š” program ์œผ๋กœ๋ถ€ํ„ฐ behaviour ๋ฅผ ๋ฐฐ์› ๋‹ค. ๊ทธ๋Ÿฌ๋‚˜ ๋‚˜๋Š” ์ด๋ฏธ program ์„ restart ํ–ˆ๋‹ค. ๊ทธ๋ฆฌ๊ณ  ์•ฝ๊ฐ‚์˜ ์ผ์„ ๋๋ƒˆ๋‹ค. : I also stepped the app completely, starting at the EP and stepping F8 and F7 "Through" the first nag, "through" the main program and through the closing nag, Exactly like I will do once more now. ๋‚˜๋Š” app ์„ ์™„๋ฒฝํžˆ step ํ–ˆ๋‹ค. EP ์—์„œ ์‹œ์ž‘ํ•˜๋Š” ๊ฒƒ๊ณผ F8 ์„ ๋ˆŒ๋Ÿฌ stepping ํ•˜๊ณ  F7 ์„ ๋ˆŒ๋Ÿฌ ์ฒซ๋ฒˆ์งธ nag ์„ ํ†ต๊ณผํ•˜์—ฌ, main program ์„ ํ†ต๊ณผํ•˜๊ณ  closing nag ์„ ํ†ต๊ณผํ•œ๋‹ค. ์ •ํ™•ํžˆ ๋‚˜๋Š” ํ•œ ๋ฒˆ ๋” ํ•˜๋Š” ๊ฒƒ์ด๋‹ค. But I have removed it from this movie to reduce its size and to skip repetitive tasks. ๋‚˜๋Š” ์ด movie ์—์„œ size ๋ฅผ ์ฃฟ์ด๊ณ  ๋ฐ˜๋ณต์ ์ธ ์ž„๋ฌด๋ฅผ ์‚ญ์ œํ–ˆ๋‹ค. Important : I have studied all conditional jumps (+ variable) and noted down if they jump or not !!!! ์ค‘์š” : ๋‚˜๋Š” ๋ชจ๋“  ์กฐ๊ฑด jump ๋ฅผ ๊ณต๋ถ€ํ–ˆ๋‹ค. ๊ทธ๋ฆฌ๊ณ  ๊ทธ๊ฒƒ์ด jump ํ•˜๋Š”์ง€ ์•ˆ ํ•˜๋Š”์ง€ ์ ์—ˆ๋‹ค. That way, I can detect where the code chooses another path because meanwhile โ€ฆ I have also expired the program by using all 10 available trials !!! ๊ทธ ๋ฐฉ๋ฒ•์€, ๋‹ค๋ฅธ ๊ฒฝ๋กœ๋ฅผ ์„ ํƒํ•˜๋Š” code ๋ฅผ ๋ฐœ๊ฒฌํ•  ์ˆ˜ ์žˆ๋‹ค. program ์ด 10 ๋ฒˆ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋Š” ์ œํ•œ์— ์˜ํ•ด ์ข…๋ฃŒ๋๋‹ค. Conclusion : if I find the jumps where the code path changes, then I will easily have found a way to register the program !!! ๊ฒฐ๋กž : ๋‚ด๊ฐ€ ๊ฒฝ๋กœ๋ฅผ ๋ฐ”๊ฟ€ ์ˆ˜ ์žˆ๋Š” jump ๋ฅผ ์ฐพ๋Š”๋‹ค๋ฉด, ๋‚˜๋Š” ๋งค์šฐ ์‰ฝ๊ฒŒ ๋“ฑ๋กํ•œ program ์„ ์ฐพ๋Š”๋‹ค. Well, let's do that, but first, this is also an ideal opportunity to explain another nice feature of Olly : animate over/in (Ctrl + F8 / F7) ์ข‹์•„, ์‹œ์ž‘ํ•˜์ž, ๋จผ์ € ์ด๊ฒƒ์€ Olly ์—์„œ ๋‹ค๋ฅธ ์ข‹์€ ํŠน์ง•๋“ค์„ ์„ค๋ช…ํ•˜๊ธฐ ์œ„ํ•œ ์ด์ƒ์ ์ธ ๊ธฐํšŒ๋‹ค. Animate over/in (Ctrl + F8/F7) To reduce the size of this movie, I won't show it here, but you : go ahead, and press CTRL+F8 (animate over) and look at what happens.
  • 7. Movie ์˜ size ๋ฅผ ์ฃฟ์ด๊ธฐ ์œ„ํ•ด, ๋‚˜๋Š” ์—ฌ๊ธฐ์—์„œ ๋ณด์—ฌ์ฃผ์ง€ ์•Š๋Š”๋‹ค, ๊ทธ๋Ÿฌ๋‚˜ ๋„ˆ๋Š” ํ•ด๋ด. Ctrl + F8(animate over)์„ ๋ˆ„๋ฅด๊ณ  ์–ด๋–ค ์ผ์ด ์ผ์–ด๋‚˜๋Š”์ง€ ๋ด Some of my stuff from today is based upon it and I will come back later on this. It is also important that you can see once how code is executed. ์˜ค๋Š˜๋‚  ์•ฝ๊ฐ‚์˜ ๋‚ด ์žฌ๋ฃŒ๋“ค์€ ๊ธฐ๋ณธ์ด๋‹ค. ๊ทธ๋ฆฌ๊ณ  ๋‚˜๋Š” ๋‹ค์Œ์— ๋Œ์•„์˜จ๋‹ค. ์ด๊ฒƒ์€ ๋˜ํ•œ Code ๊ฐ€ ์–ด๋–ป๊ฒŒ ์‹คํ–‰๋˜๋Š”์ง€ ๋ณด๋Š” ๊ฒŒ ์ค‘์š”ํ•˜๋‹ค. Remark : I will already tell you that a more advanced feature for this is TC (trace call == run trace), where you can log and set conditions. But we will discuss that feature in another part of this series. ์ฃผ๋ชฉ : ๋‚˜๋Š” ์ด๋ฏธ ๋„ˆ์—๊ฒŒ TC ๋ฅผ ์œ„ํ•ด ๋ง‹์€ ์ง‚ํ™”๋œ ์‚ฌ์‹ค๋“ค์„ ๋งํ–ˆ๋‹ค.(trace call == ์ถ”์  ์‹คํ–‰) ๊ทธ๊ณณ์€ log ๋ฅผ ๋‚จ๊ธฐ๊ณ  condition ์„ set ํ•  ์ˆ˜ ์žˆ๋‹ค. ๊ทธ๋Ÿฌ๋‚˜ ์šฐ๋ฆฌ๋Š” series ์˜ ๋‹ค๋ฅธ part ์—์„œ feature ๋ฅผ ์˜๋…ผํ•œ๋‹ค. Ok. Have you seen it? Now, to stop animating, you can always press F12 or click the pause button. ์ง€๊ธˆ๊นŒ์ง€ ๋ณธ ์  ์žˆ์–ด? ์ด์ œ, animating ์„ ๋ฉˆ์ถœ๊ป˜. ๋„ˆ๋Š” ํ•ญ์ƒ F12 ๋ฅผ ๋ˆ„๋ฅด๊ฑฐ๋‚˜ pause button ์„ click ํ•˜๋ฉด ๋ผ. Ok, restart and come back here to EP. I'm still at the EP of the soft. See me step F8, but I will stop my stepping when necessary to show you some important stuff. Ok, ์žฌ์‹œ์ž‘ํ•˜๊ณ  EP ๋กœ ๋Œ์•„์˜ค์ž. ๋‚˜๋Š” ๊ณ„์† EP ์— ์žˆ์„๊ฑฐ์•ผ. F8 ๋ˆŒ๋Ÿฌ, ์ค‘์š”ํ•œ ์žฌ๋ฃŒ๋ฅผ ๋ณด์—ฌ์ฃผ๊ณ  ํ•„์š”ํ•˜๋‹ค๊ณ  ๋Š๊ปด์งˆ ๋•Œ ๋‚˜์˜ stepping ์„ stop ํ• ๊ฑฐ์•ผ. Let's finally start exploring F8 ๋งˆ์ง€๋ง‰์œผ๋กœ F8 ๋กœ ํƒํ—˜์„ ์‹œ์ž‘ํ•˜์ž. Meanwhile, I will come at an example I like to show to you โ€ฆ.
  • 8. ๋‚˜๋Š” example ์„ ๋ณด์—ฌ์ฃฟ ๊ฒƒ์ด๋‹ค. ...see the JNZ here JNZ ๊ฐ€ ์ด๊ณณ์ธ ๊ฑธ ๋ด. Well, in my first round of stepping the code F8 and this movie, I already studied this conditional jump and have noted down that the jump was taken by writing a "V" in the comment line. ์ข‹์•„, ์ฒซ๋ฒˆ์งธ๋กœ code F8 ์„ ๋ˆŒ๋Ÿฌ stepping ํ•  ์ˆ˜ ์žˆ๋‹ค. ๋‚˜๋Š” ์ด๋ฏธ ์กฐ๊ฑด jump ๋ฅผ ๊ณต๋ถ€ํ–ˆ๋‹ค. Comment line ์— Jump ๋˜๋Š” ๊ณณ์€ V ๋กœ ์ ์—ˆ๋‹ค. So : V means the jump was taken when the program was still registered for x trials. ๊ทธ๋ž˜์„œ : V ๋Š” Program ์ด x trial ์„ ์œ„ํ•ด ๋“ฑ๋ก ๋์„ ๋•Œ jump ๋ฅผ ํ–ˆ๋‹ค. No change : we will also jump now that I'm out of trials. It makes this jump unimportant. Now do the complete program like this until changes are found. ์•ˆ ๋ฐ”๋€ ์  : ์šฐ๋ฆฌ๋Š” ์ด์ œ jump ํ•  ์ˆ˜ ์žˆ๋‹ค. Trial ์—์„œ ๋‚˜๊ฐ‚๋‹ค. ๊ทธ๊ฒƒ์€ jump ๊ฐ€ ์ค‘์š”ํ•˜์ง€ ์•Š๋‹ค. ์ด์ œ ๋ฐ”๋€ ์ ์„ ์ฐพ์„ ๋•Œ๊นŒ์ง€ ์™„๋ฒฝํ•œ program ์ด๋‹ค. Let's continueโ€ฆ Now, scroll up ๊ณ„์†ํ•˜์ž. ์ด์ œ, ์Šคํฌ๋กŸ ์˜ฌ๋ ค
  • 9. Didn't jump when "registered" for x trials Doesn't jump either now, so, no change and we continue ๋“ฑ๋ก ๋˜์—ˆ์„ ๋•Œ jump ํ•˜์ง€ ์•Š๋Š”๋‹ค. ์–ด๋Š ๊ฒƒ ํ•˜๋‚˜ jump ํ•˜์ง€ ์•Š๋Š”๋‹ค. ๊ทธ๋ž˜์„œ ๋ฐ”๊พธ์ง€ ์•Š๋Š”๋‹ค. ๊ทธ๋ฆฌ๊ณ  ์šฐ๋ฆฌ๋Š” ๊ณ„์†ํ•œ๋‹ค.
  • 10. ...and get in a loop with cond jumps. Loop ๋ฅผ ์กฐ๊ฑด jump ์™€ ํ•จ๊ป˜ ๋“ค์–ด๊ฐ‚๋‹ค. Well, a loop is first studied, we see that the loop is only going to read an unimportant "location" string Loop ์ œ์ผ ๋จผ์ € ๋ฐฐ์šด๋‹ค.
  • 11. loop ๊ฐ€ ์˜ค์ง ์ค‘์š”ํ•˜์ง€ ์•Š์€ "location" string ์„ ์ฝ๊ธฐ ์œ„ํ•ด ๋ˆ๋‹ค. So, it's unimportant. That's also why I haven't made any V or X comments here. Else, we must count the number of loops taken. ๊ทธ๋ž˜์„œ, ์ด๊ฒƒ์€ ์ค‘์š”ํ•˜์ง€ ์•Š๋‹ค. ๊ทธ๊ฒƒ์€ ๋˜ํ•œ ์—ฌ๊ธฐ์— ์–ด๋– ํ•œ V ๋‚˜ X ๋ฅผ ๋งŠ๋“ค์ง€ ๋ชปํ–ˆ๋‹ค. ์šฐ๋ฆฌ๋Š” loop ์–ผ๋งˆ๋‚˜ ๋„๋Š”์ง€ ํšŸ์ˆ˜๋ฅผ ์„ผ๋‹ค. ...and get in a loop with cond jumps. ๊ทธ๋ฆฌ๊ณ  ์šฐ๋ฆฌ๋Š” cond jump ์™€ ํ•จ๊ป˜ loop ๋ฅผ ๋ˆ๋‹ค. Also notice that this is the place where we will jump to leave the loop ๋˜ํ•œ ์žฅ์†Œ๋ผ๋Š” ๊ฒƒ์„ ์•Œ๋ฆฐ๋‹ค. ๊ทธ ์žฅ์†Œ์—์„œ loop ๋ฅผ ๋– ๋‚˜๊ธฐ ์œ„ํ•ด jump ํ•œ๋‹ค.
  • 12. So, we can safely put a BP there ๊ทธ๋ž˜์„œ ์šฐ๋ฆฌ๋Š” ์•ˆ์ ‚ํ•˜๊ฒŒ ์ด๊ณณ์— BP ๋ฅผ ๋„ฃ๋Š”๋‹ค. And now, press F9 to run the loop This way, we don't have to trace rounds like a squirrel in a wheel. Yep, we remove the BP ๊ทธ๋ฆฌ๊ณ  ์ด์ œ, loop ๋ฅผ ์‹คํ–‰ํ•˜๊ธฐ ์œ„ํ•ด F9 ๋ฅผ ๋ˆŒ๋Ÿฌ. ์ด ๋ฐฉ๋ฒ•์€, ์ถ”์ ํ•˜๊ธฐ ์œ„ํ•ด ๋‹ค๋žŒ์ฅ ๋งˆ๋ƒฅ ์ณ‡๋ฐ”ํ€ด๋ฅผ ๋Œ์ง€ ์•Š๋Š”๋‹ค. ์˜ˆ, BP ๋ฅผ ์‚ญ์ œํ•ด. Notice that this step doesn't bring any changes either
  • 13. ์•Œ๋ฆฐ๋‹ค. ์ด step ์—์„œ๋Š” ๋ฐ”๋€ ์–ด๋–ค ๊ฒƒ๋„ ๊ฐ€์ ธ์˜ค์ง€ ์•Š๋Š”๋‹ค. BTW, making changes in the comment line is done by doubleclicking the comment line. By the way, ์ฃผ์„ ๋ผ์ธ์˜ ๋ณ€ํ™”๋ฅผ ๋งŠ๋“œ๋Š” ๊ฒƒ์€ comment line ์„ doubleclick ์„ ํ•˜๋ฉด ๋œ๋‹ค. Normally, I write these down on a piece of paper (old school huh). But for your convenience, I've done it in the comment line this time, so that you can follow it all easily. See how to do it โ€ฆ ๋ณดํ†ต, ๊ทธ๊ฒƒ๋“ค์„ ์ข…์ด ์œ„์— ์ ๋Š”๋‹ค. (์˜ˆ์ ‚ ๋ฐฉ์‹ ํ›„..) ๊ทธ๋Ÿฌ๋‚˜ ๋„ˆ์˜ ํŽธ๋ฆฌํ•จ์„ ์œ„ํ•ด, ๋‚ด๊ฐ€ ์ด๋ฏธ comment line ์— ํ•ด๋†จ๋‹ค. ๊ทธ๋ž˜์„œ ๋„ˆ๋Š” ์‰ฝ๊ฒŒ ๋”ฐ๋ผ๊ฐˆ ์ˆ˜ ์žˆ๋‹ค. ์–ด๋–ป๊ฒŒ ํ•˜๋Š”์ง€ ๋ด. :) BTW, when stepping a call F8 and the nag appears, you have to BP the call and restart the app. By the way, ์šฐ๋ฆฌ๊ฐ€ call ์„ F8 ๋กœ ๋„˜๊ธฐ๊ณ  nag ์ด ๋‚˜ํƒ€๋‚  ๋•Œ, ๋„ˆ๋Š” ๊ทธ call ์— BP ๋ฅผ ๊ฑธ๊ณ  app ์„ ์žฌ์‹œ์ž‘ ํ•ด. Then run till BP to step F7 in the call and continue F8 to dig deeper and deeper till you finally find where exactly the window (for nag or program) is created. BP ๊นŒ์ง€ ์‹คํ–‰ํ•˜๊ณ  F7 ๋กœ call ์•ˆ์œผ๋กœ ๋“ค์–ด๊ฐ€ ๊ทธ๋ฆฌ๊ณ  F8 ๋กœ ๊นŠ๊ฒŒ ํŒŒ๊ณ ๋“ค์–ด ๊ทธ๋ฆฌ๊ณ  ๋งˆ์ง€๋ง‰์œผ๋กœ ์ •ํ™•ํžˆ ์œˆ๋„์šฐ๊ฐ€(nag ์ด๋‚˜ program) ๋งŠ๋“ค์–ด์ง‚ ๊ณณ์„ ์ฐพ์•„๋ผ. Remark : if a change would take place deep in a call for example, we would also notice changes in program behaviour here. For example by an apparition of another nag. ์ฃผ๋ชฉ : ๋งŠ์•ฝ์— ๋ณ€ํ™”๊ฐ€ ์ด ์˜ˆ์ œ์—์„œ์ฒ˜๋Ÿผ ๊นŠ๋‹ค๋ฉด, ์šฐ๋ฆฌ๋Š” ๋˜ํ•œ program behaviour ๊ฐ€ ๋ฐ”๋€ ๊ฒƒ์„ ๋Š๋‚€๋‹ค. ์ด ์˜ˆ์ œ์—์„œ์ฒ˜๋Ÿผ ๋‹ค๋ฅธ nag ์˜ ์œ ๋ น๊ฐ™์ด. We would always easily find the change in the code.
  • 14. ์šฐ๋ฆฌ๋Š” ํ•ญ์ƒ code ์—์„œ ์‰ฝ๊ฒŒ ๋ณ€ํ™”๋ฅผ ์ฐพ์„ ์ˆ˜ ์žˆ๋‹ค. So again, continue stepping F8 and keep looking for changes in the jumps. ๊ทธ๋ž˜์„œ ๊ณ„์† F8 ์„ ๋ˆŒ๋Ÿฌ. ๊ทธ๋ฆฌ๊ณ  jump ์—์„œ ๋ณ€ํ™”๋œ ์ ์„ ์ฃผ์˜ ๊นŠ๊ฒŒ ๋ด. Scroll up ์Šคํฌ๋กŸ ์˜ฌ๋ ค OK The first time I stepped this code F8 โ€ฆ ์ฒซ๋ฒˆ์งธ๋กœ code ๋ฅผ ๋„˜๊ธฐ๊ธฐ ์œ„ํ•ด F8 ์„ ๋ˆŒ๋Ÿฌ. I noticed that the nag showed up when stepping this call F8 Call ์„ F8 ๋กœ ๋„˜๊ธธ ๋•Œ, nag ์ด ๋‚˜ํƒ€๋‚˜๋Š” ๊ฒƒ์„ ๋Š๋‚€๋‹ค. So, now I know that I have to step IN the call F7 ๊ทธ๋ž˜์„œ, ๋‚˜๋Š” call ์—์„œ step ์„ ๋„˜๊ธฐ๊ธฐ ์œ„ํ•ด F7 ์„ ๋ˆŒ๋Ÿฌ์•ผ ํ•œ๋‹ค. To find where the nag is created. Nag ์ด ๋งŠ๋“ค์–ด์ง€๋Š” ๊ณณ์„ ์ฐพ์•„๋ผ. On this line, press F7 and remember that this is the very first call where the nag is shown ์ด line ์—์„œ, F7 ์„ ๋ˆ„๋ฅด๊ณ  nag ์ด ๋‚˜ํƒ€๋‚˜๋Š” ์ฒซ๋ฒˆ์งธ call ์ด๋ผ๋Š” ๊ฒƒ์„ ๊ธฐ์–ตํ•ด๋ผ.
  • 15. To land here in the call. Same here โ€ฆ Because again, the nag showed here, โ€ฆ And so now, press F7 to step in the call Call ์•ˆ์˜ ์ด๊ณณ์— ๋„์ฐฉํ–ˆ๋‹ค. ๋˜‘๊ฐ™์€ ์œ„์น˜๋‹ค. ์™œ๋ƒํ•˜๋ฉด ๋‹ค์‹œ, nag ์ด ๋‚˜ํƒ€๋‚œ๋‹ค. ๊ทธ๋ฆฌ๊ณ  F7 ์„ ๋ˆŒ๋Ÿฌ call ์•ˆ์œผ๋กœ ๋“ค์–ด๊ฐ€๋ผ.
  • 16. To land here. Notice that we will jump to a โ€ฆ windows dll(system dll) ์—ฌ๊ธฐ์— ๋„์ฐฉํ•œ๋‹ค. ์šฐ๋ฆฌ๊ฐ€ windows dll ๋กœ(system dll) jump ํ•˜๋Š” ๊ฑธ ์ธ์‹ํ•œ๋‹ค. "What now?" you probably ask. Well, we need to know "Is the nag created here ?" or is this only "passing through" ? "๋ญ์•ผ?" ๋„ˆ๋Š” ์•„๋งˆ ๋ฌผ์„ ๊ฑฐ์•ผ. ์ข‹์•„, ์šฐ๋ฆฌ๋Š” "์–ด๋””์—์„œ nag ์ด ์ƒ์„ฑ๋˜๋Š”์ง€" ์•Œ๊ธฐ ์œ„ํ•˜๊ฑฐ๋‚˜ "ํ†ต๊ณผ"๊ฐ€ ํ•„์š”ํ•˜๋‹ค. We can find the answer in different ways because there is no need to verify the jumps in a windows dll : they always stay the same.
  • 17. ์šฐ๋ฆฌ๋Š” ๋‹ค๋ฅธ ๋ฐฉ๋ฒ•์œผ๋กœ answer ๋ฅผ ์ฐพ์•˜๋‹ค. ์™œ๋ƒํ•˜๋ฉด ๊ทธ๊ณณ์€ windows dll ์—์„œ jump ๋ฅผ ๊ฒ€์ฆํ•˜๊ธฐ ์œ„ํ•ด ํ•„์š”์—†๋‹ค. : ๊ทธ๋“ค์€ ํ•ญ์ƒ ๊ฐ™์€ ์ž๋ฆฌ์— ๋จธ๋ฌผ๋Ÿฌ ์žˆ์œผ๋‹ˆ๊นŒ. Remark : but you do need to verify them in application specific dll's of course !!!!! ์ฃผ๋ชฉ : ๋„ค๊ฐ€ ๊ทธ๊ฒƒ๋“ค์„ ์ด application ์—์„œ ๊ฒ€์ฆํ•˜๊ธฐ ์œ„ํ•ด ํŠน์ • dll ์ด ํ•„์š”ํ•˜๋‹ค Different ways to verify are for example placing a memory BP on code section. ๊ฒ€์ฆํ•˜๊ธฐ ์œ„ํ•œ ๋‹ค๋ฅธ ๋ฐฉ๋ฒ•์€ ์ด example ์ฒ˜๋Ÿผ Code section ์˜ memory BP ์— ๋†“์—ฌ์žˆ๋‹ค. I will discuss that later in another Part. ๋‚˜๋Š” ๋‚˜์ค‘์— ๋‹ค๋ฅธ part ์—์„œ ์˜๋…ผํ•  ๊ฒƒ์ด๋‹ค. This time, I want to use hardware BP's (HW BP's). But I will need to give you two words of explanation first ์ด๋ฒˆ ์‹œ๊ฐ‚์—๋Š”, hardware BP's ๋ฅผ ์‚ฌ์šฉํ•˜๊ธฐ ์›ํ•œ๋‹ค.(HW BP's). ๋จผ์ € 2 ๊ฐ€์ง€ ์„ค๋ช…์„ ํ•˜๊ฒ ๋‹ค. Basically, there are 2 kinds of breakpoints we can set : software breakpoints and hardware breakpoints. ๊ธฐ๋ณธ์ ์œผ๋กœ, 2 ๊ฐ€์ง€ breakpoint ๋ฅผ set ํ•  ์ˆ˜ ์žˆ๋‹ค. : software breakpoints and hardware breakpoints You could suspect a third one, the memory breakpoints, but see these as special software BP's that can be set on the memory Olly has of a process(program). ๋„ˆ๋Š” ์„ธ๋ฒˆ์งธ Memory breakpoints ์˜์‹ฌ์Šค๋Ÿฝ๋‹ค. ์ด๊ฒƒ๋“ค์„ ๋ด๋ผ. Special software BP's ๊ฐ€ memory ์—์„œ set ๋์„ ๋•Œ Olly ๋Š” process ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค. You can only set one mem BP at a time. ๋„ˆ๋Š” ์˜ค์ง mem ์— BP ๋ฅผ set ํ•  ์ˆ˜ ์žˆ๋‹ค. If you set another one, the first is removed! To set this breakpoint, OllyDbg needs to alter the attributes of the memory block containing the selection (in chunks of 4096 bytes). ๋งŠ์•ฝ์— ๋„ค๊ฐ€ ๋‹ค๋ฅธ ๊ฒƒ์„ set ํ•œ๋‹ค๋ฉด, ์ฒซ๋ฒˆ์งธ ๊ฒƒ์€ ์ œ๊ฑฐ๋œ๋‹ค. Breakpoints ๋ฅผ set ํ•˜๊ธฐ ์œ„ํ•ด์„œ, OllyDbg ๋Š” memory block ์ด ํฌํ•จํ•˜๊ณ  ์žˆ๋Š” ๋ฒ”์œ„์˜ ์†์„ฑ์ด ๋ณ€ํ•˜๋Š” ๊ฒŒ ํ•„์š”ํ•˜๋‹ค.(4096 bytes ๋‹จ์œ„) Memory breakpointing just one single byte will force Olly to "guard" the whole block. Memory breakpointing ์„ single byte ๋งŠ ํ•˜๋ฉด, Olly ๊ฐ€ ์ ‚์ฒด block ์„ "๋ณดํ˜ธ" ํ•  ๊ฒƒ์ž…๋‹ˆ๋‹ค. It is clear that this will result in a lot of false breaks. ์ด๊ฒƒ์€ ๋ช…ํ™•ํ•˜๋‹ค. ๊ฝค ๋ง‹์€ false break ์ด ๋ฐœ์ƒํ•  ๊ฒƒ์ด๋‹ค. Memory BP's substantially lower Olly's speed of processing because Olly constantly also needs to verify the memory he has about the process. Memory BP's Olly ์˜ processing speed ๋Š” ์ƒ๋‹นํžˆ ๋‚ฎ๋‹ค. ์™œ๋ƒํ•˜๋ฉด Olly ๋Š” ๋Š์ž„์—†์ด memory ๊ฒ€์ฆ์ด ํ•„์š”ํ•˜๋‹ค. Olly ๋Š” ๊ทธ๋Ÿฐ process ๋ฅผ ๊ฐ€์ง€๊ณ  ์žˆ๋‹ค. I already briefly mentioned the standard software breakpoint in a previous part. In Olly, you can set these by pressing F2 on the line or by doubleclicking the opcodes. ๋‚˜๋Š” ์ด๋ฏธ ์ ‚ Part ์—์„œ Standard software breakpoint ๋ฅผ ๊ฐ‚๋‹จํžˆ ์–ถ๊ธ‰ํ–ˆ๋‹ค. Olly ์—์„œ F2 ๋ฅผ ๋ˆ„๋ฅด๊ฑฐ๋‚˜ doubleclick ์œผ๋กœ set ํ•  ์ˆ˜ ์žˆ๋‹ค.
  • 18. Remember that a software BP is set by the debugger (Olly) who needs to "rewrite" the code to place a INT3 instruction (==Trap to Debugger) (== CC opcode) in front of the command. ๊ธฐ์–ตํ•ด๋ผ. Software BP ๋Š” Debugger ์— ์˜ํ•ด set ๋๋‹ค. Code ์— "rewrite" ํ•˜๊ธฐ ์œ„ํ•ด INT3 instruction ์„ ๋†“๊ธฐ ์œ„ํ•ด ํ•„์š”ํ•˜๋‹ค. Without wanting to jump too deep into it : when such a INT3 instruction is encountered, the handler gets control about what's up next. Hehe, and there comes Olly in the game :) ๊นŠ๊ฒŒ jump ํ•˜๊ธฐ๋ฅผ ์›์น˜ ์•Š๋Š”๋‹ค๋ฉด : IN3 instruction ๊ณผ ๋งˆ์ฃผ์น  ๋•Œ, handler ๋Š” ๋‹ค์Œ ๊ฒƒ์„ control ํ•˜๊ธฐ๋ฅผ ์›ํ•œ๋‹ค. ํ—คํ—ค, Olly ๊ฐ€ ์˜จ๋‹ค. Hardware BP's however are completely different. These are originated in their respective debug registers who can each hold one breakpoint address, directly in the CPU. Hardware BP ๋Š” ์™„๋ฒฝํžˆ ๋‹ค๋ฅด๋‹ค. ๊ฐ์ž์˜ debug register ์—์„œ CPU ์— ์ง์ ‘์ ์œผ๋กœ breakpoint address ๋ฅผ ์žก๊ณ  ์žˆ๋Š” ๊ฒƒ์—์„œ ๋น„๋กฏ๋๋‹ค. You understand already there must be 4 debug registers because there are 4 HW BP's possible. ๋„ˆ๋Š” ์ด๋ฏธ 4 debug register ๋ฅผ ์ดํ•ดํ•˜๊ณ  ์žˆ์„ ๊ฒƒ์ด๋‹ค. ์™œ๋ƒํ•˜๋ฉด 4 HW BP ๋Š” ๊ฐ€๋Šฅ์„ฑ์ด ์žˆ๋‹ค. Again, without wanting to dig deeper into this : when such a BP is encountered, the CPU generates a INT1 exception which is then given to the exception handlerโ€ฆ and that is Olly in our case :) ๋‹ค์‹œ ํ•œ๋ฒˆ ๋งํ•˜์ž๋ฉด, ๊นŠ๊ฒŒ jump ๋ฅผ ํ•˜๊ณ  ์‹ถ์ง€ ์•Š๋‹ค๋ฉด ; BP ๋Š” ๋งˆ์ฃผ์น  ๋•Œ, CPU ๋Š” INT1 ์˜ˆ์™ธ๋ฅผ ์ƒ์‚ฐํ•ด๋‚ธ๋‹ค. INT1 exception ์€ ๊ทธ๋ฆฌ๊ณ  ์ด case ์—์„œ์ฒ˜๋Ÿผ Olly ์—๊ฒŒ exception handler ์„ ์ฃพ๋‹ค. BTW, HW BP's are not available under win95/98 By the way, HW BP's ๋Š” win95/98 ์•„๋ž˜ ๋ฒ„์ ‚์€ ๊ฐ€๋Šฅํ•˜์ง€ ์•Š๋‹ค. Your next questions is undoubtedly : ๋„ˆ์˜ ๋‹ค์Œ ์งˆ๋ฌธ์€ ํ™•์‹คํ•˜๋‹ค. "And how to know which kind of BP to use?" In fact, it is not difficult. ๊ทธ๋ž˜์„œ ์–ด๋–ป๊ฒŒ ์‚ฌ์šฉํ•  ๋•Œ ๋‹ค๋ฅธ๊ฐ€?" ์‚ฌ์‹ค, ์ด๊ฒƒ์€ ์–ด๋ ค์šด ๊ฒƒ์ด ์•„๋‹ˆ๋‹ค. They each have their own restrictions in use. The INT3 BP's (software BP's) for example can basically only be set on commands in the CPU window. ๊ฐ์ž ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋Š” ๋ฒ”์œ„์˜ ์ œ์•ฝ์ด ์žˆ๋‹ค. ์ด ์˜ˆ์ œ์—์„œ์ฒ˜๋Ÿผ INT3 BP ๋Š” ๊ธฐ๋ณธ์ ์œผ๋กœ ์˜ค์ง CPU window ์—์„œ set ๋  ์ˆ˜ ์žˆ๋‹ค. Also, they can't be set on data or in the middle of a command. In our specific case here, we will use the HW BP's because INT3 BP's in windows dll's are not saved by Olly although there is a way around this with the BP manager plugin or specific settings. ๋˜ํ•œ, ๊ทธ๋“ค์€ ๋ช…๋ น์˜ ์ค‘๊ฐ‚์—์„œ data ๋ฅผ set ํ•  ์ˆ˜ ์—†๋‹ค. ์ด๋Ÿฐ ๋ช…ํ™•ํ•œ ๊ฒฝ์šฐ์—, ์šฐ๋ฆฌ๋Š” HW BP ๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์„ ๊ฒƒ์ด๋‹ค. ์™œ๋ƒํ•˜๋ฉด INT3 BP's ๋Š” Olly ์— ์˜ํ•ด window dll's ์— ์ €์žฅ์ด ๋˜์ง€ ์•Š๋Š”๋‹ค. ๋‹ค๋ฅธ ๋ฐฉ๋ฒ•์œผ๋กœ BP manager plugin ์„ ์“ฐ๊ฑฐ๋‚˜ ๋ช…ํ™•ํ•œ setting ์„ ํ•œ๋‹ค.
  • 19. It's clear that when restarting a program, the memory about it was deleted and so, obviously, mem BP's can't be used here either. Some practice will quickly learn you what kind of breakpoint to use in which circumstances. ์ด๊ฒƒ์€ ๋ช…ํ™•ํ•ฉ๋‹ˆ๋‹ค. ์šฐ๋ฆฌ๊ฐ€ program ์„ restart ํ•  ๋•Œ, memory ๋Š” ์‚ญ์ œ๋๋‹ค. ๊ทธ๋ฆฌ๊ณ  ์ •ํ™•ํžˆ, memory BP ๋Š” ์‚ฌ์šฉ๋  ์ˆ˜ ์—†๋‹ค. ์•ฝ๊ฐ‚์˜ ์—ฐ์Šต์„ ํ•˜๋ฉด ์–ด๋–ค ์ข…๋ฅ˜์˜ breakpoint ๋ฅผ ์–ด๋–ค ์ƒํ™ฉ์—์„œ ์“ฐ๋Š”์ง€ ๋นจ๋ฆฌ ๋ฐฐ์šธ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. Now that you understand this, let me show you how to use the HW BP's in this MFC42.dll because you need to understand indeed : the usual software BP's in windows dll's are not saved by Olly. ์ด์ œ ์ด๊ฒƒ์„ ์ดํ•ดํ–ˆ์„ ๊ฒƒ์ด๋‹ค, ๋‚˜๋Š” ๋„ˆ์—๊ฒŒ MFC42.dll ์—์„œ HW BP ๋ฅผ ์–ด๋–ป๊ฒŒ ์‚ฌ์šฉํ•˜๋Š”์ง€ ๋ณด์—ฌ์ฃผ๊ฒ ๋‹ค. ์™œ๋ƒํ•˜๋ฉด ๋„ˆ๋Š” ์ •๋ง๋กœ ์ดํ•ดํ•˜๋Š” ๊ฒƒ์ด ํ•„์š”ํ•˜๋‹ค. : ๋ณดํ†ต software BP ๋Š” Olly ์— ์˜ํ•ด windows dll's ์—์„œ ์ €์žฅ๋˜์ง€ ์•Š๋Š”๋‹ค. (I said already that you can circumvent this with the BP manager plugin or specific settings + some other plugins). But first, let's continue stepping F8. (๋‚˜๋Š” ์ด๋ฏธ ๋งํ–ˆ๋‹ค. ๋„ˆ๋Š” BP manger plug ์ด๋‚˜ ํŠน์ •ํ•œ setting + ๋‹ค๋ฅธ plugin) ํ”ผํ•ด๊ฐˆ ์ˆ˜ ์žˆ๋‹ค. ๊ทธ๋Ÿฌ๋‚˜ ๋จผ์ €, F8 ์„ ๋ˆŒ๋Ÿฌ ๊ณ„์† ํ•˜๊ฒ ๋‹ค. The program is running? Program ์ด ์‹คํ–‰๋˜๊ณ  ์žˆ๋‹ˆ? Aha, the startup nag is created. ์•„ํ•˜, startup nag ๋Š” ๋งŠ๋“ค์–ด์กŒ๋‹ค.
  • 20. Now, we need to verify if this nag is generated here at this place in the windows dll or โ€ฆ. Or if we need to dig deeper into this call to find the creation of the nag. ์ด์ œ, ์šฐ๋ฆฌ๋Š” ๊ฒ€์ฆํ•˜๋Š” ๊ฒƒ์ด ํ•„์š”ํ•˜๋‹ค. ๋งŠ์•ฝ์— ์ด nag ๊ฐ€ windows dll ์ด ๊ณณ์—์„œ ์ƒ์„ฑ๋๋‹ค๊ฑฐ๋‚˜ ์šฐ๋ฆฌ๋Š” ์ด call ์†์œผ๋กœ ๊นŠ๊ฒŒ ํŒŒ๊ณ ๋“ค์–ด nag ์„ ๋งŠ๋“œ๋Š” ๊ณณ์„ ์ฐพ๋Š” ๊ฒƒ์ด ํ•„์š”ํ•˜๋‹ค. INFO: A more advanced info is that this application is compiled with MFC support (MFC42.dll). ๋ง‹์€ ๋ฐœ์ ‚๋œ ์ •๋ณด๋Š” application ์ด MFC ์™€ ํ•จ๊ป˜ compile ๋๋‹ค.(MFC42.dll) Hence, it's rather special but that's also why I have chosen this application: it makes things not so clear as usual which is exactly what I was after ๊ทธ๋ฆฌํ•˜์—ฌ, ์ด๊ฒƒ์€ ๊ฝค special ํ•˜๋‹ค. ๊ทธ๋Ÿฌ๋‚˜ ์ด๊ฒƒ์€ ๋˜ํ•œ ๋‚˜๋Š” ์ด application ์„ ์„ ํƒํ–ˆ๋‹ค : things ๊ฐ€ ์ผ๋ฐ˜์ ์ผ ๋•Œ ๋ช…ํ™•ํ•˜์ง€ ์•Š๋‹ค. ๊ทธ๊ฒƒ์€ ์ •ํ™•ํžˆ ์˜€๋‹ค. (unless we would help Olly with the analysis by showing him the path to these import libs) (์šฐ๋ฆฌ๊ฐ€ Import libs ๊ฒฝ๋กœ๋ฅผ ๋ณด์—ฌ์คŒ์œผ๋กœ์จ ๋ถ„์„ํ•˜๋Š” Olly ๋ฅผ ๋„์™€์ฃฟ ์ˆ˜ ์—†๋‹ค๋ฉด) (Olly menu --> Debug --> Select import libraries --> show Olly the path) (Olly menu --> Debug --> Select import libraries --> show Olly the path) (these libs don't come with Olly, but can easily be found when googling for them). ์ด lib ๋“ค์€ Olly ์™€ ํ•จ๊ป˜ ์˜ค์ง€ ์•Š๋Š”๋‹ค. ๊ทธ๋Ÿฌ๋‚˜ ๊ตฌ๊ธ€๋ง์œผ๋กœ ๊ทธ๊ฒƒ๋“ค์„ ์‰ฝ๊ฒŒ ์ฐพ์„ ์ˆ˜ ์žˆ๋‹ค. Once again though: I wanted to show the technique with as little info as possible for best learning! ๋‹ค์‹œ ํ•œ ๋ฒˆ ๋งํ•œ๋‹ค : ๋‚˜๋Š” ๊ธฐ์ˆ ์ ์ธ ๋ถ€๋ถ„์„ ๊ฐ€๋Šฅํ•œ ์ตœ๊ณ ์˜ ๊ณต๋ถ€๊ฐ€ ๋  ์ˆ˜ ์žˆ๋„๋ก ์•ฝ๊ฐ‚์˜ ์ •๋ณด์™€ ํ•จ๊ป˜ ๋ณด์—ฌ์ฃผ๊ฒ ๋‹ค. Probably this sounds like rubbish, but follow along and it will all become clear :) ์•„๋งˆ ๋ฏธ์นœ๋†ˆ ๊ฐ™์€ ์†Œ๋ฆฌ์ผ ๊ฒƒ์ด๋‹ค, ๊ทธ๋Ÿฌ๋‚˜ ๋”ฐ๋ผ์™€. ๊ทธ๋Ÿฌ๋ฉด ๋ช…ํ™•ํ•ด ์งˆ ๊ฒƒ์ด๋‹ค. What I first want to do, is come back here again, but instead of stepping F8 all the way, I'm gonna place a HW BP on this call and immediately "run" till here :) ๋‚ด๊ฐ€ ๋จผ์ € ๋ฌด์—‡์„ ํ•ด์•ผ ๋ ๊นŒ, ์ด๊ณณ์— ๋Œ์•„์™”๋‹ค. ๊ทธ๋Ÿฌ๋‚˜ F8 ๋ˆ„๋ฅด๋Š” ๋ฐฉ๋ฒ• ๋Œ€์‹ž์—, ๋‚˜๋Š” ์ด call ์— HW ๋ฅผ ์„ค์น˜ํ•˜๊ฒ ๋‹ค. ๊ทธ๋ฆฌ๊ณ  ์ฆ‰์‹œ ์ด๊ณณ๊นŒ์ง€ ์‹คํ–‰ํ•ด. Remark : I have already said there are easier ways to do this, but it is important that you know the basics too. Now, rightclick on the call line ์ฃผ๋ชฉ : ๋‚˜๋Š” ์ด๋ฏธ ๋งํ–ˆ๋‹ค. ๊ทธ๊ณณ์€ ๋งค์šฐ ์‰ฌ์šด ๋ฐฉ๋ฒ•์ด๋‹ค. ๊ทธ๋Ÿฌ๋‚˜ ์ด๊ฒƒ์€ ๋งค์šฐ ๋„ˆ๋„ ์•Œ๋‹ค์‹œํ”ผ ๊ธฐ๋ณธ์ ์ธ ๊ฒƒ์ด ์ค‘์š”ํ•˜๋‹ค. ์ด์ œ, call line ์—์„œ rightclick ํ•ด.
  • 21. Right. That's it !!! Remember: stepping F8 and the nag appears means : put BP and restart + run + F7 in the call + F8 again till nag appearsโ€ฆ ๊ธฐ์–ตํ•ด : F8 ๋กœ ๋„˜๊ธฐ๊ณ  nag ์€ ๋‚˜ํƒ€๋‚œ๋‹ค. : BP ๋ฅผ ์„ค์น˜ํ•˜๊ณ  restart + run + F7 ์„ ๋ˆŒ๋Ÿฌ call ์•ˆ์œผ๋กœ + nag ์ด ๋‚˜ํƒ€๋‚  ๋•Œ๊นŒ์ง€ F8 ์„ ๊ณ„์† ๋ˆŒ๋Ÿฌ ...to dig deeper in the call in the same way, always deeper and deeper till the nag appears.
  • 22. Call ์—์„œ ๊ฐ™์€ ๋ฐฉ๋ฒ•์œผ๋กœ ๊ณ„์† ํŒŒ๊ณ ๋“ค๋ฉด, ํ•ญ์ƒ ๊นŠ๊ฒŒ ๊ทธ๋ฆฌ๊ณ  ๋˜ ๊นŠ๊ฒŒ nag ์ด ๋‚˜ํƒ€๋‚  ๋•Œ๊นŒ์ง€ ํŒŒ๊ณ ๋“ค์–ด. To reduce movie size, I have done this but I have removed it from the movie Movie size ๋ฅผ ์ฃฟ์ด๊ธฐ ์œ„ํ•ด์„œ ์‚ญ์ œํ–ˆ๋‹ค. ๋‚˜๋Š” ์ด๋ฏธ ํ–ˆ์–ด. ๊ทธ๋Ÿฌ๋‚˜ movie ์—์„œ ์‚ญ์ œํ–ˆ๋‹ค. And so, we land here again in the same call in ๊ทธ๋ž˜์„œ, ์šฐ๋ฆฌ๋Š” ๊ฐ™์€ call ์•ˆ์˜ ์ด๊ณณ์— ๋‹ค์‹œ ๋„์ฐฉํ–ˆ๋‹ค. The HW BP Hardware breakpoint 1 at MFC42.73D4CF71 โ€ฆ and so, we step F7 in the call. ๊ทธ๋ฆฌ๊ณ , ์šฐ๋ฆฌ๋Š” call ์•ˆ์œผ๋กœ ๋“ค์–ด๊ฐ€๊ธฐ ์œ„ํ•ด F7 ์„ ๋ˆŒ๋Ÿฌ. INFO : remember : F8 == stepping over, executing the complete call with all underlying code at once F7 == step in the call, no code is executed yet ๊ธฐ์–ตํ•ด : F8 == ๋„˜๊ธฐ๋Š” ๊ฒƒ, call ์„ ํ•œ๋ฒˆ์— ๊ทผ๋ณธ์ ์œผ๋กœ code ๋ฅผ ์™„๋ฒฝํžˆ ์‹คํ–‰ ํ•˜๋Š” ๊ฒƒ. F7 == call ์•ˆ์œผ๋กœ ๋“ค์–ด๊ฐ€๊ธฐ, code ๋Š” ์•„์ง ์‹คํ–‰๋˜์ง€ ์•Š์•˜๋‹ค.
  • 23. Bam !! To land again in the main exe. Notice that it was indeed NOT where the nag is created !! ์šฐ๋ฆฌ๋Š” ๋‹ค์‹œ main exe ์— ๋„์ฐฉํ–ˆ๋‹ค. ๊ทธ๊ณณ์€ nag ์„ ์ƒ์„ฑํ•˜์ง€ ์•Š๋Š”๋‹ค. INFO: If you are a coder, then this is clear and known beforehand: of course this wasn't where the nag is created. For the non-coder, a little experience and API's will learn this ๋งŠ์•ฝ์— ๋„ค๊ฐ€ code ๋ผ๋ฉด, ์ด๊ฒƒ์€ ๋ช…ํ™•ํ•˜๋‹ค ๊ทธ๋ฆฌ๊ณ  ์‚ฌ์ ‚์— ์•Œ์•˜๋‹ค : ๋ฌผ๋กž ์ด๊ฒƒ์€ nag ์ด ๋งŠ๋“ค์–ด์ง€๋Š” ๊ณณ์ด ์•„๋‹ˆ๋‹ค. Noncoder ๋ผ๋ฉด, ์•ฝ๊ฐ‚์˜ ๊ฒฝํ—˜๊ณผ API ๋ฅผ ๋ฐฐ์›Œ์•ผ ํ•œ๋‹ค.
  • 24. Because we won't need the HW BP anymore, and because we have only 4 HW BPs at our disposal, just remove it like this. ์™œ๋ƒํ•˜๋ฉด ์šฐ๋ฆฌ๋Š” HW BP ๊ฐ€ ๋” ์ด์ƒ ํ•„์š”ํ•˜์ง€ ์•Š๋‹ค. ๊ทธ๋ฆฌ๊ณ  ์šฐ๋ฆฌ๋Š” ์˜ค์ง 4 ๊ฐœ์˜ HW BP ๋ฅผ ์ฒ˜๋ฆฌํ•  ์ˆ˜ ์žˆ๋‹ค. ์ด์ œ ์ด๊ฒƒ์„ ์‚ญ์ œํ•˜์ž. And now continue stepping F8 on the search for the creation of the NAG. ๊ทธ๋ฆฌ๊ณ  nag ์ด ๋งŠ๋“ค์–ด์ง€๋Š” ๊ณณ์„ ์ฐพ์œผ๋ ค๊ณ  ๊ณ„์† F8 ์„ ๋ˆŒ๋Ÿฌ. Notice also that we are getting deeper and deeper into the call at VA 004BD497 where the nag was first shown !!! Still remember that ? ์šฐ๋ฆฌ๋Š” ๊นŠ๊ฒŒ ํŒŒ๊ณ ๋“ค๊ณ  call ์•ˆ์˜ 004BD497 ์— ๋„์ฐฉํ–ˆ๋‹ค. ์ด๊ณณ์€ nag ์ด ์ฒ˜์Œ์œผ๋กœ ๋ณด์—ฌ์ง€๋Š” ๊ณณ์ด๋‹ค. ๊ธฐ์–ตํ•˜๊ณ  ์žˆ์–ด? And do you still remember the animate over/in function in Olly from the very beginning in this Part? ๋งค์šฐ ๊ธฐ์ดˆ์ ์ธ Part ์—์„œ ํ–ˆ๋˜ Olly ์˜ animate over/in function ์„ ๊ธฐ์–ตํ•˜๊ณ  ์žˆ์–ด? Now, this is the time to come back to that Ctrl-F8 you pressed then. ์ด์ œ, ๋Œ์•„์˜ฌ ์‹œ๊ฐ‚์ด ๋๋‹ค. Ctrl-F8 ์šธ ๋ˆŒ๋Ÿฌ. If you have tried it, you will have seen that Olly animated straight towards the nag following the exact path we too have followed so far and further !!!! ๋„์ ‚ํ•ด ๋ดค๋‹ค๋ฉด, Olly ๊ฐ€ ์ง์ ‘ nag ์ด ์‹คํ–‰๋˜๋Š” ์ •ํ™•ํ•œ ๊ฒฝ๋กœ๋ฅผ animation ์œผ๋กœ ๋ดค์„ ๊ฒƒ์ด๋‹ค. ์šฐ๋ฆฌ๋Š” ์ง€๊ธˆ๊นŒ์ง€ ๊ทธ๋ฆฌ๊ณ  ๋” ๋ฉ€๋ฆฌ ๋”ฐ๋ผ๊ฐ‚๋‹ค.
  • 25. What we could have done is the following : from EP, press Ctrl-F8 to animate over the code till the NAG where Olly pauses. ์šฐ๋ฆฌ๋Š” ๋”ฐ๋ผ ๋‹ค๋…”๋‹ค. : EP ์—์„œ, Ctrl+F8 ์„ ๋ˆŒ๋Ÿฌ. Nag ์ด ์žˆ๋Š” ๊ณณ๊นŒ์ง€ animation ์‹œ์ผœ. ๊ทธ๊ณณ์—์„œ Olly ๋Š” ์ •์ง€ํ•œ๋‹ค. Then press "-" to retrace Olly's steps till back at EP(this may take a while) and then retrace the steps Olly has made, noting down all the cond jumps as well as the variable jumps. -๋ฅผ ๋ˆŒ๋Ÿฌ. Olly ๋Š” ์›๋ž˜ ์™”๋˜ ๊ณณ์ธ EP ๋ฅผ ์ถ”์ ํ•œ๋‹ค.(์ž ์‹œ ๋™์•ˆ) ๊ทธ๋ฆฌ๊ณ  Olly ๊ฐ€ ๋งŠ๋“  step ์„ ์ถ”์ ํ•œ๋‹ค. This way, you never need to BP, restart the app and run till the BP to step F7 in the call to search for the nag. ์ด ๋ฐฉ๋ฒ•์€, ๋„ค๊ฒŒ BP ๊ฐ€ ๋” ์ด์ƒ ํ•„์š”ํ•˜์ง€ ์•Š๋‹ค. App ์„ ์žฌ์‹œ์ž‘ํ•˜๊ณ  BP ๊นŒ์ง€ ์‹คํ–‰ํ•ด. F7 ์„ ๋ˆŒ๋Ÿฌ call ์•ˆ์œผ๋กœ ๋“ค์–ด๊ฐ€์„œ nag ์„ ์ฐพ์ž. REMARK : this is exactly what TC (trace call == run trace) can do and more. In fact, it would be stupid to do it with animate over/in. ์ฃผ๋ชฉ : ์ด๊ฒƒ์€ ์ •ํ™•ํžˆ TC(trace call == run trace)์€ ์ข€ ๋” ํ•  ์ˆ˜ ์žˆ๋‹ค. ์‚ฌ์‹ค, ์ด๊ฒƒ์€ ๋ฉ์ฒญํ•œ ์ง“์ด๋‹ค. Animate over/in ์œผ๋กœ ํ•  ์ˆ˜ ์žˆ๋‹ค. My only goal here is to explain a little more in-depth what all possibilities you have in Olly. ์˜ค์ง ์ด๊ณณ์—์„œ ๋‚˜์˜ ๋ชฉํ‘œ๋Š” ์•ฝ๊ฐ‚์˜ ๊นŠ์ด ์žˆ๋Š” ๊ฒƒ์„ ์„ค๋ช…ํ•˜๊ธฐ ์œ„ํ•œ ๋ชจ๋“  ๊ฐ€๋Šฅ์„ฑ์„ Olly ๋Š” ๊ฐ€์ง€๊ณ  ์žˆ๋‹ค. Now that you know all this, you will also understand that when animating over with Olly, I immediately found where the nag is created, and I have put a BP there already. ์ด์ œ ๋„ˆ๋„ ๋ชจ๋“  ๊ฒƒ์„ ์•Œ ๊ฒƒ์ด๋‹ค, Animating ์ด ๋  ๋•Œ ์ดํ•ดํ•  ๊ฒƒ์ด๋‹ค. ๋‚˜๋Š” ์ฆ‰์‹œ Nag ์ด ์ƒ์„ฑ๋œ ๊ณณ์„ ์ฐพ๋Š”๋‹ค. ๊ทธ๋ฆฌ๊ณ  ์ด๋ฏธ BP ๋ฅผ ์„ค์น˜ํ•ด ๋†จ๋‹ค. One important remark however : always check the last steps from Olly till the created window to verify if they are really the last ones. ์ค‘์š”ํ•œ ๊ฒƒ์€ ์ด๊ฒƒ์ด๋‹ค ์ฃผ๋ชฉ : ๋งŠ์•ฝ์— ๊ทธ๋“ค์ด ์ •๋ง ๋งˆ์ง€๋ง‰ ๊ฒƒ์ด๋ผ๋ฉด ํ•ญ์ƒ Olly ์—์„œ ๋งŠ๋“ค์–ด์ง‚ window ๋ฅผ ๊ฒ€์ฆํ•˜๊ธฐ ์œ„ํ•ด ๋งˆ์ง€๋ง‰ step ์„ check ํ•œ๋‹ค. Olly sometimes animates OVER the last call -showing you the window too soon-instead of animating IN itโ€ฆ. Olly ๋Š” ๊ฐ€๋” ๋งˆ์ง€๋ง‰ call ์„ ๋ณด์—ฌ์ฃผ๊ธฐ ์œ„ํ•ด์„œ.(๋„ˆ์—๊ฒŒ ๋นจ๋ฆฌ ๋ณด์—ฌ์ฃผ๊ธฐ ์œ„ํ•ด) animate ๋ฅผ ํ•œ๋‹ค. Now comes a long way of stepping F8 without jump changes. To reduce movie size, I have removed it from this movie, and so, we arrive โ€ฆ. Jump ์—†์ด F8 ์„ ๋ˆŒ๋Ÿฌ ์ง‚ํ–‰ํ•˜๋Š” ๋‹ค๋ฅธ ๋ฐฉ๋ฒ•์ด ์˜จ๋‹ค. Movie size ๋ฅผ ์ฃฟ์ด๊ธฐ ์œ„ํ•ด, ๋‚˜๋Š” ์ด movie ์—์„œ ์‚ญ์ œํ–ˆ๋‹ค. ๊ทธ๋ฆฌ๊ณ  ์šฐ๋ฆฌ๋Š” ๋„์ฐฉํ–ˆ๋‹ค.
  • 26. โ€ฆhere, in a JE that again brings no changes to before. ์—ฌ๊ธฐ, JE ๋Š” ์ ‚๊ณผ ๋งˆ์ฐฌ๊ฐ€์ง€๋กœ ๋ฐ”๋€Œ์ง€ ์•Š๋Š”๋‹ค. This jump could have been important though because it could jump to an XOR (setting register to zero) ์ด jump ๋Š” ์ค‘์š”ํ–ˆ๋‹ค. ์™œ๋ƒํ•˜๋ฉด ๊ทธ๊ฒƒ์€ XOR ๋กœ jump ํ•  ์ˆ˜ ์žˆ๋‹ค.(register ๋ฅผ zero ๋กœ setting) Remark where the nag was created when I first stepped this program. Let's continue stepping. Pay attention because this is undoubtedly where it will all happen ์ฃผ๋ชฉ. ์ฒ˜์Œ์œผ๋กœ program ์„ ์ง‚ํ–‰ํ•  ๋•Œ ์ด ๊ณณ์—์„œ nag ์€ ์ƒ์„ฑ๋๋‹ค. ๊ณ„์† ํ•ด๋ณด์ž. ์ง‘์ค‘ํ•ด. ์™œ๋ƒํ•˜๋ฉด ์ด๊ฒƒ์€ ๋ฌด์Šจ ์ผ์ด ๋ฐœ์ƒํ• ์ง€ ํ™•์‹คํ•˜๋‹ค.
  • 27. Remark that this JE if executed would jump over the nag. Now scroll down to see the jump. ์ฃผ๋ชฉ. JE ๊ฐ€ ์‹คํ–‰๋œ๋‹ค๋ฉด nag ์„ jump ํ•  ๊ฒƒ์ด๋‹ค. ์Šคํฌ๋กŸ ๋ฐ‘์œผ๋กœ ๋‚ด๋ ค์„œ jump ํ•˜๋Š” ๊ณณ์„ ๋ด. Mmmm, jumping could perhaps be a solution but let's first see what happens without trying this.
  • 28. ์Œ, jumping ์€ ์•„๋งˆ ํ•ด๊ฒฐ์ฑ…์ด๋‹ค. ๋„์ ‚ ์—†์ด ๋จผ์ € ๋ฌด์—‡์ด ๋ฐœ์ƒํ–ˆ๋Š”์ง€ ๋ด. Scroll back up. ์Šคํฌ๋กŸ์„ ์›๋ž˜๋Œ€๋กœ ๋Œ๋ ค. Later, we will find that this jump leads to program's exit. ์šฐ๋ฆฌ๋Š” jump ๊ฐ€ program ์„ exit ํ•˜๋Š” ๊ณณ์œผ๋กœ lead ํ•  ๊ฒƒ์ด๋‹ค. Mmmm, and this JNZ, if executed, jumps past the Nag too โ€ฆ. This is another possible solution ์Œ, ์ด JNZ ๊ฐ€ ์‹คํ–‰๋œ๋‹ค๋ฉด, nag ์„ jump ํ•œ๋‹ค. ์ด๊ฒƒ์€ ๋‹ค๋ฅธ ํ•ด๊ฒฐ์ฑ…์ด๋‹ค.
  • 29. Oho, and this is the one that has changed! See how easy it is in this way to find what needs to be patched !!!! ์˜คํ˜ธ, ์ด๊ฒƒ์€ ๋ฐ”๋€Œ์—ˆ๋‹ค. ํŒจ์น˜๊ฐ€ ํ•„์š”ํ•œ๋ฐ ๊ทธ ๋ฐฉ๋ฒ•์ด ์–ผ๋งˆ๋‚˜ ์‰ฌ์šด์ง€ ์ด ๋ฐฉ๋ฒ•์„ ํ†ตํ•ด ์ฐพ์•„๋ณด์ž. Notice that this jump, now executed because of trial expiration, will bring us over the nag.
  • 30. ์ด jump ๋Š”, ์™œ๋ƒํ•˜๋ฉด trial ๋งŠ๊ธฐ๋ฅผ ์‹คํ–‰ํ–ˆ๋‹ค. Nag ์„ ์‹คํ–‰ํ•˜์ง€ ์•Š๋Š”๋‹ค. Let's first see what happens now before deciding what and where to patch. So press F8 to take the jump ์ฒซ๋ฒˆ์งธ๋กœ ๋ฌด์—‡์ด ๋ฐœ์ƒํ•˜๋Š”์ง€ ๋ณด๊ณ  ๋ฌด์—‡์„ ๊ทธ๋ฆฌ๊ณ  ์–ด๋””์— patch ํ• ์ง€ ๊ฒฐ์ •ํ•ด. ๊ทธ๋ž˜์„œ F8 ์„ ๋ˆŒ๋Ÿฌ jump ๋ฅผ ํ•˜์ž. And we land here. Continue stepping F8 ์šฐ๋ฆฌ๋Š” ์—ฌ๊ธฐ์— ๋„์ฐฉํ•œ๋‹ค. F8 ์„ ๋ˆŒ๋Ÿฌ ๊ณ„์†ํ•˜์ž. See what happens if a trial limit has been reached. Trial ์ด ์ œํ•œ์ด ๋๋‹ค๋ฉด ๋ฌด์—‡์ด ๋ฐœ์ƒํ•˜๋Š”์ง€ ๋ด.
  • 31. This nag was generated in this call huh. Breakpointing it is also a good visual aid. ์ด nag ์€ ์ด call ์—์„œ ์ƒ์„ฑ๋๋‹ค. ๋˜ํ•œ Breakpoint ์€ ์ข‹๋‹ค. Now, we only need to study the code further as we partially did already. You can do it for yourself and detect that there are different possibilities (like stated already). ์ด์ œ, ์šฐ๋ฆฌ๊ฐ€ ์ด๋ฏธ ๋ถ€๋ถ„์ ์œผ๋กœ ํ–ˆ์„ ๋•Œ ์šฐ๋ฆฌ๋Š” code ๋ฅผ ๋ฉ€๋ฆฌ ๊ณต๋ถ€ํ•˜๋Š” ๊ฒŒ ํ•„์š”ํ•˜๋‹ค. ์ž์‹ž์„ ์œ„ํ•ด ํ•  ์ˆ˜ ์žˆ๋‹ค. ๊ทธ๋ฆฌ๊ณ  ๋‹ค๋ฅธ ๊ฐ€๋Šฅ์„ฑ์„ ๋ฐœ๊ฒฌํ–ˆ๋‹ค.(์ด๋ฏธ ์ •ํ•ด์ง‚ ๊ฒƒ์ฒ˜๋Ÿผ)
  • 32. The cond jump, just above this screen at 004898D8 (not visible here, see before) leads to exiting the app : no need to touch that. Which leaves us with two other possibilities. ์กฐ๊ฑด jump ๋Š”, ์ด screen ์˜ 004898D8 ์—์„œ(์ด๊ณณ์—์„œ๋Š” ๋ณด์—ฌ์ง€์ง€ ์•Š๋Š”๋‹ค, ๋‚˜์ค‘์— ๋ณด์ž) app ์ข…๋ฃŒ๋กœ ์ด๋ˆ๋‹ค. ๋” ์ด์ƒ ์ œ์–ด๊ฐ€ ํ•„์š”ํ•˜์ง€ ์•Š๋‹ค. ์šฐ๋ฆฌ๋Š” 2 ๊ฐ€์ง€ ๊ฐ€๋Šฅ์„ฑ๊ณผ ํ•จ๊ป˜ ๋– ๋‚œ๋‹ค. Right. If we would take this jump, it jumps past both nags.
  • 33. ๋งž์•„. ์šฐ๋ฆฌ๊ฐ€ jump ๋ฅผ ํ•œ๋‹ค๋ฉด, 2 ๊ฐ€์ง€ nag ์„ jump ํ•  ์ˆ˜ ์žˆ๋‹ค. Also, if executed, doesn't it jump to exit the program ??? ๋˜ํ•œ, ์‹คํ–‰๋œ๋‹ค๋ฉด, program ์ด ์ข…๋ฃŒ๋˜๋Š” jump ๊ฐ€ ํ•„์š”ํ•˜์ง€ ์•Š๋‹ค. This will prove to be the easiest patch. ์‰ฌ์šด patch ์ธ์ง€ ์ฆ๋ช…ํ•  ์ˆ˜ ์žˆ๋‹ค. I'll come back to this solution later. ๋‚˜๋Š” ๋‚˜์ค‘์— ๋‹ค๋ฅธ ํ•ด๊ฒฐ์ฑ…์„ ๊ฐ€์ง€๊ณ  ๋Œ์•„์˜ฌ ๊ฒƒ์ด๋‹ค. But because we are here to learn, let's also study the other possibilities ์™œ๋ƒํ•˜๋ฉด ์šฐ๋ฆฌ๋Š” ์—ฌ๊ธฐ์—์„œ ๋ฐฐ์›Œ์•ผ ํ•œ๋‹ค. ๋˜ํ•œ ๋‹ค๋ฅธ ๊ฐ€๋Šฅ์„ฑ์„ ๋ฐฐ์šฐ์ž. The other possibility is to NOP this JLE so that we do not jump but so that the code runs automatically till the first nag. ์ด JLE ์—์„œ jump ํ•˜์ง€ ์•Š๋„๋ก ๋‹ค๋ฅธ ๊ฐ€๋Šฅ์„ฑ์ด ์žˆ๋Š” ๊ฒƒ์€ NOP ๋‹ค. code ๊ฐ€ ์ž๋™์ ์œผ๋กœ ์ฒซ๋ฒˆ์งธ nag ๊นŒ์ง€ ์‹คํ–‰๋œ๋‹ค. Of which we see this an immediate call for the nag creation : do understand that the nag is generated in the above call at 004898FE, but is effectively created in MFC42.dll in this call at 489912. ์ฆ‰์‹œ nag ๋งŠ๋“œ๋Š” call ์„ ๋ณธ๋‹ค. : ์ด call ์˜ 004898FE ์œ„์—์„œ nag ์ด ์ƒ์„ฑ๋˜๋Š” ๊ณณ์„ ์ดํ•ดํ•  ์ˆ˜ ์žˆ๋‹ค. ํšจ๊ณผ์ ์œผ๋กœ MFC42.dll ์•ˆ์˜ 489912 ์—์„œ ์ƒ์„ฑ๋˜์—ˆ๋‹ค. If we NOP this call here and the JLE above, then the application will also run as if registered ! ์šฐ๋ฆฌ๋Š” ์ด call ์—์„œ ์•„๋ฌด ๋™์ž‘ํ•˜์ง€ ์•Š๊ณ  JLE ๊ฐ€ ์œ„์— ์žˆ์œผ๋ฉด, application ์€ ๋“ฑ๋ก๋œ ๊ฒƒ์ฒ˜๋Ÿผ ์‹คํ–‰๋œ๋‹ค.
  • 34. Of course there are always other possibilities. ๋ฌผ๋กž ๊ทธ๊ฒƒ์€ ํ•ญ์ƒ ๋‹ค๋ฅธ ๊ฐ€๋Šฅ์„ฑ๋“ค์ด ์žˆ๋‹ค. For example : assembling this line from the call as MOV EAX, 1 instead of NOP'ing it โ€ฆ ์˜ˆ : call ๋กœ๋ถ€ํ„ฐ MOV EAX, 1 ์ผ ๋•Œ ๋Œ€์‹žํ•ด์„œ ์ด line ์„ assembling ํ•ด์„œ NOP ํ•ด์•ผ ๋œ๋‹ค. Registers the app and jumps straight to the main program App ์„ ๋“ฑ๋กํ•˜๊ณ  main program ์œผ๋กœ ์ง์ ‘ jump ํ•˜์ž. However, in the case, each other start up unregisters the app because of a doublecheck With another annoying nag as result. Then you also need to make the following changes to also jump over that nag : ๊ทธ๋Ÿฌ๋‚˜, ์ด๋ฒˆ ๊ฒฝ์šฐ๋Š” ๊ฐ๊ฐ ๋‹ค๋ฅธ start up app ์ด ๋ฏธ๋“ฑ๋ก ๋˜์—ˆ๋‹ค. ์™œ๋ƒํ•˜๋ฉด ๋‹ค๋ฅธ nag ์„ ํšŒํ”ผํ•  ๋•Œ 2 ๋ฒˆ check ํ•œ๋‹ค. ๋„ˆ๋Š” ๋˜ nag ์„ jump ํ•˜๊ธฐ ์œ„ํ•ด ๋‹ค์Œ ๋ณ€๊ฒฝ์ด ํ•„์š”ํ•˜๋‹ค. RVA 488C83 MOV AL,1 Or RVA 488C85 JMP 488D10 (or other possibilities to jump past that nag) (๊ณผ๊ฑฐ์˜ nag ์„ jump ํ•˜๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฐ€๋Šฅ์„ฑ) Try it out if you want to learn !!! ๋„ค๊ฐ€ ๋ฐฐ์šฐ๊ธฐ๋ฅผ ์›ํ•œ๋‹ค๋ฉด ๋„์ ‚ ํ•ด๋ด.
  • 35. Another possibility is not noping this JLE but jump always ๋‹ค๋ฅธ ๊ฐ€๋Šฅ์„ฑ์€ NOP ์„ ํ•˜์ง€ ์•Š๋Š”๋‹ค. ์ด JLE ์—์„œ๋Š” ํ•ญ์ƒ jump ๊ฐ€ But then change this Call to the expired nag (remark that is the same call as above) ๊ทธ๋Ÿฌ๋‚˜ ์ข…๋ฃŒ๋˜๋Š” nag ์—์„œ ์ด call ์„ ๋ฐ”๊ฟ”์•ผ ํ•œ๋‹ค.(์ฃผ๋ชฉ. ์ด๊ฒƒ์€ ์œ„์™€ ๊ฐ™์€ call ์ด๋‹ค.) And assemble this call as MOV EAX, 1 etc etc etc As you can see, plenty of possibilities for you to try out(they all are working solutions) ๊ทธ๋ฆฌ๊ณ  ์ด call ์ด MOV EAX,1 ์ผ ๋•Œ assemble. ๋„ค๊ฐ€ ๋ณผ ๋•Œ, ๋„์ ‚ํ•˜๊ธฐ ์œ„ํ•œ ๋ง‹์€ ๊ฐ€๋Šฅ์„ฑ์ด ๋„ˆ์—๊ฒŒ ์žˆ๋‹ค.(๊ทธ๋“ค์€ ๋ชจ๋‘ ํ›Œ๋ฅญํ•œ ํ•ด๊ฒฐ์ฑ…์ด๋‹ค.) Indeed, let's come back to our first possibility to jump past both nags at once ์ •๋ง, ๊ณผ๊ฑฐ์˜ 2 ๊ฐœ์˜ nag ์„ ํ•œ ๋ฒˆ์— jump ํ•˜๊ธฐ ์œ„ํ•ด ์ฒซ๋ฒˆ์งธ ๊ฐ€๋Šฅ์„ฑ์œผ๋กœ ๋Œ์•„์™€. If you tried it out, you will have found that it turns out as the easiest solution because it's only one patch. ๋งŠ์•ฝ์— ๋„ค๊ฐ€ ๋„์ ‚ํ•œ๋‹ค๋ฉด, ๋„ˆ๋Š” ๋Œ์•„์˜ค๋Š” ๊ฒƒ์„ ์ฐพ์„ ๊ฒƒ์ด๋‹ค. ๋งค์šฐ ์‰ฌ์šด ๋ฐฉ๋ฒ•์ด๋‹ค. ์™œ๋ƒํ•˜๋ฉด ์˜ค์ง 1 ๋ฒˆ patch ํ•˜๋ฉด ๋œ๋‹ค. I tried it too, but it is something you understand by now and so I removed it from this movie to reduce the movie's size. ๋‚˜๋Š” ๋„์ ‚ํ–ˆ๋‹ค, ๊ทธ๋Ÿฌ๋‚˜ ๊ทธ๊ฒƒ์€ ๋ฌด์—‡์ด๋‹ค. ์ง€๊ธˆ ๋„ค๊ฐ€ ์ดํ•ดํ–ˆ๊ณ  ๋‚˜๋Š” ๊ทธ๊ฒƒ์„ Movie size ๋•Œ๋ฌธ์— ์‚ญ์ œํ–ˆ๋‹ค. BTW, it causes no other nags either By the way, ๊ทธ๊ฒƒ์€ ๋‹ค๋ฅธ nag ์˜ ์›์ธ์„ ์ดˆ๋ž˜ํ•˜์ง€ ์•Š์•˜๋‹ค.
  • 36. Conclusion : TEST AL, AL means : "Is the soft registered ?" Scroll down. ๊ฒฐ๋กž : TEST AL, AL ๋œป : "์–ด๋–ป๊ฒŒ soft ๋“ฑ๋ก์„ ํ•ด?" ์Šคํฌ๋กŸ ๋‚ด๋ ค๋ด. This is the cond jump that leads to exiting the app. ์ด ์กฐ๊ฑด jump ๋Š” app ์„ ์ข…๋ฃŒ ์‹œํ‚จ๋‹ค.
  • 37. We decided to patch 004898E1 to jump always. This will be plain stupid patching. I will come back to this in next tutorials. ์šฐ๋ฆฌ๋Š” 004898E1 ์„ ํ•ญ์ƒ jump ํ•˜๊ธฐ๋กœ ๊ฒฐ์ •ํ–ˆ๋‹ค. ์ด๊ฒƒ์€ ๋ถ„๋ช…ํžˆ ๋ฉ์ฒญํ•œ patch ๋‹ค. ๋‚˜๋Š” ๋‹ค์Œ tutorial ์— ์ด๊ฒƒ์„ ๊ฐ€์ง€๊ณ  ๋Œ์•„์˜ค๊ฒ ๋‹ค. For now, I'll just state that indeed, we could dig deeper and find out where EDI+E0 is set
  • 38. ์ง€๊ธˆ์€, ๋ช…์‹œํ–ˆ๋‹ค. ์šฐ๋ฆฌ๊ฐ€ ๊นŠ๊ฒŒ ๋“ค์–ด๊ฐ€๊ณ  EDI+E0 ์ด set ๋œ ๊ฒƒ์„ ์ฐพ์•„. Do you understand that the value for EDI+E0 is where the decision on being registered or not is stored ??? ์ดํ•ดํ–ˆ์–ด. EDI+E0 ๊ฐ’์ด ๋“ฑ๋ก ๋๋Š”์ง€ ์•„๋‹Œ์ง€ ๊ฒฐ์ •ํ•œ๋‹ค. Try to understand this already but it's no problem if you don't understand here, as said, I'll come back to such situations in later parts ์ดํ•ดํ•˜๊ธฐ ์œ„ํ•ด ๋…ธ๋ ฅํ•ด๋ด. ๋„ค๊ฐ€ ์—ฌ๊ธฐ์—์„œ ์ดํ•ดํ•˜์ง€ ๋ชปํ•ด๋„, ๋ฌธ์ œ ์—†์–ด. ๋‚ด๊ฐ€ "๋‚˜๋Š” ๋‚˜์ค‘ part ์—์„œ ๋‹ค๋ฅธ ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•์œผ๋กœ ๋Œ์•„์˜ฌ ๊ฑฐ์•ผ." ๋ผ๊ณ  ๋งํ–ˆ์ง€. To quickly show you the results, I first removed this BP (where we exit app) and re-ran the soft till โ€ฆ ๋น ๋ฅด๊ฒŒ ๊ฒฐ๊ณผ๋ฅผ ๋ณด์—ฌ์ฃฟ๊ป˜, ๋จผ์ € ์ฒซ๋ฒˆ์งธ BP ๋ฅผ ์‚ญ์ œํ•ด(์ด๊ฒƒ์€ app ์„ ์ข…๋ฃŒํ•œ๋‹ค.) ๊ทธ๋ฆฌ๊ณ  ๋‹ค์‹œ ์—ฌ๊ธฐ๊นŒ์ง€ ์‹œ์ž‘ํ•ด. ...breaking here again.(Removed it for size) ์—ฌ๊ธฐ์— ๋ฉˆ์ถฐ(size ๋•Œ๋ฌธ์— movie ์—์„œ ์‚ญ์ œํ–ˆ๋‹ค)
  • 39. Remember that we decided that the program will be in registered status if we always jump here. ๊ธฐ์–ตํ•ด. ์šฐ๋ฆฌ๊ฐ€ ํ•ญ์ƒ ์ด๊ณณ์„ jump ํ•˜๋ฉด Program ์ด ๋“ฑ๋ก๋œ ์ƒํƒœ๋กœ ๋œ๋‹ค. Let me first show you once more how this can be tested, but remember that if we want to make these changes permanent, that we will need to assemble this as JMP 00489A29 ๋จผ์ € ์–ด๋–ป๊ฒŒ test ํ•˜๋Š”์ง€ ๋ณด์—ฌ์ฃฟ๊ป˜. ๊ทธ๋Ÿฌ๋‚˜ ๊ธฐ์–ตํ•ด. ์˜์›ํžˆ ๋ฐ”๊ฟ”์•ผ ๋ผ. ์šฐ๋ฆฌ๋Š” JMP 00489A29 ๋ฅผ assemble ํ•˜๋Š” ๊ฒŒ ํ•„์š”ํ•˜๋‹ค.
  • 40. You know the system if you've seen the previous Parts! ๋„ค๊ฐ€ ์ด์ ‚ ๊ฐ•์˜๋ฅผ ๋ดค๋‹ค๋ฉด ์•Œ๊ณ  ์žˆ์„ ๊ฑฐ์•ผ. Once again : I hope you understand that if this works, we will have to change this JNZ to always jump
  • 41. ๋‹ค์‹œ ํ•œ ๋ฒˆ : ๋‚˜๋Š” ์ด๊ฒƒ์ด ๋ฌด์Šจ ์ผ์„ ํ•˜๋Š”์ง€ ๋„ค๊ฐ€ ์ดํ•ดํ–ˆ์„ ๊ฑฐ๋ผ ์ƒ๊ฐํ•ด. ์šฐ๋ฆฌ๋Š” JNZ ๋ฅผ ํ•ญ์ƒ JMP ํ•˜๊ฒŒ ๋ฐ”๊ฟ€ ๊ฒƒ์ด๋‹ค. So, jump will be taken now. ๊ทธ๋ž˜์„œ, ์ด์ œ jump ๋ฅผ ํ•  ๊ฑฐ์•ผ. Press F9 to run F9 ๋ฅผ ๋ˆŒ๋Ÿฌ ์‹คํ–‰ ํ•ด. And bamโ€ฆ..we land immediately in the main program window. No starting nag anymore Of course, all this has no influence on the closing nag. ์˜ค..์šฐ๋ฆฌ๋Š” ์ฆ‰์‹œ main program window ์— ๋„์ฐฉํ–ˆ๋‹ค. ๋ฌผ๋กž ๋” ์ด์ƒ starting nag ์ด ์—†๋‹ค. Closing nag ์˜ ์˜ํ–ฅ๋„ ์—†๋‹ค. So, let's see what happens if we close the app ๊ทธ๋ž˜์„œ, ์šฐ๋ฆฌ๊ฐ€ app ์„ ๋‹ซ์•˜์„ ๋•Œ ๋ฌด์Šจ ์ผ์ด ๋ฐœ์ƒํ•˜๋Š”์ง€ ๋ด๋ผ. Indeed. Now, this is a completely useless advertisement, right? Let's investigate if our reversing capabilities are that good already that we find how to remove this nag :) ์ •๋ง, ์ด์ œ ์™„๋ฒฝํžˆ ๋ถˆํ•„์š”ํ•œ ๊ด‘๊ณ ๋‹ค. ๊ทธ๋ ‡์ง€? ์กฐ์‚ฌํ•˜์ž. ์šฐ๋ฆฌ๋Š” reversing ๋Šฅ๋ ฅ์ด ์ด๋ฏธ ์žˆ๋‹ค. ์šฐ๋ฆฌ๋Š” ์ด nag ์„ ์–ด๋–ป๊ฒŒ ์‚ญ์ œํ• ์ง€ ์ฐพ์„ ๊ฒƒ์ด๋‹ค.
  • 42. I also want to show you a quick way to find your way in a program using the Call Stack. ๋‚˜๋Š” ๋„ˆ์—๊ฒŒ ๋ณด์—ฌ์ฃผ๊ธฐ ์œ„ํ•ด program ์˜ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ๋Š” Call Stack ์—์„œ ๋น ๋ฅธ ๋ฐฉ๋ฒ•์„ ์ฐพ๊ธฐ๋ฅผ ์›ํ•œ๋‹ค. Again, I'll come back to this in next tutorials with more practice on this. ๋‹ค์‹œ, ๋‚˜๋Š” ๋‹ค์Œ tutorial ์—์„œ ์ข€ ๋” ๋ง‹์€ ์—ฐ์Šต์œผ๋กœ ๋Œ์•„์˜ฌ ๊ฒƒ์ด๋‹ค. BTW, the Stack can bring us there too (see also next tuts) By the way, stack ์€ ์šฐ๋ฆฌ์—๊ฒŒ ๊ฐ€์ ธ์˜ฌ ๊ฒƒ์ด๋‹ค(๋‹ค์Œ tuts) Or animating over ;) ์•„๋‹ˆ๋ฉด animating ์„ ํ•ด๋ด. Or F8 and F7 of course ;) ์•„๋‹ˆ๋ฉด F8 ๊ณผ F7 ์„ ๋ˆŒ๋Ÿฌ. Now, to use the Call Stack, we need to pause Olly. ์ด์ œ, Call Stack ์„ ์‚ฌ์šฉํ•˜๊ธฐ ์œ„ํ•ด์„œ Olly ๋ฅผ ๋ฉˆ์ถฐ์•ผ ํ•œ๋‹ค. Other way to pause Olly is to set focus to Olly (instead of the nag screen) by clicking here and then pressing F12 ๋‹ค๋ฅธ ๋ฐฉ๋ฒ•์œผ๋กœ clicking ์„ ํ•˜๊ฑฐ๋‚˜ F12 ๋ฅผ ๋ˆ„๋ฆ„์œผ๋กœ ์ธํ•ด Olly ๋ฅผ ๋ฉˆ์ถ”๊ธฐ ์œ„ํ•ด ์ง‘์ค‘ํ•˜์ž. (nag screen ๋Œ€์‹ž์—)
  • 43. BTW, if you want to see where in the code the app waits for your input, you can always press Ctrl-F8 (animate over) when Olly is paused and see it all happen with your own eyes By the way, ๋งŠ์•ฝ์— code ์—์„œ ๋„ˆ์˜ ์ž…๋ ฅ์„ ๊ธฐ๋‹ค๋ฆฌ๋Š” ๊ฒƒ์„ ๋ณด๊ธฐ ์›ํ•œ๋‹ค๋ฉด. Olly ๊ฐ€ ๋ฉˆ์ท„์„ ๋•Œ ๋„ˆ๋Š” ํ•ญ์ƒ Ctrl-F8(animate over)๋ฅผ ๋ˆ„๋ฅผ ์ˆ˜ ์žˆ๋‹ค. ๊ทธ๋ฆฌ๊ณ  ๋ฌด์Šจ ์ผ์ด ์ผ์–ด๋‚˜๋Š”์ง€ ๋‘ ๋ˆˆ์œผ๋กœ ๋ด. And this can always be done if Olly is not running. I trust you understand this "animate over" feature can frequent be used to understand how Olly and how programs work Olly ๊ฐ€ ์‹คํ–‰ ์ค‘์ด ์•„๋‹ ๋•Œ ํ•ญ์ƒ ์‹คํ–‰๋๋‹ค. ๋‚˜๋Š” ๋„ค๊ฐ€ "animate over" ํŠน์ง•์„ ๋นˆ๋ฒˆํžˆ ์‚ฌ์šฉํ•  ๊ฒƒ์ด๋‹ค. Olly ์—์„œ ์–ด๋–ป๊ฒŒ ์‚ฌ์šฉํ•˜๊ณ  program ์€ ์–ด๋–ป๊ฒŒ ์ž‘๋™ํ•˜๋Š”์ง€ ์ดํ•ด ํ–ˆ์„ ๊ฒƒ์ด๋ผ ๋ฏฟ๋Š”๋‹ค. Call Stack So, this is a new window for you huh? ์ด๊ฒƒ์€ ๋„ˆ๋ฅผ ์œ„ํ•œ ์ƒˆ๋กœ์šด window ๋‹ค. Let me say for now that the Call Stack can be seen as a line-up from Olly for all calls that were executed that lead "in straight line" to screens that are shown. ์ด์ œ Call Stack ์„ ๋ณธ ๊ฒƒ์— ๋Œ€ํ•ด์„œ ์ด์•ผ๊ธฐ ํ•˜๊ฒ ๋‹ค. Olly ์—์„œ ๋ชจ๋“  call ์ด ์‹คํ–‰ ๋์„ ๋•Œ line-up ์ด ๋œ๋‹ค. ๋ณด์—ฌ์ฃผ๊ธฐ ์œ„ํ•ด "์ง์ ‘์ ์ธ line"์œผ๋กœ ์ด๋ˆ๋‹ค. Yeah yeah, I know, this is a bit shortsighted, but this is a good way to visualize it. More exact would be that it's an attempt from Olly to backtrace the sequence of calls on the stack. ์˜ˆ, ๋‚˜๋„ ์•Œ์•„, ๊ฝค ๊ทผ์‹œ์•ˆ์ ์ด๋ผ๋Š” ๊ฒƒ์„. ๊ทธ๋Ÿฌ๋‚˜ ์ด๊ฒƒ์€ ์‹œ๊ฐํ™”ํ•˜๊ธฐ ์ข‹์€ ๋ฐฉ๋ฒ•์ด๋‹ค. ์ข€๋” ์ •ํ™•ํ•˜๊ฒŒ Olly ์—์„œ stack ์—์„œ call ์˜ ์ˆœ์„œ๋ฅผ ์ถ”์ ํ•˜๊ธฐ ์œ„ํ•ด ์‹œ๋„ํ•ด ๋ณผ๋งŠํ•˜๋‹ค. BTW, we start from bottom and go up. ์šฐ๋ฆฌ๋Š” ๋ฐ”๋‹ฅ์—์„œ ์œ„๋กœ ์˜ฌ๋ผ๊ฐ‚๋‹ค. Notice that somewhere, Olly must have lost track, only the latest calls are shown.
  • 44. It's clear that we didn't start in user32.dll huh :) Olly ๊ฐ€ ๊ธธ์„ ์žƒ์€ ๊ณณ์„ ์•Œ๋ ค์ฃพ๋‹ค. ์˜ค์ง ์ตœ๊ทผ call ์„ ๋ณด์—ฌ์ฃพ๋‹ค. ์ด๊ฒƒ์€ ๋ช…ํ™•ํ•˜๋‹ค. ์šฐ๋ฆฌ๋Š” user32.dll ์—์„œ ์‹œ์ž‘ํ•˜์ง€ ์•Š์•˜๋‹ค. Now, study this a little and you will quickly understand that this nag was called by the program at this address ์ด์ œ, ์ด๊ณณ์„ ๊ณต๋ถ€ํ•ด๋ณด์ž. ๊ทธ๋ฆฌ๊ณ  ๋„ˆ๋Š” Program ์˜ ์ด ์ฃผ์†Œ์—์„œ Nag ์ด ๋ถˆ๋Ÿฌ์ง€๋Š” ๊ฒƒ์„ ๋น ๋ฅด๊ฒŒ ์ดํ•ดํ•  ๊ฒƒ์ด๋‹ค. And was then created in the MFC32.dll here. Notice the API ๊ทธ๋ฆฌ๊ณ  MFC32.dll ์ด๊ณณ์—์„œ ์ƒ์„ฑ๋๋‹ค. ์ด๊ฒƒ์€ API ๋‹ค. In Olly, we can doubleclick this line to go there in the code. Let's do that too Olly ์—์„œ ์šฐ๋ฆฌ๋Š” ์ด line ์„ doubleclick ํ•˜์—ฌ ๊ฐˆ ์ˆ˜ ์ˆ˜ ์žˆ๋‹ค. ํ•ด๋ณด์ž. Aha, so this is the call to the nag ์•„ํ•˜, ์ด call ์€ nag ์œผ๋กœ ํ–ฅํ•œ๋‹ค. And indeed, see the same call MFC42.dll.#2514 again. Let's place a BP here and scroll up to get a better view on the code above ์ •๋ง, ์šฐ๋ฆฌ๋Š” ๊ฐ™์€ MFC42.dll.#2514 call ์„ ๋‹ค์‹œ ๋ณธ๋‹ค. ์ด๊ณณ์— BP ๋ฅผ ์„ค์น˜ํ•˜๊ณ  ์ข€ ๋” ์ข‹์€ ์‹œ์•ผ๋ฅผ ์œ„ํ•ด scroll ์˜ฌ๋ ค.
  • 45. Mmmm, all right. This is an easy one. This is a direct call to the nag creation. If we NOP this call, The nag screen will be gone forever. Let's first try it out. So, restart Remember this address for patching later !!! ์Œ, ์ข‹์•„. ์ด๊ฒƒ์€ ์‰ฝ๋‹ค. ์ด๊ฒƒ์€ ์ง์ ‘์ ์œผ๋กœ nag ์„ ์ƒ์„ฑํ•˜๋Š” ๊ณณ์œผ๋กœ call ํ•œ๋‹ค. ์šฐ๋ฆฌ๋Š” ์ด call ์„ NOP ํ•œ๋‹ค๋ฉด, Nag ์€ ์˜์›ํžˆ ์—†์–ด์งˆ ๊ฒƒ์ด๋‹ค. ๋จผ์ € ์‹œ์ž‘ํ•ด ๋ณด์ž. ๊ทธ๋ž˜์„œ, ์žฌ์‹œ์ž‘ ๋‚˜์ค‘์— patch ๋ฅผ ์œ„ํ•ด ์ด ์ฃผ์†Œ๋ฅผ ๊ธฐ์–ตํ•ด. 5. Patching and testing Yep, we land in the BPs from the cond jumps to the nags ์˜ˆ, ์šฐ๋ฆฌ๋Š” nag ์œผ๋กœ ํ–ฅํ•˜๋Š” ์กฐ๊ฑด jump ๊ฐ€ ์žˆ๋Š” BP ์— ๋„์ฐฉํ–ˆ๋‹ค.
  • 46. Now, we have found before that changing this JNZ to always jump was the best solution (remember it ?) ์ด์ œ, ์šฐ๋ฆฌ๋Š” ํ•ด๊ฒฐ์ฑ…์„ ์ฐพ์•˜๋‹ค. ๊ทธ๋Ÿฌ๊ณ ๋‚˜์„œ JNZ ๋ฅผ ํ•ญ์ƒ jump ๋กœ ๋ฐ”๊พธ๋Š” ๊ฒƒ์ด ๊ฐ€์žฅ ์ข‹์€ ํ•ด๊ฒฐ์ฑ…์ด๋‹ค.(๊ธฐ์–ตํ•ด?) Let's make this permanent but first study how this can be done. ์˜์›ํžˆ ๋ฐ”๊พผ๋‹ค. ๊ทธ๋Ÿฌ๋‚˜ ๋จผ์ € ์–ด๋–ป๊ฒŒ ํ•˜๋Š”์ง€ ๊ณต๋ถ€ํ•˜์ž. Scroll up a little. ์Šคํฌ๋กŸ ์˜ฌ๋ ค๋ด. Mmmm, there are different possibilities of course ์Œ, ์ด๊ณณ์€ ๋‹ค๋ฅธ ๊ฐ€๋Šฅ์„ฑ์ด ์žˆ๋‹ค. Do you see one? ๋ณด์—ฌ?
  • 47. Right, this for example ์ข‹์€ ์˜ˆ๋‹ค. Or the same change the line above ๊ฑฐ๋‚˜ ์œ„์˜ line ๋„ ๊ฐ™์ด ๋ฐ”๊พผ๋‹ค. Anyway, this change also makes Al equal 1 and that's always more secure then just plain stupid patching the JNZ to JMP ์–ด์จŒ๋“ , ์ด ๋ณ€ํ™”๋Š” Al ์„ 1 ๊ณผ ๊ฐ™์ด ๋งŠ๋“ ๋‹ค. ๊ทธ๋ฆฌ๊ณ  ๋ถ„๋ช…ํžˆ ๋ฉ์ฒญํ•œ JNZ to JMP patch ๋ณด๋‹ค ํ•ญ์ƒ ์•ˆ์ ‚ํ•˜๋‹ค. Now, save these changes to file in the usual way. Because you know how to do it, I skipped this in the movie to reduce its size. ์ด์ œ, ๋ฐ”๋€ ๋ณ€ํ™”๋“ค์„ ์ผ๋ฐ˜์ ์ธ ๋ฐฉ๋ฒ•์œผ๋กœ ํŒŒ์ผ๋กœ ์ €์žฅํ•˜์ž. ์™œ๋ƒํ•˜๋ฉด ์šฐ๋ฆฌ๊ฐ€ ์–ด๋–ป๊ฒŒ ํ–ˆ๋Š”์ง€ ์•Œ๊ฒ ์ง€. Movie size ๋ฅผ ์ฃฟ์ด๊ธฐ ์œ„ํ•ด์„œ skip ํ–ˆ๋‹ค. And so we land here to start the saved app again. Notice that the app has been saved under another name. Let's see if it works. ๊ทธ๋ฆฌ๊ณ  ์šฐ๋ฆฌ๋Š” ์ด๊ณณ์— ์ €์žฅ๋œ app ์„ ๋‹ค์‹œ ์‹œ์ž‘ํ•˜๊ธฐ ์œ„ํ•ด ๋„์ฐฉํ–ˆ๋‹ค. App ์€ ๋ฐ‘์—์„œ ๋‹ค๋ฅธ ์ด๋ฆ„์œผ๋กœ ์ €์žฅ๋๋‹ค. ์–ด๋–ป๊ฒŒ ์ž‘๋™ํ•˜๋Š”์ง€ ๋ณด์ž. Run Aha ! The starting nag is killed. ์‹คํ–‰ ์•„ํ•˜! Starting nag ์ด ์ฃฝ์—ˆ๋‹ค. So now, let's attack the annoying closing nag.
  • 48. Go to Olly and โ€ฆ. ์ด์ œ ํšŒํ”ผํ•˜๋Š” closing nag ์„ ๊ณต๊ฒฉํ•˜์ž. Olly ๋กœ ๋Œ์•„๊ฐ€. โ€ฆ we land here in the nag code because I meanwhile used the goto button to come here (removed from video for size) ์šฐ๋ฆฌ๋Š” nag code ๊ฐ€ ์žˆ๋Š” ์ด๊ณณ์— ๋„์ฐฉํ–ˆ๋‹ค. ์™œ๋ƒํ•˜๋ฉด ๋‚˜๋Š” goto button ์„ ๊ฐ€๊ธฐ ์œ„ํ•ด ์‚ฌ์šฉํ–ˆ๋‹ค. (movie size ๋ฅผ ์ฃฟ์ด๊ธฐ ์œ„ํ•ด ์‚ญ์ œํ–ˆ๋‹ค.) Told you to remember the address huh? ๋‚ด๊ฐ€ ์ด์•ผ๊ธฐํ–ˆ๋˜ ์ฃผ์†Œ ๊ธฐ์–ตํ•ด? Remember this was the NAG? Nag ์ด๋ผ๋Š”๊ฑธ ๊ธฐ์–ตํ•ด? Of course, the BP's are not here anymore because the application was restarted under a different name. ๋ฌผ๋กž, BP ๋Š” ์ด๊ณณ์— ๋” ์ด์ƒ ์—†๋‹ค. ์™œ๋ƒํ•˜๋ฉด application ์„ ๋‹ค๋ฅธ ์ด๋ฆ„์œผ๋กœ ์žฌ์‹œ์ž‘ ํ–ˆ๊ธฐ ๋•Œ๋ฌธ์ด๋‹ค. I'll show you how it looked when we last left here :) ๋‚˜๋Š” ๋„ˆ์—๊ฒŒ ์šฐ๋ฆฌ๊ฐ€ ๋งˆ์ง€๋ง‰์— ๋จธ๋ฌผ๋ €๋˜ ์ด๊ณณ์„ ์–ด๋–ป๊ฒŒ ๋ณด๋Š”์ง€ ๋ณด์—ฌ์ฃฟ ๊ฒƒ์ด๋‹ค. And also remember that we can NOP this right away, without needing to dig deeper in the dll ๊ทธ๋ฆฌ๊ณ  ๊ธฐ์–ตํ•ด. ์šฐ๋ฆฌ๋Š” NOP ์„ ํ•  ์ˆ˜ ์žˆ๋‹ค. Dll ์†์œผ๋กœ ๊นŠ์ด ๋“ค์–ด๊ฐ€๋Š” ๊ฒŒ ํ•„์š”ํ•˜์ง€ ์•Š๋‹ค.
  • 49. Ok. Let's also make these changes permanent and save them to file Ok. ์˜์›ํžˆ ๋ฐ”๊พธ์ž. ๊ทธ๋ฆฌ๊ณ  file ๋กœ ์ €์žฅํ•ด. :) :)
  • 50. Let's immediately test the saved file ์ฆ‰์‹œ ์ €์žฅ๋œ file ์„ test ํ•˜์ž. :) Mmmm, this all seems all right, and now, what's with the closing nag ???? ์Œ, ์ข‹์•„, ์ด์ œ, closing nag ์€ ์–ด๋–ป๊ฒŒ ๋์ง€? Starting and closing nags are gone !! Starting ๊ณผ closing nag ์ด ์—†์–ด์กŒ๋‹ค !! The program is working like if it were registered. ๋“ฑ๋ก๋œ ๊ฒƒ์ฒ˜๋Ÿผ Program ์€ ์ผํ•œ๋‹ค. 6. Conclusion ์งˆ๋ฌธ ์ž˜ ์ดํ•ด๊ฐ€ ์•ˆ๋จ. ๋‹ค์‹œ ํ•œ ๋ฒˆ ํŒจ์น˜ํ•˜๋Š” ๋ถ€๋ถ„์„ ์ดํ•ดํ•ด์•ผ ๋จ. ์ ํ”„๋›ฐ๋Š” ๋ถ€๋ถ„์ด ์ž˜ ์ดํ•ด๊ฐ€ ์•ˆ๋ผ. ํ•œ๊ธ€ํŒ๋„ ๋ณด๋ฉด์„œ ์ดํ•ดํ•ด ๋ณด์ž. In this part 5, the primary goal was to get the feeling of the code, to understand how code is executed. ์ด๋ฒˆ part 5 ์—์„œ๋Š”, ๊ฐ€์žฅ ์ค‘์š”ํ•œ ๋ชฉํ‘œ๋Š” code ์— ๋Œ€ํ•œ ๋Š๋‚Œ์„ ์–ป๋Š” ๊ฒƒ์ด๋‹ค. Code ๊ฐ€ ์–ด๋–ป๊ฒŒ ์‹คํ–‰๋˜๋Š”์ง€ ์ดํ•ดํ–ˆ์„ ๊ฒƒ์ด๋‹ค. Also, we learned to find how and where to patch a program that shows visible other behaviour when or when not registered by simple stepping and comparing the conditional jumps. ๋˜ํ•œ, ์šฐ๋ฆฌ๋Š” ์–ด๋–ป๊ฒŒ ์ฐพ๋Š”์ง€ program ์„ ํŒจ์น˜ํ•˜๋Š”์ง€ ๋ฐฐ์› ๋‹ค. ๋‹ค๋ฅธ behaviour ๋ฅผ ๋ณด์—ฌ์ฃพ๋‹ค. ๊ฐ‚๋‹จํ•œ ์ง‚ํ–‰๊ณผ ์กฐ๊ฑด jump ์˜ ๋น„๊ต์— ์˜ํ•ด ๋“ฑ๋ก ๋์„ ๋•Œ๋‚˜ ๋“ฑ๋ก๋ผ์ง€ ์•Š์•˜์„ ๋•Œ ๋ณด์—ฌ์ฃพ๋‹ค. Meanwhile, we also learned something about animate over/in and setting different breakpoints. ๊ทธ ๋™์•ˆ, ์šฐ๋ฆฌ๋Š” ๋˜ํ•œ ๋ฌด์–ถ๊ฐ€๋ฅผ animate over/in ํ•˜๋Š” ๊ฒƒ๊ณผ ๋‹ค๋ฅธ breakpoint setting ๋ฒ•์„ ๋ฐฐ์› ๋‹ค. I hope you understood everything fine and I also hope someone somewhere learned something from this. See me back in part 06 ;) ๋ชจ๋“  ๊ฒƒ์„ ์ž˜ ์ดํ•ดํ–ˆ๊ธฐ๋ฅผ ๋ฐ”๋ž€๋‹ค. ๊ทธ๋ฆฌ๊ณ  ๋‚˜๋Š” ๋ˆ„๊ตฌ๋“ ์ง€ ์–ด๋Š ๊ณณ์—์„œ๋“ ์ง€ ์ด๊ฒƒ์—์„œ ๋ฌด์—‡์ด๋“ ์ง€ ๋ฐฐ์› ๊ธฐ๋ฅผ ๋ฐ”๋ž€๋‹ค. Part 06 ์—์„œ ๋Œ์•„์˜ฌ ๊ฒƒ์ด๋‹ค The other parts are available at ๋‹ค๋ฅธ parts ๋Š” ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•˜๋‹ค. http://tinyurl.com/27dzdn (tuts4you) http://tinyurl.com/r89zq (SnD Filez) http://tinyurl.com/l6srv (fixdown)
  • 51. Regards to all and especially to you for taking the time to look at this tutorial. Lena151 (2006, updated 2007) ๋ชจ๋‘์—๊ฒŒ ์•ˆ๋ถ€๋ฅผ ์ ‚ํ•˜๊ณ  ํŠน๋ณ„ํžˆ ์ด tutorial ์— ์‹œ๊ฐ‚์„ ํˆฌ์žํ•ด์ฃพ ๋„ˆ์—๊ฒŒ ๊ฐ์‚ฌํ•œ๋‹ค.