Hacker program R & D test discipline glory

xiaoxiao2021-03-06  21

Self-introduction: I am now studying 99th students in the professional and mapping engineering of Tongji University. The course of learning program design technology is roughly started in the early high school. It has always been intermittent, until it is mixed to university in this life watershed, finally want to learn something useful, and find a meal. The big school has arranged VB courses, so there is an opportunity to form a preliminary concept of Windows programming, while self-studying a comparative failed C tutorial using a computers of Fudan University. So roughly roughly roughly roughly roughly in the two languages. Big Two-Cold Mechanical Industry Press "21 Day Studio C " starts the C process, all the way, try to use the VC's compiler to cooperate with the API to write some simple functions, which is also here When I started the biggest possible discovery network energy, progress is obvious. After that, I came into contact with the classic "Windows programming", I initially rely on a ridiculous and stupid way to use this classic: trying to understand all the code of a program in CONSOLE mode, then getting out of book SDK program. But after I gave up, I gave up, because the lengthy Code could not be recorded at all, even if all, how much is it? What is the enthusiasm of the program development? What is the meaning? After comprehensive transformation of ideas, I used to understand, repeatedly, pay attention to the overall framework of the Windows program, and did not stick to a little way. After two or three, I read the content of nearly 250 pages, and roughly understand the principle of the message mechanism. These have made a solid foundation for developing this hacker program. Finally, I saw an article about the hook hook technology. After germination, I have two ideas for a hacker program, and the main features of the program have two 1: the keyboard operation of the user. 2: Reward the record timing of the keyboard to the specified mailbox. And I hope to write out in a short weekend time, with my current level, this idea is approximately fantasy, I thought it was impossible, because I didn't grasp the BCB compiler at that time. The basic HOOK technology articles, and the knowledge of network data is almost blank, but I have made a simple assumption at this time: once you can make it ... use a kind of unknowing the highland thick and a inexplicable confidence Start research and development history, but successful grasp is 30%. Program R & D section: Time is urgent, this is the first day I gave himself three development days. The first question to be solved is the issue of data transmission. It is required to send the other party's data to the mailbox I specified. If you can't do this, then I can only give up all the plans on this day. After all C / C technical articles, I realized how big is the difficulty of developing this part of the code with C to develop this part of this code! And it is impossible to master Winsock technology or the basic principles of TCP / IP within a few hours. But the solution is now available: use VB powerful control capabilities, make a separate SMTP.exe sender program, generate the keyrecord.txt of the record keyboard operation in the C main program, then call SMTP.exe read KeyRecord.txt is also available. The main use here is the control of Mswinsck.ocx under VB. Due to the simple and easy-to-use characteristics of VB, this part is not difficult to do. Take a little read the material of the relevant MSWinsck.ocx, plus knowledge of some file operations in VB, and it will come out for a few hours. The problem is that all SMTP servers are not all SMTP servers to support this similar program. After the networked operation, the servers including smtp.sina.com.cn smtp.etang.com have not responded.

