Log in

View Full Version : adding functionality project...


ZaiRoN
June 6th, 2002, 19:03
hi!
maybe not a lot of people are interested to the vxd's thread so i would like to present a new (little) project for this area.
this time we have to add some functionality to a proggie. the proggie is a simple screen_capture (thx to manowar), nothing special but the program only serves for giving a reason to the steps to carry out
you can't minimize the proggie and so it's not really good see the dialog in the captured image.
after this preamble, here is the tasks!

1. in the "file" menu there's a menuitem called "Tray...".
when this item is clicked the proggie has to go in the system tray.
you can put the windows's icon or use your preferred icon; no problem, it's not the purpose of this level ;P.

2. once in the system tray, you have to give to the icon the possibility to respond to the mouse events. in particular:
left_double_click_mouse cause the restoring of the proggie and the removing of the icon from the system tray
right_click_mouse cause the opening of a popup menu with this item(s):
- "Exit" close the proggie removing the icon from the system tray
- "Capture" capture the screen
- "reversed by" put here what you want (your name or something else...). a simple messagebox would suffice!

you can use *all* tools of the world.

ok, that's all!
if i was not clear or if you have question on this project or something else, let me know!

bye
ZaiRoN

ZaiRoN
June 6th, 2002, 19:22
...here is the file.

Clandestiny
June 11th, 2002, 04:46
Hiya,

I really don't have time to get involved in another project between school, the SEH tut I'm writing, and the long-standing backtrace dumper project Kayaker and I have been working on (release date planned for 20002 AD, lol )

Nevertheless, I think Zairon has a good idea for a project here with the possiblity of teaching a lot of RCE fundamentals. Functionality adding is always fun And while not a cracking exercise, per se, the general concepts are easily extended to re-enabling the functionality of many "crippled" targets. Unfortunately, this is also the kinda project that will simultaneouly bore experienced reversers and confuse the hell outta newbies... Anyway 32 people have d/l the proggie and there have been 0 replies, so I figured I'd post some general "get started" references in case there is anyone who wants to learn, but doesn't know where to start...

General Win32 ASM coding --- study the first 5-6 of Iczelions excellent tuts to get a basic understanding of win32 architecture
http://www.win32asm.cjb.net

Tutorial 23: Tray Icon --- Example ASM code for an app that places and icon in the taskbar and responds to its mouse messages
http://vx.netlux.org/texts/html/books/icz/tut23.html

Jazzing up Regmon: Adding a DLL to reopen logs with Drag and Drop support by Kayaker --- If you enjoy writing giant inline patches in a hex editor as much as I do, you might want to consider extending the functionality via a dll
http://www.woodmann.net/fravia/kayaker_RegmonPlus.htm

Cheers,
Clandestiny

nikolatesla20
June 11th, 2002, 21:19
Here is my entry, works very well if I say so myself.

Released by [Lunar_Dust] a.k.a. nikolatesla20

Time: About 10 hours.

Tools Used:

WinDasm
Code Snippet Creator (The greatest tool EVER !)
First_Thunk_Rebuilder (My own creation)
Hex Workshop 2.54
ProcDump (I prefer working on memory aligned files, easier )
Calculator
MSDN
Pencil, paper
BRAIN !

Imports Added:

CreatePopupMenu
TrackPopupMenu
GetCursorPos
AppendMenu
Shell_NotifyIcon
GetLastError
lstrcpy
LoadIcon

Notes:

Instead of entering my *name* in the menu, I just used a tooltip over the systray icon

Comments:

Well, walking thru and chaining into a precoded windows event handler is not always easy of course, but oh well I did it . Actually, it's super fun to change the entire behavior.... There are about four redirections from code, which go into my own code. I was naughty and decided not to add a section. I just enlarged the virtual and raw size of the first section, which already physically had PLENTY of room for more code, and then stuck my own code in there. Oh, and the really naughty part is I made the section writable. Hey, you gotta if you're gonna throw in some variables!

I must say also that for those that have never used Code Snippet Creator, you are missing out! It is the most powerful tool for this kind of work, and it has an excellent help file for a change, unlike most tools out there. TRY IT! Once I had my redirections, it was simple to test and recompile each code snippet, and paste it into the file. If it didn't work, I could recompile and test very quickly again. CSC does all the hard work for you, it even links to the program's API functions FOR YOU !. You just have to tell it where you snippet will reside in memory in the program, and I always choose "export..." and paste the snippet myself with a hex editor.

Well, I guess that's all, thanx for the practice !

-nt20

ZaiRoN
June 12th, 2002, 12:18
hi nikolatesla20,
great job! you have done lot of work in more

i like the fact that you have pointed attention on a particular tool: code snippet creator. i like it very much too.
in these days i was thinking about a mini-project based on this tool. could be a little reme or maybe another "adding functionality project", for example using CSC for adding functionality to CSC...funny
please, leave this thread only for this project's comments and if you like the idea (even if you don't) post your comment(s) or suggestion(s) on a new thread.

bye
ZaiRoN