Frida: Difference between revisions

imported>Mic92
No edit summary
imported>Nix
m add Software/Applications subcategory
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[https://www.frida.re Frida] is a dynamic binary instrumentation framework.
[https://www.frida.re Frida] is a dynamic binary instrumentation framework.


== Getting it work on NixOS ==
== Using the genesis's NUR package ==
The project provides pre-compiled binaries that almost work out of the box (when installed via <code> pip install frida</code>)
 
Setup [https://github.com/nix-community/NUR NUR] as described.
Then install frida from genesis's repository:
 
<syntaxHighlight lang=console>
$ nix-shell -p nur.repos.genesis.frida-tools
nix-shell> frida-trace -i "recv*" firefox
</syntaxHighlight>
 
The python bindings are available via <code>nur.repos.genesis.python3Packages.frida</code>
Both frida and frida-tools packages are based on pypi, feel free to post a PR to add support for your platform to them.
 
== Using frida's own binaries ==
The project provides pre-compiled binaries that almost work out of the box (when installed via <code> pip install frida-tools</code>)
However at runtime it unpacks a helper called <code>frida-helper-64</code> that uses <code>/lib64/ld-linux-x86-64.so.2</code> as its link-loader.
However at runtime it unpacks a helper called <code>frida-helper-64</code> that uses <code>/lib64/ld-linux-x86-64.so.2</code> as its link-loader.
The error message will be similar to this one:
The error message will be similar to this one:
Line 19: Line 32:
/nix/store/83lrbvbmxrgv7iz49mgd42yvhi473xp6-glibc-2.27/lib/ld-linux-x86-64.so.2 => /nix/store/83lrbvbmxrgv7iz49mgd42yvhi473xp6-glibc-2.27/lib64/ld-linux-x86-64.so.2 (0x00007fa78b289000)
/nix/store/83lrbvbmxrgv7iz49mgd42yvhi473xp6-glibc-2.27/lib/ld-linux-x86-64.so.2 => /nix/store/83lrbvbmxrgv7iz49mgd42yvhi473xp6-glibc-2.27/lib64/ld-linux-x86-64.so.2 (0x00007fa78b289000)
$ ln -s /nix/store/83lrbvbmxrgv7iz49mgd42yvhi473xp6-glibc-2.27/lib/ld-linux-x86-64.so.2 /lib64/ld-linux-x86-64.so.2
$ ln -s /nix/store/83lrbvbmxrgv7iz49mgd42yvhi473xp6-glibc-2.27/lib/ld-linux-x86-64.so.2 /lib64/ld-linux-x86-64.so.2
</syntaxHighlight>
== Using the Mic92's NUR package ==
Setup [https://github.com/nix-community/NUR NUR] as described.
Then install frida from Mic92's repository
<syntaxHighlight lang=console>
$ nix-shell -p nur.repos.mic92.frida-tools
nix-shell> frida-trace -i "recv*" firefox
</syntaxHighlight>
</syntaxHighlight>


Line 56: Line 59:
     profile = ''
     profile = ''
       export hardeningDisable=all
       export hardeningDisable=all
      export SSL_CERT_FILE="${cacert}/etc/ssl/certs/ca-bundle.crt"
       # initialize sdk
       # initialize sdk
       make
       make
Line 73: Line 77:


<syntaxHighlight lang=console>
<syntaxHighlight lang=console>
$  make python-64
$  make python-linux-x86_64
</syntaxHighlight>
</syntaxHighlight>


Line 79: Line 83:


<syntaxHighlight lang=console>
<syntaxHighlight lang=console>
$ cd frida-python/src/
$ cd frida-python
$ python setup.py bdist_wheel
$ python setup.py bdist_wheel
$ pip install dist/frida-*.whl
$ pip install dist/frida-*.whl
</syntaxHighlight>
</syntaxHighlight>


Mic92 has an [https://github.com/Mic92/nur-packages/blob/master/frida-python/default.nix expression] that provides a pre-compiled version of frida using the compiled wheel as shown.
[[Category:Applications]]