360加固成功脱壳
链接1:http://bbs.pediy.com/thread-210275.htm
链接2:https://www.52pojie.cn/thread-624275-1-1.html
android脱壳-修改dex2oat
链接3:http://www.jianshu.com/p/7af31cc5130e
常见app加固厂商脱壳方法研究
链接4:http://www.mottoin.com/89035.html
android 6.0.1 dex2oat.cc文件Setup函数中 修改如下(在1324~1325行之间,不同版本之间,可能略有差异)
// Ensure opened dex files are writable for dex-to-dex transformations.
for (const auto& dex_file : dex_files_) {
if (!dex_file->EnableWrite()) {
PLOG(ERROR) << "Failed to make .dex file writeable '" << dex_file->GetLocation() << "'\n";
}
////////////////////////////分割线 以下为添加的代码///////////////////////////////////////////////////////////
std::string dex_name = dex_file->GetLocation();
LOG(INFO) << "dex2oat::dex_file name-->" << dex_name;
if (dex_name.find("jiagu") != std::string::npos
|| dex_name.find("cache") != std::string::npos
|| dex_name.find("files") != std::string::npos
|| dex_name.find("tx_shell") != std::string::npos
|| dex_name.find("app_dex") != std::string::npos
|| dex_name.find("nagain") != std::string::npos) {
int nDexLen = dex_file->Size();
char pszDexFileName[260] = {0};
sprintf(pszDexFileName, "%s_%d", dex_name.c_str(), nDexLen);
int fd = open(pszDexFileName, O_WRONLY | O_CREAT | O_TRUNC, S_IRWXU);
if (fd > 0) {
if (write(fd, (char*)dex_file->Begin(), nDexLen) <= 0) {
LOG(INFO) << "dex2oat::write dex file failed-->" << pszDexFileName;
} else {
LOG(INFO) << "dex2oat::write dex file success-->" << pszDexFileName;
}
close(fd);
} else {
LOG(INFO) << "dex2oat::open dex file failed-->" << pszDexFileName;
}
}
////////////////////////////分割线 以上为添加的代码///////////////////////////////////////////////////////////
}