View Single Post
Old 05-12-2019, 09:09 PM   #6
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by ilovejedd View Post
OP has a PW3 on 5.10.3 and is doing a serial jailbreak (last factory fw available thus far is 5.9.6.1). From his post, it seems like he already has shell access but further instructions from the serial jailbreak thread are geared towards older devices/firmware.

;installHtml just runs /usr/local/bin/InstallHtmlViewer.sh and this is pretty much what that script contains.

Code:
#!/bin/sh
#
# Copyright (c) 2012 Amazon.com, Inc. or its affiliates. All rights reserved.
# PROPRIETARY/CONFIDENTIAL
# Use is subject to license terms.
#
# Populate the files for html viewer

# root path after main-htmlviewer.tar.gz is extracted
FILE_PATH=/mnt/us/transferfiles

# copy files from tar to folders on device
mntroot rw
cd /mnt/us
tar xvf /mnt/us/main-htmlviewer.tar.gz
cd $FILE_PATH
cp wafapp /usr/bin/
if [ -f  /var/local/waf/htmlviewer ]
    then rm -rf /var/local/waf/htmlviewer
fi
if [ -f  /opt/var/local/waf/htmlviewer ]
    then rm -rf /opt/var/local/waf/htmlviewer
fi
cp -r htmlviewer /opt/var/local/waf/
if [ -f  /mnt/us/html_demos ]
    then rm -rf /mnt/us/html_demos
fi
cp -r html_demos /mnt/us/
cp htmlviewer.install /mnt/us/

# register application, cleanup and restart
register htmlviewer.install
cd ..
rm -rf $FILE_PATH
usbnetwork stop
restart appmgrd
restart x
restart framework
Yup, that is how a tar bomb is installed.
But
if you can run the tar command, why not just run the mv command and move the certificate to the correct place?
knc1 is offline   Reply With Quote