|
修改软件监听端口的问题
由于你这个程序比较简单,我用OllyDbg打开就看到了vc的启动代码 00401300 >/$ 55 push ebp 00401301 |. 8BEC mov ebp, esp 00401303 |. 6A FF push -1 00401305 |. 68 30014200 push 00420130 0040130A |. 68 04404000 push 00404004 ; SE handler installation 0040130F |. 64:A1 00000000 mov eax, dword ptr fs:[0] 00401315 |. 50 push eax 00401316 |. 64:8925 00000000 mov dword ptr fs:[0], esp 0040131D |. 83C4 F0 add esp, -10 00401320 |. 53 push ebx 00401321 |. 56 push esi 00401322 |. 57 push edi 00401323 |. 8965 E8 mov dword ptr [ebp-18], esp 00401326 |. FF15 C4514200 call dword ptr [<&KERNEL32.GetVersion>] ; kernel32.GetVersion 0040132C |. A3 E4354200 mov dword ptr [4235E4], eax 00401331 |. A1 E4354200 mov eax, dword ptr [4235E4] 00401336 |. C1E8 08 shr eax, 8 00401339 |. 25 FF000000 and eax, 0FF 0040133E |. A3 F0354200 mov dword ptr [4235F0], eax 00401343 |. 8B0D E4354200 mov ecx, dword ptr [4235E4] 00401349 |. 81E1 FF000000 and ecx, 0FF 0040134F |. 890D EC354200 mov dword ptr [4235EC], ecx 00401355 |. 8B15 EC354200 mov edx, dword ptr [4235EC] 0040135B |. C1E2 08 shl edx, 8 0040135E |. 0315 F0354200 add edx, dword ptr [4235F0] 00401364 |. 8915 E8354200 mov dword ptr [4235E8], edx 0040136A |. A1 E4354200 mov eax, dword ptr [4235E4] 0040136F |. C1E8 10 shr eax, 10 00401372 |. 25 FFFF0000 and eax, 0FFFF 00401377 |. A3 E4354200 mov dword ptr [4235E4], eax 0040137C |. 6A 00 push 0 0040137E |. E8 9D2A0000 call 00403E20 00401383 |. 83C4 04 add esp, 4 00401386 |. 85C0 test eax, eax 00401388 |. 75 0A jnz short 00401394 0040138A |. 6A 1C push 1C 0040138C |. E8 CF000000 call 00401460 00401391 |. 83C4 04 add esp, 4 00401394 |> C745 FC 00000000 mov dword ptr [ebp-4], 0 0040139B |. E8 10270000 call 00403AB0 004013A0 |. FF15 C0514200 call dword ptr [<&KERNEL32.GetCommandLineA>] ; [GetCommandLineA 004013A6 |. A3 444F4200 mov dword ptr [424F44], eax 004013AB |. E8 E0240000 call 00403890 004013B0 |. A3 BC354200 mov dword ptr [4235BC], eax 004013B5 |. E8 C61F0000 call 00403380 004013BA |. E8 711E0000 call 00403230 004013BF |. E8 8C1A0000 call 00402E50 004013C4 |. 8B0D 00364200 mov ecx, dword ptr [423600] 004013CA |. 890D 04364200 mov dword ptr [423604], ecx 004013D0 |. 8B15 00364200 mov edx, dword ptr [423600] 004013D6 |. 52 push edx 004013D7 |. A1 F8354200 mov eax, dword ptr [4235F8] 004013DC |. 50 push eax 004013DD |. 8B0D F4354200 mov ecx, dword ptr [4235F4] 004013E3 |. 51 push ecx 004013E4 |. E8 1CFCFFFF call 00401005;这句上面和下面是vc的启动代码,调用用户的main()函数,我在这下断,在跟进了几步就定位到上面的代码了 。。。。。。。 |
|
修改软件监听端口的问题
这个程序运行后,默认打开的是6000端口,不是你说的1358端口 |
|
修改软件监听端口的问题
0040B9C7 |. 6A 00 push 0 ; /Protocol = IPPROTO_IP 0040B9C9 |. 6A 02 push 2 ; |Type = SOCK_DGRAM 0040B9CB |. 6A 02 push 2 ; |Family = AF_INET 0040B9CD |. FF15 B4524200 call dword ptr [<&WS2_32.#23>] ; \socket 0040B9D3 |. 3BF4 cmp esi, esp 0040B9D5 |. E8 E658FFFF call 004012C0 0040B9DA |. 8985 64FEFFFF mov dword ptr [ebp-19C], eax 0040B9E0 |. 8BF4 mov esi, esp 0040B9E2 |. 6A 00 push 0 ; /NetLong = 0 0040B9E4 |. FF15 B8524200 call dword ptr [<&WS2_32.#8>] ; \ntohl 0040B9EA |. 3BF4 cmp esi, esp 0040B9EC |. E8 CF58FFFF call 004012C0 0040B9F1 |. 8985 58FEFFFF mov dword ptr [ebp-1A8], eax 0040B9F7 |. 66:C785 54FEF>mov word ptr [ebp-1AC], 2 0040BA00 |. 8BF4 mov esi, esp 0040BA02 68 70170000 push 1770 ;把这行改成“push 4D2”就可以了,1234的十六进制形式就是4D2 0040BA07 |. FF15 BC524200 call dword ptr [<&WS2_32.#9>] ; \ntohs 0040BA0D |. 3BF4 cmp esi, esp 0040BA0F |. E8 AC58FFFF call 004012C0 0040BA14 |. 66:8985 56FEF>mov word ptr [ebp-1AA], ax 0040BA1B |. 8BF4 mov esi, esp 0040BA1D |. 6A 10 push 10 ; /AddrLen = 10 (16.) 0040BA1F |. 8D8D 54FEFFFF lea ecx, dword ptr [ebp-1AC] ; | 0040BA25 |. 51 push ecx ; |pSockAddr 0040BA26 |. 8B95 64FEFFFF mov edx, dword ptr [ebp-19C] ; | 0040BA2C |. 52 push edx ; |Socket 0040BA2D |. FF15 C0524200 call dword ptr [<&WS2_32.#2>] ; \bind |
操作理由
RANk
{{ user_info.golds == '' ? 0 : user_info.golds }}
雪币
{{ experience }}
课程经验
{{ score }}
学习收益
{{study_duration_fmt}}
学习时长
基本信息
荣誉称号:
{{ honorary_title }}
能力排名:
No.{{ rank_num }}
等 级:
LV{{ rank_lv-100 }}
活跃值:
在线值:
浏览人数:{{ visits }}
最近活跃:{{ last_active_time }}
注册时间:{{ user_info.create_date_jsonfmt }}
勋章
兑换勋章
证书
证书查询 >
能力值