Skip to content
This repository has been archived by the owner on Nov 7, 2023. It is now read-only.

Commit

Permalink
Fixed (and simplified the code for) cycript integration on iOS 8.x
Browse files Browse the repository at this point in the history
  • Loading branch information
h4gg1s committed Nov 5, 2014
1 parent 5b243ac commit 8042bc5
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 85 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ __THEOS_TARGET_ARG_1 = clang
include theos/makefiles/common.mk

CFLAGS+= -mno-thumb -O0 -fno-exceptions -fno-rtti -fno-common -ffast-math -fno-threadsafe-statics -Wno-deprecated-objc-isa-usage -Wno-deprecated-declarations -Wno-address-of-temporary
LDFLAGS+= -framework CFNetwork -framework Security -framework CoreGraphics -lsqlite3 -lxml2 libs/CocoaHTTPServer.a
LDFLAGS+= -framework CFNetwork -framework Security -framework CoreGraphics -lsqlite3 -lxml2 libs/CocoaHTTPServer.a -F. -framework Cycript -framework JavaScriptCore


TWEAK_NAME = iSpy
Expand Down
3 changes: 3 additions & 0 deletions Tweak.xm
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
#include "hooks_C_system_calls.h"
#include "hooks_CoreFoundation.h"
#include "iSpy.msgSend.whitelist.h"
#import "Cycript.framework/headers/cycript.h"

// This will become a linked list of pointers to instantiated classes
//id (*orig_class_createInstance)(Class cls, size_t extraBytes);
Expand Down Expand Up @@ -622,6 +623,8 @@ EXPORT int return_true() {
[bundleId release];
[plist release];
[appPlist release];

CYListenServer(12345);
}

/*
Expand Down
18 changes: 5 additions & 13 deletions iSpyServer/shellWebSocket.xm
Original file line number Diff line number Diff line change
Expand Up @@ -197,20 +197,12 @@

-(void) doexec {
// Setup the command and environment
const char *prog[] = {
"/usr/bin/ssh",
"-t", "-t",
"-p", "1337",
"-i", "/var/mobile/.ssh/id_rsa",
"-o", "StrictHostKeyChecking no",
"mobile@127.0.0.1",
[[self cmdLine] UTF8String],
NULL
};
const char *envp[] = { "TERM=xterm-256color", NULL };

// attach shell to our process
const char *prog[] = { "/usr/bin/cycript", "-r", "127.0.0.1:12345", NULL };
const char *envp[] = { "TERM=xterm-256color", NULL };

// replace current process with cycript
execve((const char *)prog[0], (char **)prog, (char **)envp);

// never returns
}

Expand Down
8 changes: 4 additions & 4 deletions layout/DEBIAN/control
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Package: com.bishopfox.iSpy
Name: iSpy
Depends: mobilesubstrate, preferenceloader
Version: 0.0.2
Depends: mobilesubstrate, preferenceloader, applist
Version: 0.0.3
Architecture: iphoneos-arm
Description: The iSpy application assessment framework.
Maintainer: Carl Livitt
Author: Carl Livitt
Maintainer: Carl Livitt, moloch--
Author: Carl Livitt, moloch--
Section: Tweaks
7 changes: 0 additions & 7 deletions layout/DEBIAN/postinst

This file was deleted.

6 changes: 0 additions & 6 deletions layout/DEBIAN/prerm

This file was deleted.

43 changes: 0 additions & 43 deletions layout/Library/LaunchDaemons/com.bishopfox.sshd.plist

This file was deleted.

11 changes: 0 additions & 11 deletions layout/var/www/iSpy/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,17 +92,8 @@ <h1>Cycript Stuff Goes Here</h1>
/* Initialize the cycript terminal bound to hotkey ctrl-` */
$("#cycriptWrapperDiv").butterflyTerminal("cycript", "`");
$("#cycriptWrapperDiv").hideTerminal();

setTimeout(function() {
/* Initialize the shell terminal bound to hotkey ctrl-1 */
$("#shellWrapperDiv").butterflyTerminal("shell", "1");
$("#shellWrapperDiv").hideTerminal();
}, 2000);

// setup the toolbar buttons to show/hide our shells
$("#btnShell").on("click", function () {
$("#shellWrapperDiv").toggleTerminal();
});
$("#btnCycript").on("click", function () {
$("#cycriptWrapperDiv").toggleTerminal();
});
Expand All @@ -125,8 +116,6 @@ <h1>Cycript Stuff Goes Here</h1>

<!-- This is where the Cycript terminal will go. It must have the class "terminalOverlay" attached. -->
<div id="cycriptWrapperDiv" class="terminalOverlay"></div>
<div id="shellWrapperDiv" class="terminalOverlay"></div>


<div class="bf-panel" id="wrapper" style="margin-top: -40px; margin-left: -40px; padding-bottom: 20px;">
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
Expand Down

0 comments on commit 8042bc5

Please sign in to comment.