Closed yassine955 closed 7 months ago
It's possible that the structure has a limit on the number of characters in the comm field (which I believe is a fixed length array). There currently isn't code to locate and reconstruct the full command line of the process, volatility doesn't have that information to display. What it sounds like you're requesting is a feature enhancement to extract additional information as part of the linux.pslist
plugin, to get a complete command line. I've updated the issue accordingly...
Thank you for your reaction! The thing is this. My application is called com.farmerbb.notepad
. I generated some data, which I want to find back in volatility 3. How would you access this process, and dump it?
This is the application: https://www.apkmirror.com/apk/braden-farmer/notepad/notepad-3-0-4-release/notepad-3-0-4-android-apk-download/
Hello, comm in the task struct is limited to 16 chars in the task struct, which is what's happening here.
You can see it's set here in the kernel and used later in the task_struct https://elixir.bootlin.com/linux/latest/source/include/linux/sched.h#L300
If i remember correctly the psaux plugin should help you.
To dump it you can just add --dump to the pslist command. If you wanted the memory allocations (heap etc) then the proc.Maps plugin with dump should get you the results you need.
My main concern is to find my application that was running on the device, and to see if I can find it. But the 16 chars
is making it hard to find ;(
Gove psaux a try.
This looks way better!
Change the option -r
to either pretty
or json
, works great. The width of these columns are to narrow ;(
Progress: 100.00 Stacking attempts finished
PID PPID COMM ARGS
1 0 init -
2 0 kthreadd [kthreadd]
3 2 rcu_gp [rcu_gp]
4 2 rcu_par_gp [rcu_par_gp]
5 2 kworker/0:0 [kworker/0:0]
6 2 kworker/0:0H [kworker/0:0H]
7 2 kworker/u8:0 [kworker/u8:0]
8 2 mm_percpu_wq [mm_percpu_wq]
9 2 kworker/u8:1 [kworker/u8:1]
10 2 rcu_tasks_kthre [rcu_tasks_kthre]
11 2 rcu_tasks_trace [rcu_tasks_trace]
12 2 ksoftirqd/0 [ksoftirqd/0]
13 2 rcu_preempt [rcu_preempt]
14 2 migration/0 [migration/0]
15 2 cpuhp/0 [cpuhp/0]
16 2 cpuhp/1 [cpuhp/1]
17 2 migration/1 [migration/1]
18 2 ksoftirqd/1 [ksoftirqd/1]
19 2 kworker/1:0 [kworker/1:0]
20 2 kworker/1:0H [kworker/1:0H]
21 2 cpuhp/2 [cpuhp/2]
22 2 migration/2 [migration/2]
23 2 ksoftirqd/2 [ksoftirqd/2]
24 2 kworker/2:0 [kworker/2:0]
25 2 kworker/2:0H [kworker/2:0H]
26 2 cpuhp/3 [cpuhp/3]
27 2 migration/3 [migration/3]
28 2 ksoftirqd/3 [ksoftirqd/3]
29 2 kworker/3:0 [kworker/3:0]
30 2 kworker/3:0H [kworker/3:0H]
31 2 netns [netns]
32 2 kauditd [kauditd]
33 2 kworker/1:1 [kworker/1:1]
34 2 kworker/2:1 [kworker/2:1]
35 2 khungtaskd [khungtaskd]
36 2 oom_reaper [oom_reaper]
37 2 writeback [writeback]
38 2 kcompactd0 [kcompactd0]
39 2 khugepaged [khugepaged]
44 2 kworker/3:1 [kworker/3:1]
57 2 cryptd [cryptd]
85 2 kblockd [kblockd]
86 2 blkcg_punt_bio [blkcg_punt_bio]
87 2 edac-poller [edac-poller]
88 2 devfreq_wq [devfreq_wq]
89 2 watchdogd [watchdogd]
90 2 kworker/2:1H [kworker/2:1H]
103 2 kswapd0 [kswapd0]
104 2 kworker/0:1 [kworker/0:1]
105 2 kworker/u9:0 [kworker/u9:0]
106 2 erofs_worker/0 [erofs_worker/0]
107 2 erofs_worker/1 [erofs_worker/1]
108 2 erofs_worker/2 [erofs_worker/2]
109 2 erofs_worker/3 [erofs_worker/3]
111 2 acpi_thermal_pm [acpi_thermal_pm]
112 2 dmabuf-deferred [dmabuf-deferred]
113 2 uas [uas]
114 2 dm_bufio_cache [dm_bufio_cache]
115 2 ipv6_addrconf [ipv6_addrconf]
116 2 krfcommd [krfcommd]
130 2 kworker/3:2 [kworker/3:2]
133 2 cfg80211 [cfg80211]
134 2 kworker/3:1H [kworker/3:1H]
135 2 sugov:0 [sugov:0]
136 2 sugov:1 [sugov:1]
137 2 sugov:2 [sugov:2]
138 2 sugov:3 [sugov:3]
143 2 kworker/1:1H [kworker/1:1H]
144 2 md [md]
145 2 kworker/1:2 [kworker/1:2]
146 2 kworker/1:3 [kworker/1:3]
147 2 kworker/2:2 [kworker/2:2]
148 2 tpm_dev_wq [tpm_dev_wq]
149 2 tpm-vtpm [tpm-vtpm]
150 2 usbip_event [usbip_event]
151 2 kworker/0:1H [kworker/0:1H]
152 2 khvcd [khvcd]
153 2 hwrng [hwrng]
156 2 jbd2/vdd1-8 [jbd2/vdd1-8]
157 2 ext4-rsv-conver [ext4-rsv-conver]
158 2 kdmflush [kdmflush]
159 2 kdmflush [kdmflush]
160 2 kdmflush [kdmflush]
161 2 kdmflush [kdmflush]
162 2 kdmflush [kdmflush]
163 2 kverityd [kverityd]
164 2 kworker/3:2H [kworker/3:2H]
165 2 ext4-rsv-conver [ext4-rsv-conver]
166 2 kworker/3:3H [kworker/3:3H]
167 2 ext4-rsv-conver [ext4-rsv-conver]
168 2 ext4-rsv-conver [ext4-rsv-conver]
169 2 ext4-rsv-conver [ext4-rsv-conver]
170 2 kworker/3:4H [kworker/3:4H]
172 2 kworker/3:5H [kworker/3:5H]
173 2 kworker/3:6H [kworker/3:6H]
174 2 kworker/3:7H [kworker/3:7H]
175 2 kworker/3:8H [kworker/3:8H]
177 1 init -
179 1 ueventd /system/bin/ueventd
188 2 loop0 [loop0]
189 2 loop1 [loop1]
190 2 ext4-rsv-conver [ext4-rsv-conver]
191 2 ext4-rsv-conver [ext4-rsv-conver]
192 2 loop2 [loop2]
193 2 ext4-rsv-conver [ext4-rsv-conver]
194 2 loop3 [loop3]
195 2 ext4-rsv-conver [ext4-rsv-conver]
199 1 logd /system/bin/logd
200 1 lmkd /system/bin/lmkd
201 1 servicemanager -
202 1 hwservicemanage -
203 1 qemu-props -
204 2 psimon [psimon]
209 2 kworker/0:2 [kworker/0:2]
210 1 Binder:210_2 -
216 1 suspend@1.0-ser -
217 1 Binder:217_2 -
218 1 atrace@1.0-serv -
219 1 keymaster@4.1-s -
230 2 kdmflush [kdmflush]
231 2 blk_crypto_wq [blk_crypto_wq]
234 2 kworker/u9:1 [kworker/u9:1]
235 2 kworker/u9:2 [kworker/u9:2]
236 2 kworker/u9:3 [kworker/u9:3]
240 2 kworker/u9:4 [kworker/u9:4]
241 2 jbd2/dm-5-8 [jbd2/dm-5-8]
242 2 ext4-rsv-conver [ext4-rsv-conver]
251 1 tombstoned -
259 2 loop4 [loop4]
260 2 loop5 [loop5]
261 2 ext4-rsv-conver [ext4-rsv-conver]
262 2 loop6 [loop6]
263 2 ext4-rsv-conver [ext4-rsv-conver]
264 2 loop7 [loop7]
265 2 ext4-rsv-conver [ext4-rsv-conver]
266 2 ext4-rsv-conver [ext4-rsv-conver]
267 2 loop8 [loop8]
268 2 loop9 [loop9]
269 2 ext4-rsv-conver [ext4-rsv-conver]
270 2 ext4-rsv-conver [ext4-rsv-conver]
271 2 loop10 [loop10]
272 2 loop11 [loop11]
273 2 ext4-rsv-conver [ext4-rsv-conver]
274 2 ext4-rsv-conver [ext4-rsv-conver]
275 2 loop12 [loop12]
276 2 ext4-rsv-conver [ext4-rsv-conver]
277 2 loop13 [loop13]
278 2 ext4-rsv-conver [ext4-rsv-conver]
279 2 loop14 [loop14]
280 2 ext4-rsv-conver [ext4-rsv-conver]
281 2 loop15 [loop15]
282 2 ext4-rsv-conver [ext4-rsv-conver]
283 2 loop16 [loop16]
284 2 ext4-rsv-conver [ext4-rsv-conver]
285 2 loop17 [loop17]
286 2 ext4-rsv-conver [ext4-rsv-conver]
287 2 loop18 [loop18]
288 2 ext4-rsv-conver [ext4-rsv-conver]
289 2 loop19 [loop19]
290 2 ext4-rsv-conver [ext4-rsv-conver]
291 2 loop20 [loop20]
292 2 ext4-rsv-conver [ext4-rsv-conver]
293 2 loop21 [loop21]
294 2 ext4-rsv-conver [ext4-rsv-conver]
295 2 loop22 [loop22]
296 2 ext4-rsv-conver [ext4-rsv-conver]
297 2 loop23 [loop23]
298 2 ext4-rsv-conver [ext4-rsv-conver]
299 2 loop24 [loop24]
300 2 ext4-rsv-conver [ext4-rsv-conver]
301 2 loop25 [loop25]
302 2 ext4-rsv-conver [ext4-rsv-conver]
303 2 loop26 [loop26]
304 2 ext4-rsv-conver [ext4-rsv-conver]
305 2 loop27 [loop27]
306 2 ext4-rsv-conver [ext4-rsv-conver]
307 2 loop28 [loop28]
308 2 ext4-rsv-conver [ext4-rsv-conver]
326 1 magiskd -
343 1 dhcpclient -
350 1 Binder:350_2 -
351 1 Binder:351_4 /system/bin/netd
352 1 main -
356 1 allocator@1.0-s -
357 1 audio.service /vendor/bin/hw/android.hardware.audio.service
358 1 authsecret@1.0- -
359 1 bluetooth@1.1-s -
360 1 provider@2.4-se -
361 1 provider@2.7-se -
362 1 cas@1.2-service -
363 1 contexthub@1.1- -
364 1 drm@1.0-service -
365 1 drm@1.4-service -
366 1 drm@1.4-service -
367 1 gatekeeper@1.0- -
368 1 allocator@3.0-s -
369 1 composer@2.3-se -
370 1 health@2.1-serv -
371 1 c2@1.0-service- -
372 1 neuralnetworks@ -
373 1 neuralnetworks@ -
374 1 neuralnetworks@ -
375 1 neuralnetworks@ -
376 1 neuralnetworks@ -
377 1 stats@1.0-servi -
378 1 sensors@2.1-ser -
381 1 thermal@2.0-ser -
382 1 usb@1.0-service -
385 351 iptables-restor /system/bin/iptables-restore --noflush -w -v
386 351 ip6tables-resto /system/bin/ip6tables-restore --noflush -w -v
390 1 wifi@1.0-servic -
391 1 android.hardwar -
393 1 android.hardwar -
394 1 android.hardwar -
395 1 android.hardwar -
396 1 android.hardwar -
398 1 audioserver -
399 1 credstore -
406 1 Binder:406_2 -
411 1 surfaceflinger -
452 1 adbd /apex/com.android.adbd/bin/adbd --root_seclabel=u:r:su:s0
462 1 drmserver -
466 1 traced_probes -
467 1 traced -
469 1 bt_vhci_forward -
472 1 cameraserver /system/bin/cameraserver
475 1 Binder:475_2 -
476 1 Binder:476_2 -
477 1 mediaextractor -
479 1 mediametrics -
487 1 mediaserver -
488 1 storaged -
493 1 wificond -
498 1 libgoldfish-ril -
499 1 mediaswcodec -
501 1 mdnsd /system/bin/mdnsd
503 1 gatekeeperd -
507 1 face@1.0-servic -
508 1 fingerprint@2.1 -
555 352 system_server system_server
641 1 classifier@1.0- -
709 1 wpa_supplicant -
711 352 droid.bluetooth -
712 352 ndroid.systemui -
773 1 gnss@2.0-servic -
804 352 webview_zygote -
814 352 rkstack.process com.android.networkstack.process
862 352 com.android.se -
889 352 m.android.phone -
912 352 id.ext.services -
1049 352 s.nexuslauncher -
1100 352 .gms.persistent -
1270 2 kworker/u8:2 [kworker/u8:2]
1368 352 gle.android.gms com.google.android.gms
1388 352 rs.media.module com.google.android.providers.media.module
1407 352 ocess.gservices -
1409 352 hbox:interactor -
1429 352 s.messaging:rcs -
1455 352 or.multidisplay -
1600 352 earchbox:search -
1802 352 .apps.messaging -
2383 352 putmethod.latin -
3554 352 ogle.android.gm -
3934 352 oid.setupwizard -
4309 352 .android.dialer -
4588 352 .android.chrome com.android.chrome
4645 352 d.chrome_zygote -
4669 352 ileged_process0 com.android.chrome:privileged_process0
4811 2 kworker/u8:3 [kworker/u8:3]
5044 2 kworker/0:3 [kworker/0:3]
5045 2 kworker/3:9H [kworker/3:9H]
5072 2 kworker/3:10H [kworker/3:10H]
5086 352 tatementservice com.android.statementservice
5087 352 viders.calendar com.android.providers.calendar
5129 352 droid.apps.maps com.google.android.apps.maps
5167 352 oid.apps.photos com.google.android.apps.photos
5212 352 .apps.wellbeing com.google.android.apps.wellbeing
5244 352 s.youtube.music com.google.android.apps.youtube.music
5312 352 ndroid.calendar com.google.android.calendar
5427 352 droid.deskclock com.google.android.deskclock
5458 352 gle.android.tts com.google.android.tts
5500 352 android.youtube com.google.android.youtube
5610 4645 ocessService0:1 com.android.chrome:sandboxed_process0:org.chromium.content.app.SandboxedProce
5655 352 ndroid.settings com.android.settings
5684 352 gs.intelligence com.google.android.settings.intelligence
5709 352 ssioncontroller com.google.android.permissioncontroller
5767 352 d.process.acore android.process.acore
5790 452 sh -/system/bin/sh
5792 5790 su su
5795 328 sh /system/bin/sh
5797 5795 avml /data/local/tmp/avml /data/local/tmp/avml_dump.lime
5811 352 opjohnwu.magisk -
5830 5827 su -
5834 4857 libbusybox.so /data/app/~~GwPaygLd0WVVplNtSDzeMQ==/com.topjohnwu.magisk-PPj1dVGKSBQo1QTAOaJqdQ==/lib/x86_64/libbusybox.so sh
5840 5834 main com.topjohnwu.magisk:root
Great stuff, did this manage to fix your issue?
Much better!
I am analyzing my memory dump created with AVML. Click here for the fix, on how to create a memory dump on android.
I do
python3 vol.py -f ../avml/avml_dump.lime linux.pslist
When I made this dump, I had an application running called
Notepad
. I don't see it? Is it because of the COMM names, they are cut-off, not all the letters are shown, what could be the issue?