安卓动态逆向分析工具--Andbug&Androguard

时间:2023-12-23 18:29:25

工具使用方法:

转自:

http://bbs.pediy.com/showthread.php?t=183412

https://testerhome.com/topics/3542

安装andbug过程中可能会报错,找不到

clang: error: unknown argument: '-mno-fused-madd'

解决办法:

编译之前运行命令:

export CFLAGS=-Qunused-arguments

export CPPFLAGS=-Qunused-arguments

原因

You can tell clang to not raise this as an error by setting the following environment variables prior compilation:

export CFLAGS=-Qunused-arguments
export CPPFLAGS=-Qunused-arguments

Then pip install psycopg2should work.

I had the same when trying to pip install lxml.

Edit: if you are installing as superuser (which will likely be the case if you are trying to append to /Library/Python/2.7/site-packages, the native Apple factory-installed Python distribution which ships with OS X, rather than to some other Python distribution which you have subsequently installed yourself), then you will need to do, as described by @Thijs Kuipers in comments below:

sudo -E pip install psycopg2

or the equivalent, for whatever other package name you may be substituting in place of psycopg2.

UPDATE [2014-05-16]: Apple has fixed this problem with updated system Pythons (2.7, 2.6, and 2.5) in OS X 10.9.3 so the workaround is no longer necessary when using the latest Mavericks and Xcode 5.1+. However, as of now, the workaround is still required for OS X 10.8.x(Mountain Lion, currently 10.8.5) if you are using Xcode 5.1+ there.

安装完成后运行andbug, 出现下面截图,则表示安装成功:

安卓动态逆向分析工具--Andbug&Androguard

通过adb shell ps | grep packagename查看应用进程,

获取pid后,andbug shell -p pid

调试遇到以下问题:

!! EOF
Traceback (most recent call last):
File "./andbug", line , in main
andbug.command.run_command(args)
File "/Users/huangxiaoshi/AndBug/lib/andbug/command.py", line , in run_command
return ctxt.perform(args[], args[:])
File "/Users/huangxiaoshi/AndBug/lib/andbug/command.py", line , in perform
if act.proc: self.connect()
File "/Users/huangxiaoshi/AndBug/lib/andbug/command.py", line , in connect
self.sess = andbug.vm.connect(self.pid, self.dev)
File "/Users/huangxiaoshi/AndBug/lib/andbug/vm.py", line , in connect
conn = andbug.proto.connect(andbug.proto.forward(pid, dev)) #conn是Connection(Thread)类型的一个对象
File "/Users/huangxiaoshi/AndBug/lib/andbug/proto.py", line , in connect
p.start()
File "/Users/huangxiaoshi/AndBug/lib/andbug/proto.py", line , in start
self.readHandshake()
File "/Users/huangxiaoshi/AndBug/lib/andbug/proto.py", line , in readHandshake
data = self.read(len(HANDSHAKE_MSG))
File "/Users/huangxiaoshi/AndBug/lib/andbug/proto.py", line , in read
pkt = self._read(sz) #返回值是读到的数据
File "/Users/huangxiaoshi/AndBug/lib/andbug/proto.py", line , in read
if not pkt: raise EOF()
EOF: EOF

怀疑是手机以及应用的权限问题:

查看手机权限:

adb shell getprop ro.debuggable

查看应用权限:

进入到sdk build tools下,找到appt工具,执行

aapt list -v -a Kascend_Chushou_1.0.12.2032.apk >chushou.txt

这个命令将会打印和apk相关的所有详细信息,找到“android:debuggable",它的值分为:
  0x0: debuggable false
  0xffffffff: debugabble true
事实证明没有打印是否debuggable 的相关信息