skills/mobile-app-security-testing/SKILL.md
移动应用安全测试的专业技能和方法论
npx skillsauth add ed1s0nz/cyberstrikeai mobile-app-security-testingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
移动应用安全测试是确保移动应用安全性的重要环节。本技能提供移动应用安全测试的方法、工具和最佳实践,涵盖Android和iOS平台。
检查项目:
检查项目:
检查项目:
检查项目:
使用APKTool:
# 反编译APK
apktool d app.apk
# 查看AndroidManifest.xml
cat app/AndroidManifest.xml
# 查看Smali代码
find app/smali -name "*.smali"
使用Jadx:
# 反编译APK
jadx -d output app.apk
# 查看Java源码
find output -name "*.java"
使用MobSF:
# 启动MobSF
docker run -it -p 8000:8000 opensecurity/mobsf
# 上传APK进行分析
# 访问 http://localhost:8000
使用Frida:
// Hook函数
Java.perform(function() {
var MainActivity = Java.use("com.example.MainActivity");
MainActivity.onCreate.implementation = function(savedInstanceState) {
console.log("[*] onCreate called");
this.onCreate(savedInstanceState);
};
});
使用Objection:
# 启动Objection
objection -g com.example.app explore
# Hook函数
android hooking watch class_method com.example.MainActivity.onCreate
使用Burp Suite:
# 配置代理
# Android设置代理指向Burp Suite
# 安装Burp证书
硬编码密钥:
// 不安全的代码
String apiKey = "1234567890abcdef";
String password = "admin123";
不安全的存储:
// SharedPreferences存储敏感数据
SharedPreferences prefs = getSharedPreferences("data", MODE_WORLD_READABLE);
prefs.edit().putString("password", password).apply();
证书验证绕过:
// 不验证证书
TrustManager[] trustAllCerts = new TrustManager[] {
new X509TrustManager() {
public X509Certificate[] getAcceptedIssuers() { return null; }
public void checkClientTrusted(X509Certificate[] certs, String authType) { }
public void checkServerTrusted(X509Certificate[] certs, String authType) { }
}
};
使用class-dump:
# 导出头文件
class-dump app.ipa
# 查看头文件
find app -name "*.h"
使用Hopper:
# 使用Hopper反汇编
# 打开app二进制文件
# 分析汇编代码
使用otool:
# 查看Mach-O信息
otool -L app
# 查看字符串
strings app | grep -i "password\|key\|secret"
使用Frida:
// Hook Objective-C方法
var className = ObjC.classes.ViewController;
var method = className['- login:password:'];
Interceptor.attach(method.implementation, {
onEnter: function(args) {
console.log("[*] Login called");
console.log("Username: " + ObjC.Object(args[2]).toString());
console.log("Password: " + ObjC.Object(args[3]).toString());
}
});
使用Cycript:
# 附加到进程
cycript -p app
# 执行命令
[UIApplication sharedApplication]
硬编码密钥:
// 不安全的代码
NSString *apiKey = @"1234567890abcdef";
NSString *password = @"admin123";
不安全的存储:
// Keychain存储不当
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
[defaults setObject:password forKey:@"password"];
证书验证绕过:
// 不验证证书
- (void)connection:(NSURLConnection *)connection
didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge {
[challenge.sender useCredential:[NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust]
forAuthenticationChallenge:challenge];
}
# 启动MobSF
docker run -it -p 8000:8000 opensecurity/mobsf
# 上传应用进行分析
# 支持Android和iOS
# 安装Frida
pip install frida-tools
# 运行脚本
frida -U -f com.example.app -l script.js
# 安装Objection
pip install objection
# 启动Objection
objection -g com.example.app explore
配置代理:
问题:
修复:
问题:
修复:
问题:
修复:
问题:
修复:
tools
满配示例技能包:SKILL.md + scripts/、references/、assets/ 等可选目录;验证 Eino skill 与 HTTP 包内路径(仅授权安全测试与教学)。
testing
XXE XML外部实体注入测试的专业技能和方法论
testing
XSS跨站脚本攻击测试的专业技能
testing
XPath注入漏洞测试的专业技能和方法论