Closed Yogehi closed 6 years ago
Can you post logs/evidence of the fix working please.
Needle logs below showing the proposed changes work in iOS 10. The logs goes over the following:
__ _ _______ _______ ______ _______
| \ | |______ |______ | \ | |______
| \_| |______ |______ |_____/ |_____ |______
Needle v1.3.2 [mwr.to/needle]
[MWR InfoSecurity (@MWRLabs) - Marco Lancini (@LanciniMarco)]
[needle] > set debug true
DEBUG => true
[needle] > shell
[*] Spawning a shell...
[*] Checking connection with device...
[V] Connection not present, creating a new instance
[D] Setting up USB port forwarding on port 2222
[D] [LOCAL CMD] Local Subprocess Command: /root/Programs/needle/needle/libs/usbmuxd/tcprelay.py -t 22:2222
[D] [AGENT] Setting up port forwarding on port 4444
[V] [AGENT] Connecting to agent (127.0.0.1:4444)...
[+] [AGENT] Successfully connected to agent (127.0.0.1:4444)...
[D] [AGENT] Executing command: os_version
[V] [SSH] Connecting (127.0.0.1:2222)...
[+] [SSH] Connected (127.0.0.1:2222)
[D] [LOCAL CMD] Local Interactive Command: sshpass -p "<password>" ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 2222 root@127.0.0.1
Warning: Permanently added '[127.0.0.1]:2222' (ECDSA) to the list of known hosts.
Yays-iPhone:~ root# git --version
git version 2.13.0
Yays-iPhone:~ root# uname -a
Darwin Yays-iPhone 16.3.0 Darwin Kernel Version 16.3.0: Tue Nov 29 21:40:08 PST 2016; root:xnu-3789.32.1~4/MarijuanARM64_T7000 iPhone7,2 arm64 N61AP Darwin
Yays-iPhone:~ root# ls -la /private/var/theos
total 64
drwxr-xr-x 14 root wheel 748 Feb 27 15:57 ./
drwxrwxrwx 34 root wheel 1326 Feb 27 15:57 ../
-rw-r--r-- 1 root wheel 965 Feb 27 15:57 .appveyor.yml
drwxr-xr-x 9 root wheel 476 Feb 27 15:57 .git/
drwxr-xr-x 2 root wheel 170 Feb 27 15:57 .github/
-rw-r--r-- 1 root wheel 71 Feb 27 15:57 .gitignore
-rw-r--r-- 1 root wheel 444 Feb 27 15:57 .gitmodules
-rw-r--r-- 1 root wheel 647 Feb 27 15:57 .travis.yml
-rw-r--r-- 1 root wheel 35367 Feb 27 15:57 LICENSE.md
-rw-r--r-- 1 root wheel 911 Feb 27 15:57 Prefix.pch
-rw-r--r-- 1 root wheel 829 Feb 27 15:57 README.md
drwxr-xr-x 2 root wheel 646 Feb 27 15:57 bin/
drwxr-xr-x 4 root wheel 136 Feb 27 15:57 extras/
drwxr-xr-x 2 root wheel 102 Feb 27 15:57 include/
drwxr-xr-x 2 root wheel 102 Feb 27 15:57 lib/
drwxr-xr-x 8 root wheel 850 Feb 27 15:57 makefiles/
drwxr-xr-x 2 root wheel 102 Feb 27 15:57 mod/
-rw-r--r-- 1 root wheel 655 Feb 27 15:57 package.json
drwxr-xr-x 5 root wheel 238 Feb 27 15:58 sdks/
drwxr-xr-x 3 root wheel 102 Feb 27 15:57 templates/
drwxr-xr-x 2 root wheel 102 Feb 27 15:57 toolchain/
drwxr-xr-x 7 root wheel 238 Feb 27 15:57 vendor/
Yays-iPhone:~ root# exit
logout
Connection to 127.0.0.1 closed.
[needle] > use device/dependency_installer
[needle][dependency_installer] > set theos true
THEOS => true
[needle][dependency_installer] > run
[D] Setup local output folder: /root/.needle/output
[D] Setting up issues database...
[D] [DB] QUERY: CREATE TABLE IF NOT EXISTS issues (app TEXT, module TEXT, name TEXT, content TEXT, confidence TEXT, outfile TEXT)
[*] Checking connection with device...
[+] Already connected to: 127.0.0.1
[D] Creating temp folder: /var/root/needle/
[D] [REMOTE CMD] Remote Command: if [ -d /var/root/needle/ ]; then echo "yes"; else echo "no" ; fi
[D] [REMOTE CMD] Remote Command: mkdir /var/root/needle/
[D] [AGENT] Executing command: os_version
[*] Checking prerequisites...
[D] [REMOTE CMD] Remote Command: which apt-get
[D] [REMOTE CMD] Remote Command: which dpkg
[V] [INSTALL] Installing COREUTILS via apt-get.
[D] [REMOTE CMD] Remote Command: apt-get install -y --force-yes coreutils
[V] [INSTALL] Installing COREUTILS via apt-get.
[D] [REMOTE CMD] Remote Command: apt-get install -y --force-yes coreutils-bin
[D] [REMOTE CMD] Remote Command: apt-get update
[*] Refreshing package list...
[D] [REMOTE CMD] Remote Command: dpkg --get-selections | grep -v "deinstall" | cut -f1
[D] [REMOTE CMD] Remote Command: apt-get update
[D] [REMOTE CMD] Remote Command: cat /etc/apt/sources.list.d/cydia.list
[*] The following tools are going to be installed: ['THEOS']
[>][QUESTION] Do you want to continue? [y/N]: y
[V] [INSTALL] Manually installing: THEOS
[D] [REMOTE CMD] Remote Command: ln -sf /usr/local/bin/perl /usr/bin/perl
[D] [REMOTE CMD] Remote Command: rm -rf /private/var/theos/
[D] [REMOTE CMD] Remote Command: GIT_SSL_NO_VERIFY=true git clone --quiet git://github.com/theos/theos.git /private/var/theos/
[D] [REMOTE CMD] Remote Command: cd /private/var/theos/ && git submodule init --quiet
[D] [REMOTE CMD] Remote Command: sed -i -- 's/https/git/g' /private/var/theos/.git/config
[D] [REMOTE CMD] Remote Command: cd /private/var/theos/ && git submodule update --quiet
[D] [REMOTE CMD] Remote Command: rm -rf /private/var/theos/sdks && git clone --quiet git://github.com/theos/sdks.git /private/var/theos/sdks
[needle][dependency_installer] > use hooking/theos/theos_tweak
[+] Resource file successfully loaded
[needle][theos_tweak] > set PROJECT_NAME yayprojectyay
PROJECT_NAME => yayprojectyay
[needle][theos_tweak] > set PACKAGE_NAME yaypackageyay
PACKAGE_NAME => yaypackageyay
[needle][theos_tweak] > set PROGRAM NANO
PROGRAM => NANO
[needle][theos_tweak] > run
[*] Checking connection with device...
[+] Already connected to: 127.0.0.1
[D] Creating temp folder: /var/root/needle/
[D] [REMOTE CMD] Remote Command: if [ -d /var/root/needle/ ]; then echo "yes"; else echo "no" ; fi
[*] Target app not selected. Launching wizard...
[D] [AGENT] Executing command: list_apps
[+] Apps found:
<snip>
12 - com.mwr.iSieve-main-view
<snip>
[>][QUESTION] Please select a number: 12
[+] Target app: com.mwr.iSieve-main-view
[*] Retrieving app's metadata...
[D] Copying the plist to temp: /private/var/containers/Bundle/Application/3A6B1E02-ED5B-4422-8E73-34B785990807/iSieve.app/Info.plist -> /root/.needle/tmp/plist
[*] Pulling: /private/var/containers/Bundle/Application/3A6B1E02-ED5B-4422-8E73-34B785990807/iSieve.app/Info.plist -> /root/.needle/tmp/plist
[D] Downloading: "/private/var/containers/Bundle/Application/3A6B1E02-ED5B-4422-8E73-34B785990807/iSieve.app/Info.plist" -> /root/.needle/tmp/plist
[D] [LOCAL CMD] Local Command: sshpass -p "<password>" scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -P 2222 root@127.0.0.1:"/private/var/containers/Bundle/Application/3A6B1E02-ED5B-4422-8E73-34B785990807/iSieve.app/Info.plist" /root/.needle/tmp/plist
[D] [REMOTE CMD] Remote Command: lipo -info /private/var/containers/Bundle/Application/3A6B1E02-ED5B-4422-8E73-34B785990807/iSieve.app/iSieve
[D] [REMOTE CMD] Remote Command: if [ -d /private/var/containers/Bundle/Application/3A6B1E02-ED5B-4422-8E73-34B785990807/iSieve.app/PlugIns ]; then echo "yes"; else echo "no" ; fi
[D] No Plugins found
[D] [REMOTE CMD] Remote Command: if [ -d /var/root/needle/yayprojectyay ]; then echo "yes"; else echo "no" ; fi
[*] Starting wizard...
[D] [REMOTE CMD] Remote Command: cd /var/root/needle/ && printf '11\nyayprojectyay\nneedle.yaypackageyay\nNeedle\n\n-' | perl /private/var/theos/bin/nic.pl
[*] Tweak created:
[D] [REMOTE CMD] Remote Command: if [ -d /var/root/needle/yayprojectyay ]; then echo "yes"; else echo "no" ; fi
[D] [REMOTE CMD] Remote Command: ls /var/root/needle/yayprojectyay
Makefile
Tweak.xm
control
yayprojectyay.plist
[*] Pulling: /var/root/needle/yayprojectyay/Tweak.xm -> /root/.needle/output/Tweak.xm
[D] Downloading: "/var/root/needle/yayprojectyay/Tweak.xm" -> /root/.needle/output/Tweak.xm
[D] [LOCAL CMD] Local Command: sshpass -p "<password>" scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -P 2222 root@127.0.0.1:"/var/root/needle/yayprojectyay/Tweak.xm" /root/.needle/output/Tweak.xm
[D] [LOCAL CMD] Local Interactive Command: nano /root/.needle/output/Tweak.xm
[*] Uploading new Tweak to device...
[*] Pushing: /root/.needle/output/Tweak.xm -> /var/root/needle/yayprojectyay/Tweak.xm
[D] Uploading: "/root/.needle/output/Tweak.xm" -> "/var/root/needle/yayprojectyay/Tweak.xm"
[D] [LOCAL CMD] Local Command: sshpass -p "<password>" scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -P 2222 -r "/root/.needle/output/Tweak.xm" root@127.0.0.1:"/var/root/needle/yayprojectyay/Tweak.xm"
[*] Installing the Tweak...
[D] [REMOTE CMD] Remote Interactive TTY Command: export THEOS=/private/var/theos && export PATH=$THEOS/bin:$PATH && cd /var/root/needle/yayprojectyay && make package install
Warning: Permanently added '[127.0.0.1]:2222' (ECDSA) to the list of known hosts.
> Making all for tweak yayprojectyay…
==> Preprocessing Tweak.xm…
==> Compiling Tweak.xm (armv7)…
==> Linking tweak yayprojectyay (armv7)…
==> Preprocessing Tweak.xm…
==> Compiling Tweak.xm (arm64)…
==> Linking tweak yayprojectyay (arm64)…
==> Merging tweak yayprojectyay…
==> Signing yayprojectyay…
> Making stage for tweak yayprojectyay…
dpkg-deb: building package 'needle.yaypackageyay' in './packages/needle.yaypackageyay_0.0.1-1+debug_iphoneos-arm.deb'.
==> Installing…
Selecting previously unselected package needle.yaypackageyay.
(Reading database ... 4910 files and directories currently installed.)
Preparing to unpack .../needle.yaypackageyay_0.0.1-1+debug_iphoneos-arm.deb ...
Unpacking needle.yaypackageyay (0.0.1-1+debug) ...
Setting up needle.yaypackageyay (0.0.1-1+debug) ...
Connection to 127.0.0.1 closed.
[needle][theos_tweak] > shell
[*] Spawning a shell...
[*] Checking connection with device...
[+] Already connected to: 127.0.0.1
[D] [LOCAL CMD] Local Interactive Command: sshpass -p "<password>" ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 2222 root@127.0.0.1
Warning: Permanently added '[127.0.0.1]:2222' (ECDSA) to the list of known hosts.
Yays-iPhone:~ root# dpkg -l | grep needle
ii mwr.needle.agent 1.0.5 iphoneos-arm Needle Agent
ii needle.yaypackageyay 0.0.1-1+debug iphoneos-arm An awesome MobileSubstrate tweak!
===============================================================
Needle logs below showing the proposed changes work in iOS 9. The logs goes over the following:
__ _ _______ _______ ______ _______
| \ | |______ |______ | \ | |______
| \_| |______ |______ |_____/ |_____ |______
Needle v1.3.2 [mwr.to/needle]
[MWR InfoSecurity (@MWRLabs) - Marco Lancini (@LanciniMarco)]
[needle] > set debug true
DEBUG => true
[needle] > shell
[*] Spawning a shell...
[*] Checking connection with device...
[V] Connection not present, creating a new instance
[D] Setting up USB port forwarding on port 2222
[D] [LOCAL CMD] Local Subprocess Command: /root/Programs/needle/needle/libs/usbmuxd/tcprelay.py -t 22:2222
[D] [AGENT] Setting up port forwarding on port 4444
[V] [AGENT] Connecting to agent (127.0.0.1:4444)...
[+] [AGENT] Successfully connected to agent (127.0.0.1:4444)...
[D] [AGENT] Executing command: os_version
[V] [SSH] Connecting (127.0.0.1:2222)...
[+] [SSH] Connected (127.0.0.1:2222)
[D] [LOCAL CMD] Local Interactive Command: sshpass -p "<password>" ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 2222 root@127.0.0.1
Warning: Permanently added '[127.0.0.1]:2222' (RSA) to the list of known hosts.
zaks-iPad:~ root# git --version
git version 2.13.0
zaks-iPad:~ root# uname -a
Darwin zaks-iPad 15.0.0 Darwin Kernel Version 15.0.0: Thu Aug 20 13:11:14 PDT 2015; root:xnu-3248.1.3~1/RELEASE_ARM64_S5L8960X iPad4,2 arm64 J72AP Darwin
zaks-iPad:~ root# ls -la /private/var/theos
ls: cannot access /private/var/theos: No such file or directory
zaks-iPad:~ root# exit
logout
Connection to 127.0.0.1 closed.
[needle] > use device/dependency_installer
[needle][dependency_installer] > set theos true
THEOS => true
[needle][dependency_installer] > run
[D] Setup local output folder: /root/.needle/output
[D] Creating local output folder: /root/.needle/output
[D] Setting up issues database...
[D] [DB] QUERY: CREATE TABLE IF NOT EXISTS issues (app TEXT, module TEXT, name TEXT, content TEXT, confidence TEXT, outfile TEXT)
[*] Checking connection with device...
[+] Already connected to: 127.0.0.1
[D] Creating temp folder: /var/root/needle/
[D] [REMOTE CMD] Remote Command: if [ -d /var/root/needle/ ]; then echo "yes"; else echo "no" ; fi
[D] [REMOTE CMD] Remote Command: mkdir /var/root/needle/
[D] [AGENT] Executing command: os_version
[*] Checking prerequisites...
[D] [REMOTE CMD] Remote Command: which apt-get
[D] [REMOTE CMD] Remote Command: which dpkg
[V] [INSTALL] Installing COREUTILS via apt-get.
[D] [REMOTE CMD] Remote Command: apt-get install -y --force-yes coreutils
[V] [INSTALL] Installing COREUTILS via apt-get.
[D] [REMOTE CMD] Remote Command: apt-get install -y --force-yes coreutils-bin
[D] [REMOTE CMD] Remote Command: apt-get update
[*] Refreshing package list...
[D] [REMOTE CMD] Remote Command: dpkg --get-selections | grep -v "deinstall" | cut -f1
[D] [REMOTE CMD] Remote Command: apt-get update
[D] [REMOTE CMD] Remote Command: cat /etc/apt/sources.list.d/cydia.list
[*] The following tools are going to be installed: ['THEOS']
[>][QUESTION] Do you want to continue? [y/N]: y
[V] [INSTALL] Manually installing: THEOS
[D] [REMOTE CMD] Remote Command: ln -sf /usr/local/bin/perl /usr/bin/perl
[D] [REMOTE CMD] Remote Command: rm -rf /private/var/theos/
[D] [REMOTE CMD] Remote Command: GIT_SSL_NO_VERIFY=true git clone --quiet git://github.com/theos/theos.git /private/var/theos/
[D] [REMOTE CMD] Remote Command: cd /private/var/theos/ && git submodule init --quiet
[D] [REMOTE CMD] Remote Command: sed -i -- 's/https/git/g' /private/var/theos/.git/config
[D] [REMOTE CMD] Remote Command: cd /private/var/theos/ && git submodule update --quiet
[D] [REMOTE CMD] Remote Command: rm -rf /private/var/theos/sdks && git clone --quiet git://github.com/theos/sdks.git /private/var/theos/sdks
[needle][dependency_installer] > use hooking/theos/theos_tweak
[+] Resource file successfully loaded
[needle][theos_tweak] > set PROJECT_NAME booprojectboo
PROJECT_NAME => booprojectboo
[needle][theos_tweak] > set PACKAGE_NAME boopackageboo
PACKAGE_NAME => boopackageboo
[needle][theos_tweak] > set PROGRAM NANO
PROGRAM => NANO
[needle][theos_tweak] > run
[*] Checking connection with device...
[+] Already connected to: 127.0.0.1
[D] Creating temp folder: /var/root/needle/
[D] [REMOTE CMD] Remote Command: if [ -d /var/root/needle/ ]; then echo "yes"; else echo "no" ; fi
[*] Target app not selected. Launching wizard...
[D] [AGENT] Executing command: list_apps
[+] Apps found:
<snip>
18 - jp.naver.line
<snip>
[>][QUESTION] Please select a number: 18
[+] Target app: jp.naver.line
[*] Retrieving app's metadata...
[D] Copying the plist to temp: /private/var/mobile/Containers/Bundle/Application/FCFB8BB7-76E8-4181-BE28-2A8B95538CC6/LINE.app/Info.plist -> /root/.needle/tmp/plist
[*] Pulling: /private/var/mobile/Containers/Bundle/Application/FCFB8BB7-76E8-4181-BE28-2A8B95538CC6/LINE.app/Info.plist -> /root/.needle/tmp/plist
[D] Downloading: "/private/var/mobile/Containers/Bundle/Application/FCFB8BB7-76E8-4181-BE28-2A8B95538CC6/LINE.app/Info.plist" -> /root/.needle/tmp/plist
[D] [LOCAL CMD] Local Command: sshpass -p "<password>" scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -P 2222 root@127.0.0.1:"/private/var/mobile/Containers/Bundle/Application/FCFB8BB7-76E8-4181-BE28-2A8B95538CC6/LINE.app/Info.plist" /root/.needle/tmp/plist
[D] [REMOTE CMD] Remote Command: lipo -info /private/var/mobile/Containers/Bundle/Application/FCFB8BB7-76E8-4181-BE28-2A8B95538CC6/LINE.app/LINE
[D] [REMOTE CMD] Remote Command: if [ -d /private/var/mobile/Containers/Bundle/Application/FCFB8BB7-76E8-4181-BE28-2A8B95538CC6/LINE.app/PlugIns ]; then echo "yes"; else echo "no" ; fi
[D] [REMOTE CMD] Remote Command: if [ -d /private/var/mobile/Containers/Bundle/Application/FCFB8BB7-76E8-4181-BE28-2A8B95538CC6/LINE.app/PlugIns ]; then echo "yes"; else echo "no" ; fi
[D] [REMOTE CMD] Remote Command: ls /private/var/mobile/Containers/Bundle/Application/FCFB8BB7-76E8-4181-BE28-2A8B95538CC6/LINE.app/PlugIns
[D] Copying the plist to temp: /private/var/mobile/Containers/Bundle/Application/FCFB8BB7-76E8-4181-BE28-2A8B95538CC6/LINE.app/PlugIns/LineActionKeepExtension.appex/Info.plist -> /root/.needle/tmp/plist
[*] Pulling: /private/var/mobile/Containers/Bundle/Application/FCFB8BB7-76E8-4181-BE28-2A8B95538CC6/LINE.app/PlugIns/LineActionKeepExtension.appex/Info.plist -> /root/.needle/tmp/plist
[D] Downloading: "/private/var/mobile/Containers/Bundle/Application/FCFB8BB7-76E8-4181-BE28-2A8B95538CC6/LINE.app/PlugIns/LineActionKeepExtension.appex/Info.plist" -> /root/.needle/tmp/plist
[D] [LOCAL CMD] Local Command: sshpass -p "<password>" scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -P 2222 root@127.0.0.1:"/private/var/mobile/Containers/Bundle/Application/FCFB8BB7-76E8-4181-BE28-2A8B95538CC6/LINE.app/PlugIns/LineActionKeepExtension.appex/Info.plist" /root/.needle/tmp/plist
[D] Copying the plist to temp: /private/var/mobile/Containers/Bundle/Application/FCFB8BB7-76E8-4181-BE28-2A8B95538CC6/LINE.app/PlugIns/LineNotificationContentExtension.appex/Info.plist -> /root/.needle/tmp/plist
[*] Pulling: /private/var/mobile/Containers/Bundle/Application/FCFB8BB7-76E8-4181-BE28-2A8B95538CC6/LINE.app/PlugIns/LineNotificationContentExtension.appex/Info.plist -> /root/.needle/tmp/plist
[D] Downloading: "/private/var/mobile/Containers/Bundle/Application/FCFB8BB7-76E8-4181-BE28-2A8B95538CC6/LINE.app/PlugIns/LineNotificationContentExtension.appex/Info.plist" -> /root/.needle/tmp/plist
[D] [LOCAL CMD] Local Command: sshpass -p "<password>" scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -P 2222 root@127.0.0.1:"/private/var/mobile/Containers/Bundle/Application/FCFB8BB7-76E8-4181-BE28-2A8B95538CC6/LINE.app/PlugIns/LineNotificationContentExtension.appex/Info.plist" /root/.needle/tmp/plist
[D] Copying the plist to temp: /private/var/mobile/Containers/Bundle/Application/FCFB8BB7-76E8-4181-BE28-2A8B95538CC6/LINE.app/PlugIns/LineNotificationServiceExtension.appex/Info.plist -> /root/.needle/tmp/plist
[*] Pulling: /private/var/mobile/Containers/Bundle/Application/FCFB8BB7-76E8-4181-BE28-2A8B95538CC6/LINE.app/PlugIns/LineNotificationServiceExtension.appex/Info.plist -> /root/.needle/tmp/plist
[D] Downloading: "/private/var/mobile/Containers/Bundle/Application/FCFB8BB7-76E8-4181-BE28-2A8B95538CC6/LINE.app/PlugIns/LineNotificationServiceExtension.appex/Info.plist" -> /root/.needle/tmp/plist
[D] [LOCAL CMD] Local Command: sshpass -p "<password>" scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -P 2222 root@127.0.0.1:"/private/var/mobile/Containers/Bundle/Application/FCFB8BB7-76E8-4181-BE28-2A8B95538CC6/LINE.app/PlugIns/LineNotificationServiceExtension.appex/Info.plist" /root/.needle/tmp/plist
[D] Copying the plist to temp: /private/var/mobile/Containers/Bundle/Application/FCFB8BB7-76E8-4181-BE28-2A8B95538CC6/LINE.app/PlugIns/LinePayTodayExtension.appex/Info.plist -> /root/.needle/tmp/plist
[*] Pulling: /private/var/mobile/Containers/Bundle/Application/FCFB8BB7-76E8-4181-BE28-2A8B95538CC6/LINE.app/PlugIns/LinePayTodayExtension.appex/Info.plist -> /root/.needle/tmp/plist
[D] Downloading: "/private/var/mobile/Containers/Bundle/Application/FCFB8BB7-76E8-4181-BE28-2A8B95538CC6/LINE.app/PlugIns/LinePayTodayExtension.appex/Info.plist" -> /root/.needle/tmp/plist
[D] [LOCAL CMD] Local Command: sshpass -p "<password>" scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -P 2222 root@127.0.0.1:"/private/var/mobile/Containers/Bundle/Application/FCFB8BB7-76E8-4181-BE28-2A8B95538CC6/LINE.app/PlugIns/LinePayTodayExtension.appex/Info.plist" /root/.needle/tmp/plist
[D] Copying the plist to temp: /private/var/mobile/Containers/Bundle/Application/FCFB8BB7-76E8-4181-BE28-2A8B95538CC6/LINE.app/PlugIns/LineShareExtension.appex/Info.plist -> /root/.needle/tmp/plist
[*] Pulling: /private/var/mobile/Containers/Bundle/Application/FCFB8BB7-76E8-4181-BE28-2A8B95538CC6/LINE.app/PlugIns/LineShareExtension.appex/Info.plist -> /root/.needle/tmp/plist
[D] Downloading: "/private/var/mobile/Containers/Bundle/Application/FCFB8BB7-76E8-4181-BE28-2A8B95538CC6/LINE.app/PlugIns/LineShareExtension.appex/Info.plist" -> /root/.needle/tmp/plist
[D] [LOCAL CMD] Local Command: sshpass -p "<password>" scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -P 2222 root@127.0.0.1:"/private/var/mobile/Containers/Bundle/Application/FCFB8BB7-76E8-4181-BE28-2A8B95538CC6/LINE.app/PlugIns/LineShareExtension.appex/Info.plist" /root/.needle/tmp/plist
[D] Copying the plist to temp: /private/var/mobile/Containers/Bundle/Application/FCFB8BB7-76E8-4181-BE28-2A8B95538CC6/LINE.app/PlugIns/LineTodayExtension.appex/Info.plist -> /root/.needle/tmp/plist
[*] Pulling: /private/var/mobile/Containers/Bundle/Application/FCFB8BB7-76E8-4181-BE28-2A8B95538CC6/LINE.app/PlugIns/LineTodayExtension.appex/Info.plist -> /root/.needle/tmp/plist
[D] Downloading: "/private/var/mobile/Containers/Bundle/Application/FCFB8BB7-76E8-4181-BE28-2A8B95538CC6/LINE.app/PlugIns/LineTodayExtension.appex/Info.plist" -> /root/.needle/tmp/plist
[D] [LOCAL CMD] Local Command: sshpass -p "<password>" scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -P 2222 root@127.0.0.1:"/private/var/mobile/Containers/Bundle/Application/FCFB8BB7-76E8-4181-BE28-2A8B95538CC6/LINE.app/PlugIns/LineTodayExtension.appex/Info.plist" /root/.needle/tmp/plist
[D] [REMOTE CMD] Remote Command: if [ -d /var/root/needle/booprojectboo ]; then echo "yes"; else echo "no" ; fi
[*] Starting wizard...
[D] [REMOTE CMD] Remote Command: cd /var/root/needle/ && printf '11\nbooprojectboo\nneedle.boopackageboo\nNeedle\n\n-' | perl /private/var/theos/bin/nic.pl
[*] Tweak created:
[D] [REMOTE CMD] Remote Command: if [ -d /var/root/needle/booprojectboo ]; then echo "yes"; else echo "no" ; fi
[D] [REMOTE CMD] Remote Command: ls /var/root/needle/booprojectboo
Makefile
Tweak.xm
booprojectboo.plist
control
[*] Pulling: /var/root/needle/booprojectboo/Tweak.xm -> /root/.needle/output/Tweak.xm
[D] Downloading: "/var/root/needle/booprojectboo/Tweak.xm" -> /root/.needle/output/Tweak.xm
[D] [LOCAL CMD] Local Command: sshpass -p "<password>" scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -P 2222 root@127.0.0.1:"/var/root/needle/booprojectboo/Tweak.xm" /root/.needle/output/Tweak.xm
[D] [LOCAL CMD] Local Interactive Command: nano /root/.needle/output/Tweak.xm
[*] Uploading new Tweak to device...
[*] Pushing: /root/.needle/output/Tweak.xm -> /var/root/needle/booprojectboo/Tweak.xm
[D] Uploading: "/root/.needle/output/Tweak.xm" -> "/var/root/needle/booprojectboo/Tweak.xm"
[D] [LOCAL CMD] Local Command: sshpass -p "<password>" scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -P 2222 -r "/root/.needle/output/Tweak.xm" root@127.0.0.1:"/var/root/needle/booprojectboo/Tweak.xm"
[*] Installing the Tweak...
[D] [REMOTE CMD] Remote Interactive TTY Command: export THEOS=/private/var/theos && export PATH=$THEOS/bin:$PATH && cd /var/root/needle/booprojectboo && make package install
Warning: Permanently added '[127.0.0.1]:2222' (RSA) to the list of known hosts.
> Making all for tweak booprojectboo…
==> Preprocessing Tweak.xm…
==> Compiling Tweak.xm (armv7)…
==> Linking tweak booprojectboo (armv7)…
==> Preprocessing Tweak.xm…
==> Compiling Tweak.xm (arm64)…
==> Linking tweak booprojectboo (arm64)…
==> Merging tweak booprojectboo…
==> Signing booprojectboo…
> Making stage for tweak booprojectboo…
dpkg-deb: building package 'needle.boopackageboo' in './packages/needle.boopackageboo_0.0.1-1+debug_iphoneos-arm.deb'.
==> Installing…
Selecting previously unselected package needle.boopackageboo.
(Reading database ... 12012 files and directories currently installed.)
Preparing to unpack .../needle.boopackageboo_0.0.1-1+debug_iphoneos-arm.deb ...
Unpacking needle.boopackageboo (0.0.1-1+debug) ...
Setting up needle.boopackageboo (0.0.1-1+debug) ...
Connection to 127.0.0.1 closed.
[needle][theos_tweak] > shell
[*] Spawning a shell...
[*] Checking connection with device...
[+] Already connected to: 127.0.0.1
[D] [LOCAL CMD] Local Interactive Command: sshpass -p "<password>" ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 2222 root@127.0.0.1
Warning: Permanently added '[127.0.0.1]:2222' (RSA) to the list of known hosts.
zaks-iPad:~ root# dpkg -l | grep needle
ii mwr.needle.agent 1.0.5 iphoneos-arm Needle Agent
ii needle.boopackageboo 0.0.1-1+debug iphoneos-arm An awesome MobileSubstrate tweak!
closing PR to clean up commit clutter
see new PR https://github.com/mwrlabs/needle/pull/239
Multiple issues addressed.
Issue 1: Symbolic linking fails if file exists
Current line 147:
If the user were to already have "/usr/bin/perl" then the following error would occur in Needle:
By adding the flag "-f" to the command, the symbolic link will be forced.
New proposed command:
===================================
Issue 2: Git clone fails if folder exists
Current line 148:
THEOS_FOLDER is set to '/private/var/theos'.
If the folder '/private/var/theos' already exists then the user will be presented with the following Needle error:
Solution is to remove '/private/var/theos' before using the 'git clone' command.
Proposed line 148 before running the git clone command:
===================================
Issue 3: Git command errors
The following errors were found while running the following Git versions when trying to clone the Theos project:
Git version 2.13.0 downloaded from repo 'cydia.radare.org'
Git version 2.8.1 download from repo 'apt.saurik.com'
Proposed change to the project URL would be "git://github.com/theos/theos.git" instead of "https://github.com/theos/theos.git".
However, because of the "--recursive" flag in the "git clone" command, this means that submodules need to be downloaded as well. The Theos project has it's ".git/config" file set to point to "https://github.com" instead of "git://github.com":
To remedy this, instead of specifying the "--recursive" flag with the "git clone" command, we can manually run "git module init" and then modify each URL in the "config" file so that "https://" is changed to "git://". Finally, we use "git submodule update" to download each submodule.
Proposed lines 149-152
The above lines work with both Git versions 2.13.0 and 2.8.1
===================================
Issue 4: outdated SDK URLs
The current commands to download the SDK files look like the following:
The URL "https://sdks.website" currently does not host any SDK files. The same developer of Theos currently has SDK files for 9.3 and 10.1 at the repository https://github.com/theos/sdks.
The following proposed line 153 will clone the https://github.com/theos/sdks repository into /private/var/theos/sdks: