<feed xmlns='http://www.w3.org/2005/Atom'>
<title>tools/s-boot_usb_exploit/exploit/sboot_exploit.py, branch master</title>
<subtitle>Code to use the s-boot exploit (based on the GT-I9300 eMMC toolbox).
</subtitle>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/tools/s-boot_usb_exploit/'/>
<entry>
<title>2 stage load works</title>
<updated>2020-07-14T14:11:23+00:00</updated>
<author>
<name>Denis 'GNUtoo' Carikli</name>
<email>GNUtoo@cyberdimension.org</email>
</author>
<published>2020-07-14T14:09:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/tools/s-boot_usb_exploit/commit/?id=eaa4f29fa5fd7a63506c80986918718d1c90c84a'/>
<id>eaa4f29fa5fd7a63506c80986918718d1c90c84a</id>
<content type='text'>
First it loads boot.bin which then loads helloworld.bin:
    $ make -C shellcode/
    $ ./exploit/sboot_exploit.py -k shellcode/helloworld.bin -s shellcode/boot.bin
    [1594735830.490811] [+] Shellcode started
    [1594735831.822608] [*] Sending kernel
    [1594735841.429838] [+] Got kernel from host
    [1594735841.433176] [*] Start sleeping: plug the UART
    [1594735861.383138] [*] End sleeping
    [1594735861.385037] [+] jump() started
    ERROR:root:Timeout
    Traceback (most recent call last):
      File "./exploit/sboot_exploit.py", line 487, in &lt;module&gt;
        sys.exit(shellcode_handler(exploit, args))
      File "./exploit/sboot_exploit.py", line 399, in shellcode_handler
        code = exploit.read_timeout(2)
      File "./exploit/sboot_exploit.py", line 56, in read_timeout
        raise Exception('Timeout waiting for read')
    Exception: Timeout waiting for read

It then reboot as expected (to the charging screen) as helloworld.c
contains the following:
    int main() {
    	/* Trigger PMU reset */
    	*(unsigned *)0x10020400 = 1;

    	/* Wait for power cycle */
    	while (1);
    }

Signed-off-by: Denis 'GNUtoo' Carikli &lt;GNUtoo@cyberdimension.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
First it loads boot.bin which then loads helloworld.bin:
    $ make -C shellcode/
    $ ./exploit/sboot_exploit.py -k shellcode/helloworld.bin -s shellcode/boot.bin
    [1594735830.490811] [+] Shellcode started
    [1594735831.822608] [*] Sending kernel
    [1594735841.429838] [+] Got kernel from host
    [1594735841.433176] [*] Start sleeping: plug the UART
    [1594735861.383138] [*] End sleeping
    [1594735861.385037] [+] jump() started
    ERROR:root:Timeout
    Traceback (most recent call last):
      File "./exploit/sboot_exploit.py", line 487, in &lt;module&gt;
        sys.exit(shellcode_handler(exploit, args))
      File "./exploit/sboot_exploit.py", line 399, in shellcode_handler
        code = exploit.read_timeout(2)
      File "./exploit/sboot_exploit.py", line 56, in read_timeout
        raise Exception('Timeout waiting for read')
    Exception: Timeout waiting for read

It then reboot as expected (to the charging screen) as helloworld.c
contains the following:
    int main() {
    	/* Trigger PMU reset */
    	*(unsigned *)0x10020400 = 1;

    	/* Wait for power cycle */
    	while (1);
    }

