欢迎来到第壹文秘! | 帮助中心 分享价值,成长自我!
第壹文秘
全部分类
  • 幼儿/小学教育>
  • 中学教育>
  • 高等教育>
  • 研究生考试>
  • 外语学习>
  • 资格/认证考试>
  • 论文>
  • IT计算机>
  • 法律/法学>
  • 建筑/环境>
  • 通信/电子>
  • 医学/心理学>
  • ImageVerifierCode 换一换
    首页 第壹文秘 > 资源分类 > DOCX文档下载
    分享到微信 分享到微博 分享到QQ空间

    2023Anti-Frida加固样本分析.docx

    • 资源ID:982914       资源大小:147.04KB        全文页数:19页
    • 资源格式: DOCX        下载积分:5金币
    快捷下载 游客一键下载
    账号登录下载
    三方登录下载: 微信开放平台登录 QQ登录
    下载资源需要5金币
    邮箱/手机:
    温馨提示:
    快捷下载时,如果您不填写信息,系统将为您自动创建临时账号,适用于临时下载。
    如果您填写信息,用户名和密码都是您填写的【邮箱或者手机号】(系统自动生成),方便查询和重复下载。
    如填写123,账号就是123,密码也是123。
    支付方式: 支付宝    微信支付   
    验证码:   换一换

    加入VIP,免费下载
     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。
    5、试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。

    2023Anti-Frida加固样本分析.docx

    分析某加固的AntRFrida保护分析过程找到检测所在的S。我们可以通过frida-trace快速进行系统函数的hook,首先我们需要知道loads。的函数一般为dlopen和android_dlopen_ext,所以先执行trida-trace-U-tcom.wuje.Chengxin-1dIopen可以观察到以下输出:PSE:antiantifridachenxin>frida-tracecom.wujie.ChengxindlopenInStrUmenting.dlopen:1.oadedhandlerat11EWantiantifridaWchenxinWhandlerslibdl.sodlopen.is"Startedtracingifunction.PressCtrl+Ctostop.-TID0x3a6f/240msdlopen()24msdlopen()246msdlopen()卜Iin;PSE:样本antiantifridachenxin>_可以看到这里只显示了调用dlopen,但是参数没有输出,祖叩en的第一个参数即为所需Ioad的s。的名字(args0.readcstring()我们可以去提示的路径下修改dlopen.js脚本修改前:IHChengxinJsBdlopeajs3*ForfullAPIreference,see:https:fZda.redocsjavascript-apedsynchronous1.ywhenabouttoca1.1.d1.open.bouttoreturnfromd1.open.SeeonEdetai1.paramfunction1.og1.thisfunctionwithastringtoparamNativePointer)retva1.onEnter/on1.eave,butinsteadinvocation.inonEnter.bepresentedtotheuser,aNativePointerobject.'thisobjectObjecta1.1.owingyoutoaccessstatestoredHowever,dousethistostorefunctionargumentsacrossparamobjectstateVOn1.eaVe(Iog,retval,state)*use"this"whichisanobjectforkeepingstate1.oca1.toan*/onEnter(log,args,state)log(dlopen();),chen×in>_handlers_>libdl.soBdIopenjs5678910111213141516171819202122232425262728293031323334353637修改后:,thisobject-Objecta1.1.owingyoutostorestateforuseinon1.eave.'paramfunction1.og-Ca1.lthisfunctionithastringtobepresentedtotheuser.,paramarrayargsFunctionargumentsrepresentedasanarrayofNativePointerobjects.*Fore×amp1.euseargs0.readUtf8String()ifthefirstargumentisapointertoaCstringeItisalsopossib1.etomodifyargumentsbyassigningaNativePointerobjecttoane1.ementcparamobjectstate.OnlyoneJavaScriptfunctionexecuteatatimejsodonotWOrrtVaboutrace-conditions.ISChengxinjsIHdlopen.js3×chenxin>_handlers_>libdl.so>ISdIopenJs4567891011121314IS1617181920212223242526272829303132333435363738ForfullAPIreference,/Ca1.1.eds.thisobject)paramfunction1.ogparamarrayargsFore×amp1.euseCIrgSftItisa1.sopossib1.et<paramobjectstateOn1.yoneJavaScriptfHoweverjdonotusetisee:https:frida.redocsjavascript-apt/:oca1.1.dtopen.foruseinon1.eavtresentedasanarrayofNativePointerobjectreadlftf8String()ifthefirstargumentisapointertoaCstringjdifyargumentsbyassigningaNativePointerobjecttoane1.ementObjecta1.1.owingyoutokeepstateacrossfunctioncal1.s.ionwi1.1.executeatatime,sodonotworryaboutonnter(log,args,state)log(,dlopen():'*argsf.readCString();,*Ca1.1.edsynchronous1.yuhenabouttoreturnfromd1.open.thisobject-Objec'paramfunction1.og§Parem(NativePointer)retva1.paramobjectstateon1.eave(log,retval,state),ossonEnter/on1.eav1.race-condtionse,butinstead.sfunctionwxtReturnva1.uer'tcstoredino11Etct'.,stringtobepresentedto'esentedosoNotivcPointct*outokeepstateacrossfunctionca1.ls.再次输出一下:PSE:样本antiantifridachenxin>frida-tracecom.wujie.ChengxindlopenInstrumenting.dlopen:1.oadedhandlerat"E:样本Wantiantifridachenxin_handlers_Wlibdl.sodlopen.Js"Startedtracing1function.PressCtrlKtostop./TIDx3e92/241 msdIopen():libc.so242 msdlopen():libc.so247 msdlopen():Iibdatajar.soProcesstermir<dtedIPSE:antiantifridachenxin>现在dlopen的参数就显示出来了,但是这里load的三个SO显然是系统的s。而非app的SO,所以我们再hookandroid_dlopen_ext看看:PSE:样本antiantifri,dachenxin>frida-tracec<xn.wujIe.Chengxinandroid_dlopen_extInstrumenting.android-dlopen-e×t:1.oadedhandlerat"E:样本Wantiantifridachenxin_handlers_libdl.soandroid_dlopen_ext.js"Startedtracing1function.PressCtrltCtostop./TID0x406c/211msandroid.dlopen,e×t():systemframeworkoatarmorg.apache.http.legacy.odex216msandroiddlopene×t():dataappcom.wujie.che11gxin-WZCaCd7ATEUlEIc9F17Xdg=oata11nbase.o<ie×222msandroid-dloen-e×t():dataappcom.wujie.chengxin-WZCaCd7ATEUlEIc9F17Xdg=llbarwlibDexHelper.sopsE:样本antiantifridachenxin>_可以看到当IOad到IibDeXHelPer.so的时候,frida被杀掉了,所以我们初步可以判定做检测的位置在IibDexHelper.so首先我们可以通过hook字符串比较函数(比如StrStrWStrCmP等函数)来观察是否传入了frida相关的字符串进行比较Interceptor.attach(Module.findE×portByName(null,"strstr"),onEnter:function(args)if(args0.readCString().indexOf("frida")!:1args1.readCString().indexf("frida")!=-1|args0.readCString().indexOf("gum-js-loop")!=-largsl.readCString().indexf("gum-js-loop")!=-l|args0.readCString().indexOf("gmain")!=-1argsl.readCString().indexOf("g三ain")I=-1|args.readCString().i11dexf("Iinjector")!=-1argsl.readCString().indexf("Iinjector")!=-1console.log('nstrstr('+'sl="t+args0.readCString()+',s2=w,+args1.readCString()+""+11,)i),on1.eave:function(retval)!);PSE:ffantiatifridachen×in>frida-traceCM.wjie.CbengxinstrstrInstrumenting.strstr:1.oadedhandlerat"E:样本antiantifridachenxin_handlers_1ibc.sostrstr.js"Startedtracing1fu

    注意事项

    本文(2023Anti-Frida加固样本分析.docx)为本站会员(p**)主动上传,第壹文秘仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知第壹文秘(点击联系客服),我们立即给予删除!

    温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。




    关于我们 - 网站声明 - 网站地图 - 资源地图 - 友情链接 - 网站客服 - 联系我们

    copyright@ 2008-2023 1wenmi网站版权所有

    经营许可证编号:宁ICP备2022001189号-1

    本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。第壹文秘仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知第壹文秘网,我们立即给予删除!

    收起
    展开