欢迎来到天天文库
浏览记录
ID:38719317
大小:166.00 KB
页数:9页
时间:2019-06-18
《缓冲区溢出实验说明》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、IntroductionThisassignmenthelpsyoudevelopadetailedunderstandingofthecallingstackorganizationonanIA32processor.Itinvolvesapplyingaseriesofbufferoverflowattacksonanexecutablefilebufbombinthelabdirectory.Note:Inthislab,youwillgainfirsthandexperiencewith
2、oneofthemethodscommonlyusedtoexploitsecurityweaknessesinoperatingsystemsandnetworkservers.Ourpurposeistohelpyoulearnabouttheruntimeoperationofprogramsandtounderstandthenatureofthisformofsecurityweaknesssothatyoucanavoiditwhenyouwritesystemcode.Wedono
3、tcondonetheuseoftheseoranyotherformofattacktogainunauthorizedaccesstoanysystemresources.Therearecriminalstatutesgoverningsuchactivities.LogintheServerEveryonehasanaccountonourServer,theaddressis10.13.75.177,andusernameisstu+yourstudentnumber(ex:stu04
4、72001),thedefaultpasswordiscsapp2007.Youcangettheaccesswithputty.Startbycopyingbuflab-handout.tartoa(protected)directoryinwhichyouplantodoyourwork.Thengivethecommand“tarxvfbuflab-handout.tar”.Thiswillcauseanumberoffilestobeunpackedinthedirectory:MAKE
5、COOKIE:Generatesa“cookie”basedonyourname.BUFBOMB:Thecodeyouwillattack.SENDSTRING:Autilitytohelpconvertbetweenstringformats.AlloftheseprogramsarecompiledtorunonLinuxmachines.Inthefollowinginstructions,wewillassumethatyouhavecopiedthethreeprogramstoapr
6、otectedlocaldirectory,and9thatyouareexecutingtheminthatlocaldirectory.GetyourcookieAcookieisastringofeighthexadecimaldigitsthatis(withhighprobability)uniquetoyourname.Youcangenerateyourcookiewiththemakecookieprogramgivingyournameastheargument.Forexam
7、ple:unix>./makecookiebovik0x78327b66TheBUFBOMBProgramTheBUFBOMBprogramreadsastringfromstandardinputwithafunctiongetbufhavingthefollowingCcode:1intgetbuf()2{3charbuf[12];4Gets(buf);5return1;6}ThefunctionGetsissimilartothestandardlibraryfunctiongets—it
8、readsastringfromstandardinput(terminatedby‘’orend-of-file)andstoresit(alongwithanullterminator)atthespecifieddestination.Inthiscode,thedestinationisanarraybufhavingsufficientspacefor12characters.NeitherGetsnorgetshasanywaytodeterminewhetherthereise
此文档下载收益归作者所有