资源描述:
《菜鸟也玩shellcode(菜鸟也玩shellcode)》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、菜鸟也玩shellcode(菜鸟也玩shellcode)[original]rookietoplayshellcodeArticletitle:[original]shellcodetoprookiealsoreleasedthemostlonelyinvincible:2004-12-2808:15landlord[[original]rookieplayingshellcodeArticleauthor:Invinciblemostlonely[EST]Source:Eviloctalinformationsecurityteam
2、Source:hackerXFilesXfileonthepreviousperiod,Iwrotearookie,butalsotowriteexploit,whichdescribesthelocationoftheoverflowpoint,aswellasthepreparationofexploit.It'sallarookiething,andIdon'tknowifmyreadershavelearnedsomething.ThistimeIhavebroughtyouanoverflowofarticles,mainl
3、yforeveryonetointroducesomerookielevelshellcodeprepared.Asweallknow,thepreparationofshellcodeisneedalotofprogrammingskillsbutalsofamiliarwiththeunderlyingoperatingsystemknowledge,sowestillhavetouseotherstowriteshellcode(don'thitme,youseemytitle:"play"insteadof"writing")
4、.Inotherwords,wearetryingtotransformanexpertintogoodwritingandshellcodetobehisownstuff.ManualarticlesFirstofall,wehavetoprepareour"maincourse"-shellcode.Ifoundacoupleofshellcodeonmetasploit.com.Lookattheonebelow:[BITS32]Global_start_start:LCaller:CallLLoadFunctionsLData
5、Segment:Economy;DD"CMD""Dd0x79c679e7;closesocket12Dd0xe5;accept16Dd0xe92eada4;listen20Dd0xc7701aa4;bind24Dd0xadf509d9;WSASocketA28Dd0x3bfcedcb;WSAStartup32.......LBind:PushediPushediPushdword0x;port8721Movesi,ESPPushbyte0x10;lengthPushesiPushebxCall[ebp+24].......Ijustl
6、istedsomeofthekeycode,completecode,seethecd.Thisisacompilationofthebindshell,whichcanbindacmdshelltoanylocalport.Allwehavetodoistowritetheabovecodeinshellcodeform.ThefirstmosquitoIthatlieKoustrawindustryushdword0x;port8721Thisistheboundport,forexample,wewanttobind1234po
7、rts,thenthefirst1234tosixteendecimalis04d2,andtheninaccordancewiththelow,thenthetop,intheorderofthelatterisd204.Changetotheoriginalsentence,thenbecome:Pushdword0xdOK!Thecodeischanged.Weneedtocompilethiscodeintoabinaryfile.ThecompilerIusehereisnasm.Savetheabovecodeasbind
8、shell.asmandcopythisfiletothebinsubdirectoryundertheNASMdecompressiondirectory.ThenopenaCMDwindow,andcometothe