1.切換為中文時區
dpkg-reconfigure tzdata 然后選擇Asia→Shanghai,然后重啟即可。
2.安裝中文字體
apt update
apt install xfonts-intl-chinese
apt install ttf-wqy-microhei
3.其他小工具
進程占用查看
apt install htop
流量查看
apt install jnettop
4.pyenv python多版本環境安裝
a.安裝依賴
https://github.com/pyenv/pyenv/wiki/Common-build-problems
sudo apt-get install -y build-essential libssl-dev zlib1g-dev libbz2-dev \
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
xz-utils tk-dev libffi-dev liblzma-dev python-openssl git
b.安裝
https://github.com/pyenv/pyenv-installer
curl https://pyenv.run | bash
默認安裝的位置是在~/.pyenv/bin下
或者
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
exec $SHELL
更新
pyenv update
設置環境變量
echo 'export PATH="$HOME/.pyenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(pyenv init -)"' >> ~/.bashrc
echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bashrc
source ~/.bashrc
下載指定版本的python
pyenv install 3.
會列出所有的3.版本
本次安裝3.8.0
pyenv install 3.8.0
一般會比較慢,除非用代理或者使用國內的鏡像
v=3.5.2|wget http://mirrors.sohu.com/python/$v/Python-$v.tar.xz -P ~/.pyenv/cache/;pyenv install $v
v=3.5.2|wget http://mirrors.sohu.com/python/$v/Python-$v.tar.xz -P ~/.pyenv/cache/;pyenv install $v
http://npm.taobao.org/mirrors/python/
http://npm.taobao.org/mirrors/python/3.8.0/Python-3.8.0.tar.xz
v=3.8.0|wget http://npm.taobao.org/mirrors/python/$v/Python-$v.tar.xz -P ~/.pyenv/cache/;pyenv install $v
wget http://npm.taobao.org/mirrors/python/3.8.0/Python-3.8.0.tar.xz -P ~/.pyenv/cache/
參考方法:
https://blog.csdn.net/ksws0292756/article/details/79995731
或者用迅雷下載后,然后將文件放到緩存里面~/.pyenv/cache
如果報錯提示gcc,g++等可能是沒有安裝g++或者gcc,zlib,biz2等
切換的時候直接pyenv local 3.8.5
卸載pyenv
Uninstall:
pyenv is installed within $PYENV_ROOT (default: ~/.pyenv). To uninstall, just remove it:
$ rm -fr ~/.pyenv
then remove these three lines from .bashrc:
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
and finally, restart your shell:
$ exec $SHELL
5.搭建代理
proxychains
在kali下用的是proxychains3,只需要設置socket5即可
記得注釋dns
6.下載vscode
https://code.visualstudio.com/Download
https://code.visualstudio.com/docs/?dv=linux64_deb
下載deb的即可,和ubuntu debain一樣
dpkg -i code_1.49.0-1599744551_amd64.deb
7.刷機,用谷歌的官方手機刷機,並安裝magisk獲取到su權限
8.安裝adb等工具命令,在百度搜索google platform tools 即可。
在環境變量內部添加adb的命令目錄
9.kali安裝shh,默認是不允許鏈接的
10.nodejs安裝
https://www.cnblogs.com/taony/p/10176981.html
https://github.com/nodesource/distributions/blob/master/README.md
11.frida開發環境
https://www.jianshu.com/p/c349471bdef7
https://github.com/r0ysue/AndroidSecurityStudy
https://wx.zsxq.com/dweb2/index/search/frida%E7%8E%AF%E5%A2%83/alltopics
frida腳本開發環境正確操作: 之前建議的這種方法frida-gum.d.ts已經被大胡子刪掉了,他現在不贊成使用這種方式。
目前最新正確的Frida環境搭建方法:
1. git clone https://github.com/oleavr/frida-agent-example.git
2. cd frida-agent-example/
3. npm install
4. 使用VSCode等IDE打開此工程,在agent下編寫typescript,會有智能提示。
5. npm run watch會監控代碼修改自動編譯生成js文件
也可以https://bbs.pediy.com/thread-258513.htm
npm install @types/frida-gum 這樣可以在任意的位置
6. frida -U -f com.example.android --no-pause -l _agent.js
安裝frida特定版本
想要使用基於特定frida版本的objection,只需先安裝好特定版本的frida和frida-tools,
再去objection的release里找那個日期之后一點點的版本。
https://github.com/frida/frida/releases?after=12.8.10
https://github.com/frida/frida/releases/download/12.8.0/frida-server-12.8.0-android-arm64.xz
此時的python環境為3.8.0,pyenv local 3.8.0
比如以frida 12.8.0版本舉例:
pip install frida==12.8.0
pip install frida-tools==5.3.0
pip install objection==1.8.4
//
pip install -i
https://pypi.tuna.tsinghua.edu.cn/simple frida==12.8.0
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple frida-tools==5.3.0
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple objection==1.8.4
按照這個順序,在裝objection的時候,
就會直接Requirement already satisfied,不會再去下載新的frida來安裝了。
或者
2021-03-23
pyenv install 3.8.8
pyenv local 3.8.8
pip install frida==14.2.13
pip install frida-tools==9.2.1
pip install objection==1.10.1
//
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple frida==14.2.13
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple frida-tools==9.2.1
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple objection==1.10.1
https://www.python.org/ftp/python/3.8.8/Python-3.8.8.tar.xz
pip下載時使用國內鏡像
臨時方法
# cmd
# 正常用法
pip3 install requests
# 加-i用法
pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple requests
臨時方法
# cmd
# 正常用法
pip3 install requests
# 加-i用法
pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple requests
android服務端frida非標准端口連接:
./fridaserver -l 0.0.0.0:9999
frida-ps -H 192.168.x.x:9999
frida -H 192.168.x.x:9999 -f com.android.settings -l xx.js
objection -N -h 192.168.31.191 -p 9999 -g com.android.settings explore
如果是usb連接,直接-U即可,服務端也不需要加端口
wifi adb 可以無線調試+qtsrccpy投屏
https://bbs.pediy.com/thread-257380.htm
https://github.com/barry-ran/QtScrcpy
pyenv install python非常慢
使用pyenv可以安裝不同的Python版本,具體使用方法參考知乎的這篇文章:https://zhuanlan.zhihu.com/p/27294128
然后在pyenv install -v 3.6.0時候,下載安裝非常慢。。
解決方法:
先去官網下載對應版本的源碼:https://www.python.org/downloads/source/
然后創建~/.pyenv/cache目錄: mkdir ~/.pyenv/cache (如果已經有該目錄直接進入: cd ~/.pyenv/cache)
然后pyenv install 3.6.0