Signed-off-by: Denis 'GNUtoo' Carikli &lt;GNUtoo@cyberdimension.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>exploit: Add crude timestamps</title>
<updated>2020-07-14T05:13:52+00:00</updated>
<author>
<name>Denis 'GNUtoo' Carikli</name>
<email>GNUtoo@cyberdimension.org</email>
</author>
<published>2020-07-14T05:13:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/tools/s-boot_usb_exploit/commit/?id=054f83335f98e2d11c881f095f99fa03a302f89c'/>
<id>054f83335f98e2d11c881f095f99fa03a302f89c</id>
<content type='text'>
Signed-off-by: Denis 'GNUtoo' Carikli &lt;GNUtoo@cyberdimension.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Denis 'GNUtoo' Carikli &lt;GNUtoo@cyberdimension.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>exploit: fix off-by-one when overwriting memory</title>
<updated>2020-07-14T03:15:56+00:00</updated>
<author>
<name>oranav</name>
<email>oranav@gmail.com</email>
</author>
<published>2018-04-09T06:44:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/tools/s-boot_usb_exploit/commit/?id=de497686ee80da3af68f1c1ccbbc83a61580b107'/>
<id>de497686ee80da3af68f1c1ccbbc83a61580b107</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>shellcode: remove dependency on mmc_startup()</title>
<updated>2020-07-14T03:15:54+00:00</updated>
<author>
<name>oranav</name>
<email>oranav@gmail.com</email>
</author>
<published>2018-04-08T21:32:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/tools/s-boot_usb_exploit/commit/?id=d29ec286acd795d8941a14d3a1931bbea4059ee7'/>
<id>d29ec286acd795d8941a14d3a1931bbea4059ee7</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>shellcode: remove dependency on clk{1,2}()</title>
<updated>2020-07-14T03:15:51+00:00</updated>
<author>
<name>oranav</name>
<email>oranav@gmail.com</email>
</author>
<published>2018-04-08T18:59:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/tools/s-boot_usb_exploit/commit/?id=19f12eccd34c464738e30481c8ad715746410c52'/>
<id>19f12eccd34c464738e30481c8ad715746410c52</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>shellcode: remove dependency on display()</title>
<updated>2020-07-14T03:15:50+00:00</updated>
<author>
<name>oranav</name>
<email>oranav@gmail.com</email>
</author>
<published>2018-04-08T18:36:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/tools/s-boot_usb_exploit/commit/?id=63d69f9b1eeb2f2c7f0f40b3d08fbef57cfec3d4'/>
<id>63d69f9b1eeb2f2c7f0f40b3d08fbef57cfec3d4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>shellcode: dynamically find sleep() address</title>
<updated>2020-07-14T03:15:48+00:00</updated>
<author>
<name>oranav</name>
<email>oranav@gmail.com</email>
</author>
<published>2018-04-07T23:06:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/tools/s-boot_usb_exploit/commit/?id=2ce90aa3017964fa3ee3a2bae8cbfe4cd750144f'/>
<id>2ce90aa3017964fa3ee3a2bae8cbfe4cd750144f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>shellcode: dynamically determine USB function addresses</title>
<updated>2020-07-14T03:15:43+00:00</updated>
<author>
<name>Oran Avraham</name>
<email>oranav@gmail.com</email>
</author>
<published>2018-01-13T16:14:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/tools/s-boot_usb_exploit/commit/?id=8c3cc914e74c8e09d0045d1568958fdffab2ad3f'/>
<id>8c3cc914e74c8e09d0045d1568958fdffab2ad3f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>exploit: add --dump for sboot dumping mode</title>
<updated>2020-07-14T03:15:42+00:00</updated>
<author>
<name>oranav</name>
<email>oranav@gmail.com</email>
</author>
<published>2018-01-06T16:07:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/tools/s-boot_usb_exploit/commit/?id=b3cfea7efc0e7b24e3ff63298d397c86eefa687d'/>
<id>b3cfea7efc0e7b24e3ff63298d397c86eefa687d</id>
<content type='text'>
In some cases the device's boot partition is still intact and contains
an unknown version of sboot. In order to compile a working shellcode,
one must know the exact addresses of certain functions in sboot. Allow
the user to dump his version of sboot in order to adapt the shellcode
accordingly.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In some cases the device's boot partition is still intact and contains
an unknown version of sboot. In order to compile a working shellcode,
one must know the exact addresses of certain functions in sboot. Allow
the user to dump his version of sboot in order to adapt the shellcode
accordingly.
</pre>
</div>
</content>
</entry>
<entry>
<title>Move exploit into its own folder</title>
<updated>2017-12-24T23:52:40+00:00</updated>
<author>
<name>oranav</name>
<email>oranav@gmail.com</email>
</author>
<published>2017-12-24T23:52:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/tools/s-boot_usb_exploit/commit/?id=0c33cb2a419203f2c0cf5b88395347f6e2917899'/>
<id>0c33cb2a419203f2c0cf5b88395347f6e2917899</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
