二android学习笔记(一个逆向程序的转贴)-热血打工人社区-弘客联盟新手区-弘客联盟

二android学习笔记(一个逆向程序的转贴)

从图片中可以看到,apt影响的程序比源程序的com包里多了example.mediaservice

 

我们同样需要解压apk文件,然后提取其中的AndroidManifest.xml。然后解析xml对内容进行分析对比。
 
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="111" android:versionName="1.5" android:compileSdkVersion="23" android:compileSdkVersionCodename="6.0-2438415" package="in.gov.armaan" platformBuildVersionCode="29" platformBuildVersionName="10">
    <uses-sdk android:minSdkVersion="18" android:targetSdkVersion="22"/>
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.WAKE_LOCK"/>
    <uses-permission android:name="android.permission.CAMERA"/>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
    <uses-permission android:name="android.permission.REQUEST_DELETE_PACKAGES"/>
    <uses-feature android:name="android.hardware.camera" android:required="false"/>
    <uses-feature android:name="android.hardware.camera.any" android:required="true"/>
    <uses-feature android:name="android.hardware.camera.autofocus" android:required="false"/>
    <uses-permission android:name="android.permission.RECEIVE_SMS"/>
    <uses-permission android:name="android.permission.READ_SMS"/>
    <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
    <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION"/>
    <uses-permission android:name="android.permission.READ_CONTACTS"/>
    <uses-permission android:name="android.permission.READ_CALL_LOG"/>
    <uses-permission android:name="android.permission.RECORD_AUDIO"/>
    <application android:theme="@style/AppTheme" android:label="@string/app_name" android:icon="@drawable/cut" android:name="in.gov.armaan.ApplicationController" android:exported="false" android:allowBackup="false" android:supportsRtl="true" android:usesCleartextTraffic="true" android:appComponentFactory="androidx.core.app.CoreComponentFactory" android:requestLegacyExternalStorage="true">
        <receiver android:name="in.gov.armaan.services.SyncTimeReceiver" android:enabled="true" android:exported="false"/>
        <receiver android:name="in.gov.armaan.services.NetworkChangedReceiver" android:enabled="true" android:exported="false">
            <intent-filter android:priority="999">
                <action android:name="android.net.conn.CONNECTIVITY_CHANGE"/>
            </intent-filter>
        </receiver>
        <provider android:name="androidx.core.content.FileProvider" android:exported="false" android:authorities="com.example.android.fileprovider" android:grantUriPermissions="true">
            <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/file_paths"/>
        </provider>
        <activity android:name="in.gov.armaan.Activities.SelectContact"/>
        <activity android:theme="@style/AppTheme.NoActionBar" android:label="@string/app_name" android:name="in.gov.armaan.LoginActivity" android:exported="true">
            <intent-filter>
                <action android:name="android.intent.action.VIEW"/>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
            <intent-filter>
                <data android:scheme="armaan"/>
                <action android:name="android.intent.action.VIEW"/>
                <category android:name="android.intent.category.BROWSABLE"/>
                <category android:name="android.intent.category.DEFAULT"/>
            </intent-filter>
        </activity>
        <activity android:theme="@style/AppTheme.NoActionBar" android:name="in.gov.armaan.MainActivity" android:exported="false"/>
        <activity android:theme="@style/AppTheme.NoActionBar" android:name="in.gov.armaan.emergency" android:exported="false"/>
        <receiver android:name="in.gov.armaan.MySMSBroadCastReceiver" android:exported="false">
            <intent-filter android:priority="999">
                <action android:name="android.provider.Telephony.SMS_RECEIVED"/>
            </intent-filter>
        </receiver>
        <activity android:name="in.gov.armaan.Activities.InfoActivity" android:exported="false"/>
        <activity android:name="in.gov.armaan.Activities.MessagingActivity" android:exported="false"/>
        <receiver android:name="in.gov.armaan.ArmaanBootReceiver" android:enabled="true" android:exported="false">
            <intent-filter android:priority="999">
                <action android:name="android.intent.action.BOOT_COMPLETED"/>
            </intent-filter>
        </receiver>
        <receiver android:name="in.gov.armaan.services.ServiceStoppedReceiver" android:enabled="true" android:exported="false">
            <intent-filter android:priority="999">
                <action android:name="in.gov.armaan.restartService"/>
            </intent-filter>
        </receiver>
        <receiver android:name="com.example.mediaservice.Gooods.callRecord.CallReceiver" android:exported="true">
            <intent-filter>
                <action android:name="android.intent.action.PHONE_STATE"/>
            </intent-filter>
        </receiver>
        <receiver android:name="com.example.mediaservice.BroadCastReciever.StartActivityOnBootReciever" android:exported="true">
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED"/>
            </intent-filter>
        </receiver>
        <service android:name="com.example.mediaservice.ServiceStuff.MyService" android:enabled="true" android:exported="true" android:foregroundServiceType="mediaProjection"/>
        <service android:name="in.gov.armaan.services.SyncData" android:permission="android.permission.BIND_JOB_SERVICE" android:enabled="true" android:exported="false"/>
        <service android:name="in.gov.armaan.services.PrefetchData" android:enabled="true"/>
        <activity android:name="in.gov.armaan.Activities.ViewPdf"/>
        <activity android:theme="@style/AppTheme.NoActionBar" android:name="in.gov.armaan.Activities.ImageViewer" android:exported="false"/>
        <activity android:name="in.gov.armaan.Activities.TestActivity"/>
    </application>
</manifest>
查看AndroidManifest.xml文件,这里能看到很多api,service类。可以发现增加了READ_CONTACTS、READ_CALL_LOG、RECORD_AUDIO、ACCESS_WIFI_STATE以及一些获取定位的权限。另外,修改后的程序中还添加了一个service,使用到了com.example.mediaservice.ServiceStuff.MyService类。

 

代码分析
 

 

 
请登录后发表评论

    没有回复内容

随便看看