首页
社区
课程
招聘
[原创]Android漏洞之战(11)——整体加壳原理和脱壳技巧详解
2022-6-13 23:04 46378

[原创]Android漏洞之战(11)——整体加壳原理和脱壳技巧详解

2022-6-13 23:04
46378
收藏
点赞30
打赏
分享
打赏 + 51.00雪花
打赏次数 2 雪花 + 51.00
 
赞赏  Editor   +50.00 2022/07/11 恭喜您获得“雪花”奖励,安全圈有你而精彩!
赞赏  mb_uqwxlepc   +1.00 2022/06/28
最新回复 (34)
雪    币: 7745
活跃值: (21142)
能力值: ( LV12,RANK:550 )
在线值:
发帖
回帖
粉丝
随风而行aa 10 2022-10-10 15:51
26
0
0kay 报错:E/System: java.io.IOException: No original dex files found for dex location /sdcard/classes.dex,请 ...
需要把dex放在sdcard下面,然后开启读取权限,简易加壳器可以参考https://mp.weixin.qq.com/s/LWTFNDV1dff8cdBakd1AOQ
雪    币: 200
能力值: ( LV1,RANK:0 )
在线值:
发帖
回帖
粉丝
0kay 2022-10-10 16:28
27
0
随风而行aa 需要把dex放在sdcard下面,然后开启读取权限,简易加壳器可以参考https://mp.weixin.qq.com/s/LWTFNDV1dff8cdBakd1AOQ
我是按照文章中的代码操作的,真机为安卓9。
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
一直报这个错误。
雪    币: 7745
活跃值: (21142)
能力值: ( LV12,RANK:550 )
在线值:
发帖
回帖
粉丝
随风而行aa 10 2022-10-10 16:31
28
0
是你没在AndroidManifest里面加读取权限么
雪    币: 200
能力值: ( LV1,RANK:0 )
在线值:
发帖
回帖
粉丝
0kay 2022-10-10 17:09
29
0
AndroidManifest里面已经加了读取权限,在真机上我又允许读写手机存储,可以读取dex。可是又报了其他错误。
2022-10-10 17:00:42.561 25835-25835/? I/xample.shell00: Late-enabling -Xcheck:jni
2022-10-10 17:00:42.981 25835-25835/com.example.shell001 I/Perf: Connecting to perf service.
2022-10-10 17:00:43.003 25835-25835/com.example.shell001 E/linker: library "/storage/emulated/0/oat/arm64/classes.odex" ("/storage/emulated/0/oat/arm64/classes.odex") needed or dlopened by "/system/lib64/libart.so" is not accessible for the namespace: [name="(default)", ld_library_paths="", default_library_paths="/system/lib64", permitted_paths="/system/lib64/drm:/system/lib64/extractors:/system/lib64/hw:/system/product/lib64:/system/framework:/system/app:/system/priv-app:/vendor/framework:/vendor/app:/vendor/priv-app:/odm/framework:/odm/app:/odm/priv-app:/oem/app:/system/product/framework:/system/product/app:/system/product/priv-app:/data:/mnt/expand"]
2022-10-10 17:00:43.005 25835-25835/com.example.shell001 I/xample.shell00: The ClassLoaderContext is a special shared library.
2022-10-10 17:00:43.015 25835-25835/com.example.shell001 W/xample.shell00: Accessing hidden method Landroid/app/ActivityThread;->currentActivityThread()Landroid/app/ActivityThread; (light greylist, reflection)
2022-10-10 17:00:43.016 25835-25835/com.example.shell001 W/xample.shell00: Accessing hidden field Landroid/app/ActivityThread;->mPackages:Landroid/util/ArrayMap; (light greylist, reflection)
2022-10-10 17:00:43.016 25835-25835/com.example.shell001 W/xample.shell00: Accessing hidden field Landroid/app/LoadedApk;->mClassLoader:Ljava/lang/ClassLoader; (light greylist, reflection)
2022-10-10 17:00:43.016 25835-25835/com.example.shell001 E/mClassLoader: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.example.shell001-cKaRC36GH0QM8P33I_SSaA==/base.apk"],nativeLibraryDirectories=[/data/app/com.example.shell001-cKaRC36GH0QM8P33I_SSaA==/lib/arm64, /system/lib64]]]
2022-10-10 17:00:43.016 25835-25835/com.example.shell001 I/shell: Start
2022-10-10 17:00:43.018 25835-25835/com.example.shell001 D/AndroidRuntime: Shutting down VM
    
    
    --------- beginning of crash
2022-10-10 17:00:43.022 25835-25835/com.example.shell001 E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.example.shell001, PID: 25835
    java.lang.RuntimeException: Unable to instantiate application com.example.shell001.StubApplication: android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity  context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?
        at android.app.LoadedApk.makeApplication(LoadedApk.java:1073)
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5925)
        at android.app.ActivityThread.access$1200(ActivityThread.java:200)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1673)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:201)
        at android.app.ActivityThread.main(ActivityThread.java:6815)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873)
     Caused by: android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity  context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?
        at android.app.ContextImpl.startActivity(ContextImpl.java:922)
        at android.app.ContextImpl.startActivity(ContextImpl.java:898)
        at android.content.ContextWrapper.startActivity(ContextWrapper.java:389)
        at com.example.shell001.StubApplication.attachBaseContext(StubApplication.java:31)
        at android.app.Application.attach(Application.java:215)
        at android.app.Instrumentation.newApplication(Instrumentation.java:1122)
        at android.app.LoadedApk.makeApplication(LoadedApk.java:1065)
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5925) 
        at android.app.ActivityThread.access$1200(ActivityThread.java:200) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1673) 
        at android.os.Handler.dispatchMessage(Handler.java:106) 
        at android.os.Looper.loop(Looper.java:201) 
        at android.app.ActivityThread.main(ActivityThread.java:6815) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873) 
2022-10-10 17:00:43.057 25835-25835/com.example.shell001 I/Process: Sending signal. PID: 25835 SIG: 9
雪    币: 200
能力值: ( LV1,RANK:0 )
在线值:
发帖
回帖
粉丝
0kay 2022-10-10 17:21
30
0
这样修改之后可以了:
Intent myIntent = new Intent(StubApplication.this, activityclass);
myIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(myIntent);
雪    币: 7745
活跃值: (21142)
能力值: ( LV12,RANK:550 )
在线值:
发帖
回帖
粉丝
随风而行aa 10 2022-10-10 19:56
31
0
0kay 这样修改之后可以了: Intent myIntent = new Intent(StubApplication.this, activityclass); myIntent.setFlags(In ...
可以可以
雪    币:
能力值: ( LV1,RANK:0 )
在线值:
发帖
回帖
粉丝
Manta_ 2022-11-7 16:57
32
0
大佬您好,我去了您的github,看到有Android逆向的目录,请问什么时候能更新呢?求
雪    币: 7745
活跃值: (21142)
能力值: ( LV12,RANK:550 )
在线值:
发帖
回帖
粉丝
随风而行aa 10 2022-11-7 17:16
33
0
Manta_ 大佬您好,我去了您的github,看到有Android逆向的目录,请问什么时候能更新呢?求
可以加入微信群 后面会陆续更新的 
雪    币: 33
活跃值: (573)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
大枫叶 2022-12-27 15:07
34
0
mark
雪    币: 144
活跃值: (106)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
hackce 2023-7-25 09:42
35
0
谢谢大佬分享,学习了。
游客
登录 | 注册 方可回帖
返回