Tiny app to enforce security policies of your device

Overview

Sentry

Enforce security policies.

Get it on Google Play

Tiny app to enforce security policies of your device.

It can:

  • limit the maximum number of failed password attempts
  • disable USB data connections (Android 12, USB HAL 1.3, Device Owner)

Also you can grant it device and app notifications permission to turn off USB data connections automatically on screen off.

Permissions

  • DEVICE_ADMIN - limit the maximum number of failed password attempts
  • DEVICE_OWNER - disable USB data connections
  • NOTIFICATION_LISTENER - receive lock events (optional)

Example

To set as device owner:

$ adb shell dpm set-device-owner me.lucky.sentry/.DeviceAdminReceiver

License

GNU GPLv3 Image

This application is Free Software: You can use, study share and improve it at your will. Specifically you can redistribute and/or modify it under the terms of the GNU General Public License v3 as published by the Free Software Foundation.

Comments
  • java.lang.IllegalArgumentException when try to set-device-owner

    java.lang.IllegalArgumentException when try to set-device-owner

    Why this can occur?

    /$ adb root restarting adbd as root /$ adb shell X00TD:/ # dpm set-device-owner me.lucky.sentry/.DeviceAdminReceiver

    Exception occurred while executing 'set-device-owner':
    java.lang.IllegalArgumentException: Unknown admin: ComponentInfo{me.lucky.sentry/me.lucky.sentry.DeviceAdminReceiver}
            at com.android.server.devicepolicy.DevicePolicyManagerService.findAdmin(DevicePolicyManagerService.java:2950)
            at com.android.server.devicepolicy.DevicePolicyManagerService.setActiveAdmin(DevicePolicyManagerService.java:3461)
            at com.android.server.devicepolicy.DevicePolicyManagerServiceShellCommand.runSetDeviceOwner(DevicePolicyManagerServiceShellCommand.java:256)
            at com.android.server.devicepolicy.DevicePolicyManagerServiceShellCommand.onCommand(DevicePolicyManagerServiceShellCommand.java:89)
            at com.android.modules.utils.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:97)
            at android.os.ShellCommand.exec(ShellCommand.java:38)
            at com.android.server.devicepolicy.DevicePolicyManagerService.onShellCommand(DevicePolicyManagerService.java:9845)
            at android.os.Binder.shellCommand(Binder.java:950)
            at android.os.Binder.onTransact(Binder.java:834)
            at android.app.admin.IDevicePolicyManager$Stub.onTransact(IDevicePolicyManager.java:6984)
            at android.os.Binder.execTransactInternal(Binder.java:1184)
            at android.os.Binder.execTransact(Binder.java:1143)
    
    

    Phone properties: [ro.product.system.brand]: [asus] [ro.product.system.device]: [X00TD] [ro.product.system.manufacturer]: [asus] [ro.product.system.model]: [Zenfone Max Pro M1] [ro.product.system.name]: [lineage_X00TD] [ro.system.build.fingerprint]: [asus/WW_X00TD/ASUS_X00T_2:8.1.0/OPM1/15.2016.1805.318-20180712:user/release-keys] [ro.system.build.id]: [SQ3A.220705.004] [ro.system.build.type]: [userdebug] [ro.system.build.version.release_or_codename]: [12] [ro.system.build.version.sdk]: [32] [ro.system.product.cpu.abilist64]: [arm64-v8a]

    opened by combrs 7
  • Force airplane mode ?

    Force airplane mode ?

    Is it possible to force the airplane mode all the time with android 12/13?

    the idea is to let the base band and the gps be disabled all the time.

    Nb: even if it means to put the application in root

    ps I tried to find a solution to remove the baseband from android but it creates errors, I'm looking for an idea without breaking everything how to force the baseband and gps to be always off.

    opened by xyz-nobody 3
  • Prevent reboot, shutdown, wifi settings etc

    Prevent reboot, shutdown, wifi settings etc

    Could you prevent this action ?

    • Shutdown
    • Reboot
    • Change the wifi settings
    • Switching to airplane mode

    Only if we are connected ?

    N.b under grapheneos the usb is already protected so we can't touch the security policy with Sentry So I don't know if with Sentry and grapheneos if we can touch the security policy

    opened by xyz-nobody 2
  • erase all data?

    erase all data?

    When i activate this app, my phone shows me a warning to be erased if there are to many wrong password. I do not understand that. I don't want another person to be able to erase my entire phone, just by typing the wrong passwords. I thought this is to protect against attacks over USB? I use Wasted in parallel to manually and / or remotely wipe all my data. I am confused. Thanks for the help (:

    opened by citizenserious 2
  • Log the exact time of failed password attempts

    Log the exact time of failed password attempts

    As an extension to #25 the notification could also show the approximate time of the failed login attempt and link to a logfile that lists all attempts.

    opened by Markus40 1
  • delayed monitor password notification

    delayed monitor password notification

    I would like to be able to set the number of failed password attempts to avoid receiving a notification when I have entered the wrong password and entered it correctly immediately afterwards.

    It would be even better if there was also a timer, i.e. if I don't enter the correct password 10 seconds after the last incorrect attempt (or after the first attempt, which could be selected in the settings), I am already informed after a single incorrect attempt.

    opened by Markus40 2
  • Separate button for selecting and deselecting the reset.

    Separate button for selecting and deselecting the reset.

    It is possible to prevent the app from resetting the phone if the maximum number of attempts is set to 0, but this is not described anywhere and not intuitive. It also prevents you from wiping the phone on one wrong attempt.

    I think it would be better to have a separate button that selects the reset.

    opened by Markus40 5
  • New protection based on detection of a sequence of potentially malicious actions

    New protection based on detection of a sequence of potentially malicious actions

    Suppose we want to set up the device as follows:

    1. After a single failed pin entry attempt (or giving up typing it after displaying it) Sentry will start the "delayed wipe" mode (24h countdown) that will wait for a valid pin before initiating a wipe (as explained in another post)

    2. If, however, during the 24h countdown of waiting for a valid code someone tries to connect the usb connector (excluding electric charging only) then a wipe will start because someone has deliberately figured out that there is a blockage and wants to get around it by usb hacking.

    Is this feasible? Has my idea any functional problems?

    opened by serrq 9
  • delayed wipe

    delayed wipe

    I think this app is great. However, I need a variation on the theme: it may be that a child or a co-worker momentarily has access to my smartphone and perhaps through a prank or recklessness they may miss all 4 attempts by operating the wipe.

    I therefore request that after X wrong attempts the device be locked for 24h with the inability to accept pin/password during the said period.

    If after 24h the new attempts are all failed then total wipe. This solution makes me feel more comfortable.

    opened by serrq 3