Only Shanghai local SMTP.citiz.net can implement program functionality. I didn't understand the reason so far, but these have no big bureau. At 14:30 in the afternoon, I sent this independent program to a Win2000 classmate test. In a few minutes, I didn't accept the feedback letter. I thought I failed, but the reader can imagine a few minutes later I am in Citiz. What is the feeling of seeing a new email in the mailbox. Yes! The first battle is said. The second phase of the process is started. Write the core part of this program, the overall frame simply borrowed the "Windows programming" Hello Windows. Because it has included the basic elements of the Windows program, from the WinMain function portfolio, create and register a window class, then a mechanism for obtaining a loop message, and a complete and simple window process used to process messages. I have changed very limited: what do I want to do with the window? ShowWindow (hwnd, sw_hide); what do I want to do with the event? I only keep two window messages: WM_CREATE and WM_DESTROY (create and destroy, to be or not to be, this is a problem!) I feel in the reading of the Hook technology document: people are not what he thinks! Because I don't have difficulty in 2 hours. (I am a genius?) This is a hook called a log file. To capture the keyboard's button action, the keyboard hook can also be implemented, but the log hook is much easier than the keyboard hook. First, if you want to capture the buttons of other applications, the keyboard hook must be placed in the dynamic link library, and the log hook does not have to; secondly, the system has been processed before the keyboard button is obtained. After these inputs, if the system shields these buttons, the keyboard hook cannot detect them. Based on these features ... with the original intention of our program ... (haha ... The following nonsense, I don't say it), the work is to define some initial work under the WM_CREATE message (later introduction), the most important thing is to set HOOK function. Setwindowshookex (WH_JournalRecord, (HookProc) journallogProc, Hinstance, 0); and the specific HOOK process is individually processed separately outside the window. In this process, all WM_KeyDown keyboard inputs are captured and recorded in the generated keyRecord.txt file to read sends later after SMTP.exe program. At least I think these work can do it for people with a slightly C basis. There is no concept of too deeply. In terms of file operation, because the SDK program does not seem to be compatible with this approach, I have to go to the book C tutorial on the spot. How to define a File structure, how to fopen, how to fclose? Everyone knows how much me! Hahahahaha ......... The process of dealing with WM_KEYDOWN is a "reproduction" point this time. I must know that the keydown event returns a parameter called a virtual key. The standard Windows keyboard is typically 104/107.

Handling so many numbers, and considering the problem of aspects, such as the state of the Capslock, Shift key, and the Numlock in the keypad is opened, and the length of the Windows program design "is visited with the length of the Switch - Case structure. Chapter (keyboard) virtual code value slowly defines those ~! @ # $% ^ & * () _ | - = {}: "<>? []; ',. / Do you say that it is difficult? In order to facilitate Writing View, simply demonstrate this part of the partial handle in the header file of syskey.h. Fortunately, it has been determined. Every time there is a little small progress, I have clearly feel that I am unpubstant, because Success is getting closer and closer to me, maybe these is the self-realization of each program designer, surpassing the ultimate goal of self !!! Hahahahaha ... (smile not!). Second development At 22:37 in the day. Finally completed this part of the core code. (In fact, I have been working until 4:30 in the morning). The test is successfully captured and recorded the keyboard operation of other applications. Process enters Three stages. Requires the overall coordination call, initialization of the procedure, etc. Copy to the System Directory, modify the "Run =" field in the Win Directory in the Windows Directory to ensure the copy of the system next time. Of course, if you want to judge whether the machine is networked, here I use Calling an internetGEtConnectedState (& flags, 0), which is written before; this API is called. Other aspects also call getSystemTime to determine the current time to call SMTP.exe to send feedback letters every other time in the networked state. And Trying to hide the interface of SMTP.exe in the C mainprocess (but later, I will rely on VB itself hidden interface is better, that is, put the main code directly in the Form_Load event, and finally add unload method in the event.) All these must Unexpectedly, some self-entertainment, some of the self-entertainment. So it is recommended that the rookies also write some boring code in the form of functions. Maybe I don't know when I can send it, I can shorten the absolute time of development progress. Hele is not !!! 19:36 in the third development day. The program is basically completed. With a kind of can't believe it and how it is psychological, I actually I really work very uneasy. However There is no time, because it is Sunday, I have to return to school. The research and development work is basically over. The test section can only go home next week. Subsequent testing is difficult, spending more than R & D time n times Time and energy, the procedure found, the problem is more than a metric! Test section: Tuesday, the second week, the time of the school, the 93rd anniversary of the school, held my code, I escaped the opening ceremony, returning to the family to continue testing in the name of the holiday. First introduce test conditions. Because the ability of my ability, the implementation program function must meet Win98, and use the dial-up Internet premise. (NT system has immune function on log hooks due to its innate security advantage). Soon I found two deadly weaknesses! One discovered it and QQ during the spreading process, if you first start my program, start QQ, then my program will fail, stop the background operation. The strange thing is to start QQ first, but then start the hook but there is no problem.

Taking into account OICQ in China's installation rate, God! I am almost desperate, I want to give up! (This makes me feel the vulnerability of the hook program, and there is a wind blowing. It is possible to fail. Although it is easy to use, it is easy to use, but it is the innate language of the interpretative language, and it is destined to have the east of the so-called running garbage. Support, and as non-standard control Mswinsck.ocx does not exist on machines that are not installed vb. Considering VB in China's installation rate, place! I want to give up almost desperate! The wind is bleeding, it is easy to cold ... Is it really written? Is it a bunch of garbage? Is there a return? The so-called heavenly reward is the name of this is to verify it in me? God! What are you doing? Tossing the opposite side, painful, but absolutely can't sit still. So crazy internet access to find information - only for the great ideals in the initial heart: be sure to make a similar thing! This is the most difficult time, very difficult, heart is awkward ... The first line of light appears on 9CBS. One followed the WIN98 with the VB5 running library. I found a few netizens asked, I did, very natural idea was to recoiling the code with VB5, and copy the hidden Mswinsck.ocx (105K) in the C main program to the system directory. This is theoretically without packaging procedures, running SMTP.exe on a machine without VB. Practice also proves that it is complete! Wow, hahaha ... cool! Then, the second dawn slowly emerged with the extraordinary ability to think about it in bed. If QQ must be paired with my hook program, if the hook program will be fragile. Why not add a SDK-based control program to use the WM_TIMER message and sendMessage (hwnd, wm_close, 0, 0), shellexecute (), close every time, and restart a hook. This principle is similar to the refresh window in the SDK. Once the invalidation is really refreshing. And put the initialization code of the hook in this control program, which is more able to reflect the independence of the hook, and clarify its function. Of course, the call of SMTP.exe is also placed here. In the end, the final system consists of a control program, a hook program, a sender program, a MSWinsck.ocx, and the last three hide (136K a zip file). The control program is responsible for initialization and regulating the hook and the running time. Once the first running the control program, all components have copied to implant the other party, whether it is online, start the hook full monitor keyboard operation in one minute, and refresh the hook every 5 minutes, check if it is detected every ten seconds Internet access, once the net is detected, a feedback letter is sent every 10 minutes. Yeah ~~~~~~~~~~~~~~~~~~ Yeah! Yeah! Yeah ~~~~~~~~~~~~~~~~~~~~~~~~~~ (Don't be strange! This is the joke of the leader, don't believe you too!) This hacker program is successfully completed, and the actual test is achieved by up to 60% of the letters feedback rate. Postscript: ah! Long sigh ... (the article is finally going to end the yeah!) The younger brother is in the middle of the, and the miles will give a pair of articles that make the masters of the masters. There are many places in the above, it is necessary to consider, the younger brother knows that you don't want to be too excited. Don't smudge your own pride! (Hey! Take the egg in your hand, wait for it, let me get it.).

Finally, I only give it to the most sincere apologies to those the most cute people on the Internet who are smashed by me (I don't dare ...). Only by our most sincere thanks to the Internet to help me. I hope that the programs have a successful person, take more people, find a good MM, the hard work can be united, and the soul refers to Microsoft, smile IT, revitalize China (Sorry, I am far away, oh! Egg yolk plus egg whit? Tell everyone to throw it ... I escape!) full text

The author retains copyright, if you need to reprint: zhangjiawei@citiz.net

转载请注明原文地址:https://www.9cbs.com/read-44940.html

New Post(0)