CollegeDev / DonkeyGuard

The ultimate Security Manager
31 stars 6 forks source link

Null and system kernel asking for permission repeatedly #42

Open ghost opened 9 years ago

ghost commented 9 years ago

Hello,

See attached screenshots. I have enabled that ALL apps must ask for permission, but internal Android stuff and system components as RILD (deamon handling the phones radio hardware) or the kernel itself also prompts me.

When enabling or disabling wifi I get VERY large prompts. I don't feel they should show up :-)

Kind Regards TwinAdk

ghost commented 9 years ago

http://i.imgur.com/I5TSoZv.png http://i.imgur.com/HK2uGhL.png http://i.imgur.com/4up40h1.png

ghost commented 9 years ago

And another one http://i.imgur.com/PNvIkzC.png

Can you see if it's a different thing asking each time? With the RILD it's the same thing asking again and again.

Also (see below) lots of apps ask for 'Internet', but I allowed them earlier.. http://i.imgur.com/xjepgCo.png

Two bugs, system stuff and repetitive asking for permission..

ghost commented 9 years ago

http://i.imgur.com/u1kpYDP.png

ghost commented 9 years ago

I get this whenever I want to play embedded video in webpages (chrome) http://i.imgur.com/RHwJyk3.png

CollegeDev commented 9 years ago

First of all: thanks for your very helpful review!

Can you see if it's a different thing asking each time? With the RILD it's the same thing asking again and again.

I was able to reproduce this behavior and implemented a fix for it (the repetitive asking for permission). I will upload a new test version here on Github soon. Please feel free to test it as well as the feature "intercept new installed apps".

I get this whenever I want to play embedded video in webpages (chrome)

Since DG operates natively, it is also able to intercept code from executing binaries. This behavior was not defined in the architecture before therefore you currently getting the notifications. My first temporary solution will be to hide the interception option for all binaries except the mediaserver and other neccessary ones you can block. Then I will looking forward to adapt the architecture and manager application that you can also manage native parts.

Btw: The media server is responsible for indexing the images, videos and music files on the device and downloading them. So if you like to watch videos from facebook or something like that, it is recommended to give the mediaserver internet access.

ghost commented 9 years ago

Hello,

I have worked with software and beta testing myself, so I am familiar (more than I like to) with the frustration of poor reports :-)

RILD is allowed Internet, no problem, I just assumed that it was an undesired behavior to prompt for that app (mechanism would I say) - but given your fine explanation, it makes perfect sense.

I will look forward to test the new build, repetitive prompts in all variations should be gone by then, right?

The random asking for Internet, and excessively long prompts, is that addressed too? Sorry if I'm mixing together tickets here :-D

Thank you for your dedication. Twin

CollegeDev commented 9 years ago

I will look forward to test the new build, repetitive prompts in all variations should be gone by then, right?

Yes.

The random asking for Internet, and excessively long prompts, is that addressed too? Sorry if I'm mixing together tickets here :-D

This should also include random asking for Internet, but not the 'long prompts'. I'll do it step by step. If the test version works for you, I will fix the 'long prompts' problem.

Please install this (apk is wrapped in a zip-file) release and report if it works for you.

ghost commented 9 years ago

I will install and test this through the day tomorrow :+1: Should i expect one last prompt, or that it takes effect immediately?

ghost commented 9 years ago

Hello,

I installed the app moments after my reply ()yes, I could not resist), and since then I have seen 3 prompts from RILD for Internet, and a single one from media server (embedded video in Chrome)

https://www.dropbox.com/sh/2f8taqckyvnndy4/AAByvrTyomQTvu_6GJFDgyTya?dl=0 (report when seen, I'll remove it again)

CollegeDev commented 9 years ago

Hi,

The fix takes affect to normal applications only, not the binaries. Furthermore: please note that you need to restart your device to take affect.

ghost commented 9 years ago

Just added 3 more screenshots to the folder. The RILD prompt usually shows right after one of the long prompts. See time between the two screenshots.

ghost commented 9 years ago

Just rebooted device, doh!

Normal apps and not binaries? So RILD is not covered? How do you define binaries and normal apps? Is apps installed as system app a binary?

CollegeDev commented 9 years ago

I've made some major improvements for process resolving and this should fix all your reported issues. Please feel free to test it, but please note that I haven't test it until now. Download (reboot your device first!)

How do you define binaries and normal apps?

Until now there was no definition for this behavior. Now I mapped the calling UID from native code to the related process which should fix it.

ghost commented 9 years ago

Hello,

I am confident in testing something untested :-) I dont understand the "Now I mapped the calling UID from native code to the related process which should fix it.". I was asking about the definition to know if RILD and mediaserver was binaries or apps :-)

CollegeDev commented 9 years ago

I dont understand the "Now I mapped the calling UID from native code to the related process which should fix it.". I was asking about the definition to know if RILD and mediaserver was binaries or apps :-)

Okay, I'm sorry. I read it too fast. The "definition" I mentioned before wasn't intended. Well, but here a little explanation: On linux you can use the virtual filesystem "/proc" to retrieve a lot of informations about the current process by using the kernel interface. If you now check /proc/$PID/cmdline or to simplify /proc/self/cmdline, you will get the commandline arguments with which the process has been startet. This information can help you to identify the current running process.

Btw: why do I can't find the issue with the long title anymore? ("donkeyguard not working on 4.4 kitkat (sony z2 tablet).....").

ghost commented 9 years ago

I cannot find it either. Issue 32 comes closest, but it's not that.

I still don't know if RILD is a binary or app :-) Let's leave it there.

After your latest beta version, I have had no prompts (or very very few and no repetitive ones)!!

ghost commented 9 years ago

He deleted the issue. It was 41, it gives a 404 error when clicking it's link from the history tap in the github app...

CollegeDev commented 9 years ago

I still don't know if RILD is a binary or app :-) Let's leave it there.

What you can see from the dialogs: it is a binary, located at /system/bin/rild

After your latest beta version, I have had no prompts (or very very few and no repetitive ones)!!

Does that mean you didn't get prompts for binaries or in general no prompts? Normally you should not get any prompts related a binary itself anymore (process name begins with system/bin/**).

He deleted the issue. It was 41, it gives a 404 error when clicking it's link from the history tap in the github app...

curious...

ghost commented 9 years ago

I get some prompts still, but I feel they are OK. And I definitely don't get super long prompts anymore, or dupe prompts from RILD or media server 👌:-)

CollegeDev commented 9 years ago

I get some prompts still, but I feel they are OK.

Well, I can't figure out what you mean...

And I definitely don't get super long prompts anymore, or dupe prompts from RILD or media server :ok_hand::-)

That sounds good at all. So it should be ready for an official fix.

ghost commented 9 years ago

I mean I get prompts I sometime wonders why I get, but I don't have a feeling that they are wrong :-) +1 for official fix

CollegeDev commented 9 years ago

Mhh, can you example such a case? New version should be on google play within a hour.

ghost commented 9 years ago

Pop, IM BACK! Or at least im here right now.. I have been super hung up (and in fact will be in the begninning of december too!).

I will document any strange behaviour, but after the update where repeditive prompts and "deep android" requests was removed, things are much better!