PDA

View Full Version : Help needed with UPX protected program


yktan
January 16th, 2003, 01:08
Hi, I'm trying to unpack a program protected by UPX (pe-scan reports possible UPX 0.80 - 1.23) called unwc that can be found at h**p://www.etextwizard.com/download/unwc/unwc.zip

What I've done so far is:
(1) I traced through the unpacking routine and found that the possible OEP is at 4B8290.
(2) I put the program in an infinite loop at the jump and tried to do a full dump with both procdump and lordpe.
(3) After dumping, I tried to change the program entry point to B8290 using PEditor but when I tried to run it, it says "The application failed to initialize properly (0xc0000005). Click on OK to terminate the application.
(4) I did another full dump and used imprec to fix the IAT. But when I tried to run the program, it just disappears.

Can anyone tell me what I've done wrong? I've been fiddling with it for a few days but still can't find the problem. Thank you for your help.

Note: I'm using Win2k, if that will make any difference.

onebitshort
January 16th, 2003, 01:57
upx.exe -d packedfile.exe

yktan
January 16th, 2003, 02:46
Hi onebishort, I tried to do UPX -d but it tells me:
"upx: unwc.exe: CantUnpackExeception: header checksum error", that's why I resort to manual unpacking (besides, it's about time I do some practice :P)

squidge
January 16th, 2003, 03:17
You don't need to repair the Import's in a UPX packed prgoram is it doesn't mess with them. Just pause the program with something like Ollydbg and dump. Change OEP with something like LordPE and it's done.

4b8290 is the correct OEP, but it seems to be double-packed.

yktan
January 16th, 2003, 04:46
Thanks squidge, for the reply. I've never come across the methods to unpack a double-packed program (I've searched the messageboard without success too). Do you know of any tutorials that I can learn more about it? Thanks a lot for all the help.

squidge
January 16th, 2003, 04:58
basically all you do is unpack the program as normal until it is in running state, and then unpack again until you get through to the main program.

yktan
January 16th, 2003, 05:14
Thanks for the quick reply squidge. From what you said, is this what I should do?
(1) Go on debugging after the jump to 4b8290 until I find another unpacking routine.
(2) Get the jump to the next OEP.
(3) Stall program and dump.
(4) Change PE to correct OEP?

Sorry, just trying make sure what I'm thinking is correct. Thanks heaps for the help

onebitshort
January 16th, 2003, 05:19
UPX starts out with pushad, so all you basically have to do is find the first popad that gets called, dump the process, and restore the EP to the OEP. There are also quite a few un-UPX'ers floating around ...

squidge
January 16th, 2003, 05:35
yup

Kayaker
January 22nd, 2003, 18:30
OK, people must be getting really bored here lately because now we're starting to correct each others grammar, which just ain't right ;-) So here's one those on both sides of the protection fence might want to look at for fun.

RAW DUMP this with Icedump /DUMP and use the Dumpfixer option of PEditor 1.7 (VS=RS, VO=RO) and change the OEP. This is all that's needed, please don't use any fancy-ass tools to rebuild the IT and autodump it and such, it's overkill and often doesn't seem to work with UPX.

Now things get fun, anti- code up the yingyang to marvel over. Anti- regmon, filemon, winhex. winice.exe, trw2000, trw, loader32, w32dasm89, procdump, ollydbg, 202 (winice vxd ID),... probably missed some, didn't even see Meltice. "Monitor Tools Found" and "Debugging Tools Found" strings, and finally a nice filesize check. Can all be circumvented to get a running app, at least runtime.

Just thought I'd pass this on...

Cheers,
Kayaker

squidge
January 22nd, 2003, 19:25
Hmmmmm.....

JMI
January 23rd, 2003, 12:11
This "people" aint really bored. Was only trying to make a small tease by implying, with the start of the sentence, that squige was wrong about his program "not being faulty", when we all know its not, and then re-directing the implication to a "wrong" common gramatical usage, which squidge correctly understood as just a silly pedantic exercise.

Regards.

esther
January 24th, 2003, 19:41
execrise?

squidge
January 24th, 2003, 20:10
I'm not playing this game anymore, you canna even get me name rate !


Woodmann
January 24th, 2003, 20:29
BWAHAHAHAHAHAAAHAHAHAHAHAH.................

Pops got caught in his own game

Later, Woodmann

squidge
January 24th, 2003, 20:34
Sorry, couldn't resist

JMI
January 24th, 2003, 21:46
Well "xkuse" meeeeee. I never calimed I could sel. In fact I've known for more that 50 years that I kaint. If I could spell, my father probably would have insisted I go to med school instead of the low life I have chosen. But I do regret muspelling "what's his name's, name" Purely unintentional and usually results from too many hours actually sitting here doing actual work on this here machine that has nothing to do with reversing. Also results from a failure to squint hard enough if I happen to not be wearing my glasses at the time. Getting older is hard on the eye sight. Damn I need a secretary who can spell.

Humbugaly (see I can make up words too)

Pups, err, Pops.

(Edit: At the personal request of "what's his name" I identify him for all the world as "SquiDge" with a capital "D" to emphasize its importance, and to remind me, myself, and I to include it always in the future.) And I removed some of the evidence of my past transgression.

Regards.

esther
January 25th, 2003, 11:21
will I blam ma keyboad, itz alwayz stucs on t

ma tapo ers

Woodmann-Wootmann,Wotman

JMI-JEM,JIM

KaYaker-Kayakor,Kayako

esther-assther-askther,eater

Retards

squidge
January 25th, 2003, 13:21
So you think it's funny do ya to miss of my name on yer list?


JMI
January 25th, 2003, 13:45
As my son would say... It was my bad.

/me is so ashamed, /me goes back to study me dictionary and improves me eyesight. Surgery might help. Perhaps a frontal lobotomy??

mea culpa, mea maxima culpa.

Regards.

squidge
January 25th, 2003, 14:48
It doesn't seem like you've edited the post to include my name as of yet...


Woodmann
January 25th, 2003, 16:22
esther,
You make me laugh to hard...........



Woodmann

JMI
January 25th, 2003, 16:42
Woodmann-Wootmann,Wotman:

Don't laugh too hard, you could hurt yourself.

Regards.

esther
January 26th, 2003, 09:30
>>So you think it's funny do ya to miss of my name on yer list?

Ya won me to flam ya?

http://www.geocities.com/SouthBeach/Lagoon/9819/squidge.html

http://www.agentland.com/Download/Intelligent_Agent/244.html


dum thiz iz off topic

Regrets

squidge
January 26th, 2003, 11:16
Errr... Thanks.... Bitch

Kayaker
January 26th, 2003, 13:49
What have I wrot, er wrought? Sorry I brought it up....

squidge
January 26th, 2003, 14:19
Yeah, Kayaker, it's all your fault

esther
January 27th, 2003, 07:55
Stop Bit'ching Kayaker ya bitch
Btw Why didn't delete all thiz weird post

squidge
January 27th, 2003, 08:06
No delete coz it funee