Releases(v1.1.2)
Owner
lucky
Meow-Meow
lucky
Find Security Bugs is the SpotBugs plugin for security audits of Java web applications

The SpotBugs plugin for security audits of Java web applications and Android applications. (Also work with Kotlin, Groovy and Scala projects)

OWASP Find Security Bugs 2k Jan 6, 2023
Secure your REST APIs with Spring Security, Resource and Authorization Server from zero to JWT

Secure REST APIs with Spring ./mvnw RTFM YouTube: Spring Security Patterns YouTube: Spring Security 5.5 From Taxi to Takeoff Official Apache Maven doc

Maksim Kostromin 1 Dec 5, 2021
A collection of android security related resources

android-security-awesome A collection of android security related resources. Tools Academic/Research/Publications/Books Exploits/Vulnerabilities/Bugs

Ashish Bhatia 6.6k Jan 5, 2023
Simple API to perform AES encryption on Android. This is the Android counterpart to the AESCrypt library Ruby and Obj-C (with the same weak security defaults :( ) created by Gurpartap Singh. https://github.com/Gurpartap/aescrypt

AESCrypt-Android Simple API to perform AES encryption on Android with no dependancies. This is the Android counterpart to the AESCrypt library Ruby an

Scott Alexander-Bown 636 Dec 18, 2022
Mobile Security Framework (MobSF)

Mobile Security Framework (MobSF) is an automated, all-in-one mobile application (Android/iOS/Windows) pen-testing, malware analysis and security assessment framework capable of performing static and dynamic analysis.

Mobile Security Framework 13.2k Jan 4, 2023
Unlock an Android phone (or device) by bruteforcing the lockscreen PIN.

Unlock an Android phone (or device) by bruteforcing the lockscreen PIN. Turn your Kali Nethunter phone into a bruteforce PIN cracker for Android devices! (no root, no adb)

Andrew Horton 2.7k Jan 1, 2023
This app will show grid overlay over whole system which helps you to verify your excellent app design.

GridWichterle for Android This app will show grid overlay over whole system which helps you to verify your excellent app design. Download: What is the

Inmite s.r.o. 408 Dec 29, 2022
If you have trouble pinning your custom icon to Launcher dynamically, try this library

CustomIconHelperX If you have trouble pinning your custom icon to Launcher dynam

Valentine Liao 1 Jan 4, 2022
a version of the official Android openssl setup to build standalone for use in app

OpenSSL on the Android platform. --- The code in this directory is based on $OPENSSL_VERSION in the file openssl.version. See patches/README for more

Guardian Project 371 Dec 8, 2022
A simple library that can help you detect if you app is modded or tampered with

Android Tamper Detector A simple library that can help you detect if you app is modded or tampered with. This adds a security level that makes it diff

Mukesh Solanki 130 Nov 14, 2022
Analyze any Android/Java based app or game

ClassyShark Introduction ClassyShark is a standalone binary inspection tool for Android developers. It can reliably browse any Android executable and

Google 7.2k Jan 3, 2023
A android app for encrypting apk

A android app for encrypting apk

FlyingYu 124 Jan 5, 2023
A simple android app that parses its own signature and displays it

SigDisplayer Usage Download the release APK or clone the repository and compile yourself. Sign the APK with your preferred keystore. Install and open

Jonah 5 Oct 18, 2022
Android app to test various cryptography algorithm.

CryptographyLesson Introduction This android app shows how cryptographic algorithm works. You can encrypt or decrypt messages and try different algori

null 3 Mar 21, 2022
This app should provide a common interface to fetch the estimated time of arrival for parcels

ETA-App This app should provide a common interface to fetch the estimated time of arrival for parcels. It will integrate with several backend systems

bring 0 Dec 14, 2021
Keepass2Android is a password manager app.

Keepass2Android What is Keepass2Android? Keepass2Android is a password manager app. It allows to store and retrieve passwords and other sensitive info

null 3.5k Jan 7, 2023
Writeup and exploit for installed app to system privilege escalation on Android 12 Beta through CVE-2021-0928, a `writeToParcel`/`createFromParcel` serialization mismatch in `OutputConfiguration`

Writeup and exploit for installed app to system privilege escalation on Android 12 Beta through CVE-2021-0928, a `writeToParcel`/`createFromParcel` serialization mismatch in `OutputConfiguration`

null 52 Dec 30, 2022
📱 Android client app for the AryKey 🔑

Android application that prepares an hardware device via USB serial port with a specific password generated deterministically based on three (3) inputs: the App we want to Unlock, the User ID used for login (typically an email address) and the PIN (6 numeric digits) we want to associate with previous inputs.

Ryan Amaral 2 Mar 11, 2022
Appshark is a static taint analysis platform to scan vulnerabilities in an Android app.

Document Index 1.overview 2.startup 3.how to write rules 4.how to find compliance problems use appshark 5.a path traversal game 6.argument 7.engine co

Bytedance Inc. 998 Jan 7, 2023