Open yoshimo opened 11 months ago
Hi @yoshimo
first of all thx for reporting this issue. I'm not sure if we tested friTap against Chrome explicitly and it might that friTap is currently not supporting LIBCEF based applications. In order to improve friTap in that field can you suggest an example application we can use for testing and development purposes? Further more on which platform do you encounter this issue?
Windows 10 Pro, https://download.battle.net/en-us/?product=bnetdesk
The pcap stays empty
same here, when attaching to a running chromium process
$ friTap -p fritap.pcap 113667
[*] Running Script on Linux
[*] libgnutls.so.30.37.0 found & will be hooked on Linux!
[*] libnspr4.so found & will be hooked on Linux!
[*] error: skipping module libnspr4.so
[*] Linux dynamic loader hooked.
[*] Logging TLS plaintext as pcap to fritap.pcap
also, friTap fails to spawn chromium
[*] Running Script on Linux
[*] libgnutls.so.30.37.0 found & will be hooked on Linux!
[*] libnspr4.so found & will be hooked on Linux!
[*] error: skipping module libnspr4.so
[*] Linux dynamic loader hooked.
[*] Logging TLS plaintext as pcap to fridatap.pcap
[*] libnspr4.so was loaded & will be hooked on Linux!
{'description': 'Could not find *libssl*.so!SSL_ImportFD', 'type': 'error'}
Terminated
i need this for my aiohttp_chromium to support capturing HTTP streams because capturing streams is not supported by the Chrome DevTools Protocol (CDP)
one problem/challenge is that chromium has no dynamic linking to libssl.so or libboringssl.so
$ ldd $(which chromium) | grep ssl | wc -l
0
the naive attempt to hook BIO_read fails
Interceptor.attach(Module.getExportByName(null, 'BIO_read'), {
onEnter(args) {
// ...
},
onLeave(retval) {
// ...
},
});
Error: unable to find export 'BIO_read'
fix: use Interceptor.attach
with function offsets
$ nm $(which chromium) | grep -e BIO_read -e BIO_write
0000000007f42940 t BIO_read
0000000007f42a80 t BIO_write
0000000007f42b20 t BIO_write_all
... but this (hooking functions in the main executable) seems to be impossible with frida and instead, we need binary-patching tools like e9patch
see also E9Patch Web Browser Guide
It is also possible to instrument Google Chrome using E9Tool/E9Patch. However, for modern versions of Chrome, this can be troublesome: - Chrome frequently uses data-in-code; and - Chrome seems to copy some code to different locations at runtime. This breaks some of the basic assumptions for static binary rewriting.
considering that chromium is open source, this is ridiculous... this obfuscation will be justified with "better security" because so its harder to sniff HTTP traffic... but surely not impossible
Hi,
thx for providing such detailed information. Currently, friTap can only identify SSL libraries when they are dynamically linked. However, if you know the offsets, you can try to specify them as explained in [1]. For this, use the --offsets
parameter.
To identify newly spawned processes with friTap, you can leverage the spawn gating feature of Frida. Simply use the --enable_spawn_gating
parameter to enable this functionality.
Regarding Chromium support, at present, other issues are prioritized due to the focus being broader than just a single application. However, we're always open to contributions. So, if you have a solution for this issue, please don't hesitate to share it with us :-)
[1] https://github.com/fkie-cad/friTap/blob/main/USAGE.md#providing-custom-offsetsaddresses
for the record, i dont need this for now, so im not working on this
one problem is that frida is slow, compared to gdb or lldb the initial scanning of the binary is so much faster with gdb/lldb
see also https://github.com/kaliiiiiiiiii/Selenium-Driverless/issues/123#issuecomment-1971918436
Hi,
this should be solved in the latest version of friTap (version 1.2.1.0).
In order to hook BoringSSL which is statically linked (without symbols) into Cronet we are able to extract the keys by hooking utilizing byte patterns.
Right now we developed that mainly for Android but soon we will extend the patterns for other platforms as well.
All the best
Daniel
Some applications run LIBCEF, aka Chromium Embedded Framework which in turn is using tls somewhere. Probably boringtls I tried to attach fritrap on every spawned sub-process (It would be nice if fritap would automatically cover processes that are spawned from the main process as well), including those that seem to connect to the outside world. The pcap stays empty. So i was wondering if this supposed to work or i am not doing anything wrong?