// Create the thread pools. heap_->CreateThreadPool(); // Reset the gc performance data at zygote fork so that the GCs // before fork aren't attributed to an app. heap_->ResetGcPerformanceInfo(); if (!is_system_server && !safe_mode_ && (jit_options_->UseJitCompilation() || jit_options_->GetSaveProfilingInfo()) && jit_.get() == nullptr) { // Note that when running ART standalone (not zygote, nor zygote fork), // the jit may have already been created. CreateJit(); } StartSignalCatcher(); // Start the JDWP thread. If the command-line debugger flags specified "suspend=y", // this will pause the runtime, so we probably want this to come last. Dbg::StartJdwp(); }
voidSignalCatcher::HandleSigQuit(){ Runtime* runtime = Runtime::Current(); std::ostringstream os; os << "\n" << "----- pid " << getpid() << " at " << GetIsoDate() << " -----\n"; DumpCmdLine(os); // Note: The strings "Build fingerprint:" and "ABI:" are chosen to match the format used by // debuggerd. This allows, for example, the stack tool to work. std::string fingerprint = runtime->GetFingerprint(); os << "Build fingerprint: '" << (fingerprint.empty() ? "unknown" : fingerprint) << "'\n"; os << "ABI: '" << GetInstructionSetString(runtime->GetInstructionSet()) << "'\n"; os << "Build type: " << (kIsDebugBuild ? "debug" : "optimized") << "\n"; runtime->DumpForSigQuit(os); if ((false)) { std::string maps; if (ReadFileToString("/proc/self/maps", &maps)) { os << "/proc/self/maps:\n" << maps; } } os << "----- end " << getpid() << " -----\n"; Output(os.str()); }
...
while (true) { int signal_number = signal_catcher->WaitForSignal(self, signals); if (signal_catcher->ShouldHalt()) { runtime->DetachCurrentThread(); returnnullptr; } switch (signal_number) { case SIGQUIT: signal_catcher->HandleSigQuit(); break; case SIGUSR1: signal_catcher->HandleSigUsr1(); break; default: LOG(ERROR) << "Unexpected signal %d" << signal_number; break; } } ...
"adbd" sysTid=23850 #00 pc 0002b158 /sbin/adbd #01 pc 0002467f /sbin/adbd #02 pc 00020854 [stack]
"adbd" sysTid=23851 #00 pc 0002fd38 /sbin/adbd #01 pc 0002a501 /sbin/adbd #02 pc 0000000b <unknown>
"adbd" sysTid=23852 #00 pc 0002b624 /sbin/adbd #01 pc 000106cf /sbin/adbd #02 pc 00010301 /sbin/adbd #03 pc 0002a613 /sbin/adbd #04 pc 00030283 /sbin/adbd
"adbd" sysTid=23853 #00 pc 0002b628 /sbin/adbd #01 pc 00013999 /sbin/adbd #02 pc 000112ed /sbin/adbd #03 pc 000104e1 /sbin/adbd #04 pc 0002a613 /sbin/adbd #05 pc 00030283 /sbin/adbd
"adbd" sysTid=23862 #00 pc 0002b888 /sbin/adbd #01 pc 0000a503 /sbin/adbd #02 pc 00009527 /sbin/adbd #03 pc 0002a613 /sbin/adbd #04 pc 00030283 /sbin/adbd
var bufferedInputStream = BufferedInputStream.$new(fileInputStream); var ca = cf.generateCertificate(bufferedInputStream); bufferedInputStream.close();
var certInfo = Java.cast(ca, X509Certificate); console.log("[o] Our CA Info: " + certInfo.getSubjectDN());
// Create a KeyStore containing our trusted CAs console.log("[+] Creating a KeyStore for our CA..."); var keyStoreType = KeyStore.getDefaultType(); var keyStore = KeyStore.getInstance(keyStoreType); keyStore.load(null, null); keyStore.setCertificateEntry("ca", ca);
// Create a TrustManager that trusts the CAs in our KeyStore console.log("[+] Creating a TrustManager that trusts the CA in our KeyStore..."); var tmfAlgorithm = TrustManagerFactory.getDefaultAlgorithm(); var tmf = TrustManagerFactory.getInstance(tmfAlgorithm); tmf.init(keyStore); console.log("[+] Our TrustManager is ready...");
console.log("[+] Hijacking SSLContext methods now...") console.log("[-] Waiting for the app to invoke SSLContext.init()...")
____ / _ | Frida 14.2.18 - A world-class dynamic instrumentation toolkit | (_| | > _ | Commands: /_/ |_| help -> Displays the help system . . . . object? -> Display information about 'object' . . . . exit/quit -> Exit . . . . . . . . More info at https://frida.re/docs/home/
[.] Cert Pinning Bypass/Re-Pinning [+] Loading our CA... [o] Our CA Info: O=mitmproxy, CN=mitmproxy [+] Creating a KeyStore for our CA... [+] Creating a TrustManager that trusts the CA in our KeyStore... [+] Our TrustManager is ready... [+] Hijacking SSLContext methods now... [-] Waiting for the app to invoke SSLContext.init()... [Pixel 2::智能生活]-> exit
其中 -F 参数 attach to frontmost application 不用指定 pid 或者包名,非常方便。
使用 mitmweb 查看报文
执行 mitmweb -p 8080 后可以用浏览器访问 http://127.0.0.1:8081/ 查看报文,如果需要共享报文数据可以使用 mitmweb 界面提供的 save 功能,会保存成一个 flow 文件,后面使用 mitmweb 界面提供的 open 打开报文文件即可展示报文详细信息。
Whether or not the broadcast receiver can receive messages from sources outside its application — "true" if it can, and "false" if not. If "false", the only messages the broadcast receiver can receive are those sent by components of the same application or applications with the same user ID.
The default value depends on whether the broadcast receiver contains intent filters. The absence of any filters means that it can be invoked only by Intent objects that specify its exact class name. This implies that the receiver is intended only for application-internal use (since others would not normally know the class name). So in this case, the default value is "false". On the other hand, the presence of at least one filter implies that the broadcast receiver is intended to receive intents broadcast by the system or other applications, so the default value is "true".
This attribute is not the only way to limit a broadcast receiver's external exposure. You can also use a permission to limit the external entities that can send it messages (see the permission attribute).
Android安全模型的一个关键部分是每一个应用程序都被赋予一个唯一的 Linux 用户 ID 和组 ID,运行在自己的进程和 Dalvik 虚拟机里。 在应用程序安装的过程中,Android系统设备上创建一个专门的目录(文件夹),用于存储此应用程序的数据,并且仅允许应用程序利用 Linux 用户 ID 和组 ID 的相应访问权限对这些数据进行访问。此外,此应用程序的 Dalvik 虚拟机使用应用程序的用户 ID 运行在自己的进程中。 这些关键的机制在操作系统层面上强制数据安全,因为应用程序之间不共享内存、访问权限及磁盘存储。应用程序只能在它们自己的 Dalvik 虚拟机范围内访问内存和数据。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
$ ps ...
u0_a16 2757 882 2574956 116944 SyS_epoll+ 0 S com.google.android.gms.persistent u0_a128 2774 883 1939084 87720 SyS_epoll+ 0 S com.ss.android.article.news:push u0_a16 2850 882 2322980 46592 SyS_epoll+ 0 S com.google.process.gapps u0_a128 2887 883 2190568 181868 SyS_epoll+ 0 S com.ss.android.article.news u0_a37 2900 882 2430908 58316 SyS_epoll+ 0 S com.google.android.googlequicksearchbox:interactor nfc 2918 882 2351828 62356 SyS_epoll+ 0 S com.android.nfc u0_a45 2930 882 2309884 43576 SyS_epoll+ 0 S se.dirac.acs radio 2945 882 2313144 45592 SyS_epoll+ 0 S net.oneplus.push u0_a0 2956 882 2304600 36360 SyS_epoll+ 0 S com.oneplus system 2967 882 2307276 38088 SyS_epoll+ 0 S com.fingerprints.serviceext system 2985 882 2309992 42044 SyS_epoll+ 0 S com.oneplus.opbugreportlite u0_a142 2997 882 2370296 93324 SyS_epoll+ 0 S com.oneplus.aod u0_a16 3018 882 2731976 165828 SyS_epoll+ 0 S com.google.android.gms ...