r/androiddev • • Sep 18 '21

App disables itself when Developer Option is enabled. Any security benefits of doing so?

Post image
266 Upvotes

184 comments sorted by

29

u/Littlefinger6226 Sep 18 '21

Leave them one-star reviews and urge your developer friends to do that.

7

u/karljamoralin Sep 18 '21

I, among other users, did that -- they're asking each and every one to email them about it haha

5

u/gnashed_potatoes Sep 18 '21

that's probably someone who gets paid $10 to make it look like people read their reviews

9

u/nataniel_rg Sep 18 '21

We are the developer friends get on it

2

u/karljamoralin Sep 23 '21

Update: Citi PH just reverted this 'feature'. Yay!

262

u/bleeding182 Sep 18 '21

I imagine this is from the same kind of people that pat each other's back coming up with password rules that deem a randomly generated alphanumeric password insecure but will gladly accept password! because it contains a special character

12

u/Izacus Developer Sep 18 '21

I think Citi even has a limit of special characters and restriction for 8-12 characters in the password on one of the backends I've seen ^

4

u/sysadmin420 Sep 18 '21

Not sure if it's the same now but years ago the Wells Fargo website password was case insensitive.

1

u/ParthProLegend Jun 10 '24

Wow 😂😂

29

u/cornish_warrior Sep 18 '21

Exactly a security person read about ADB in something like this and has no clue about what using it entails or read a report on it from 9 years ago

8

u/FeedMeACat Sep 18 '21

I'm sorry your password has to contain a letter, a number, and be at least six characters long.

14

u/pavi2410 Fuchsia Dev Sep 18 '21

atleast6

12

u/el_bhm Sep 18 '21

AND GOD FORBID IT HAS MORE THAN 24 SIGNS!

WHAT

THE

FUCK

ARE YOU DOING USER?!?

STOP RIGHT NOW

7

u/luger718 Sep 18 '21

Can't be more than 12 though

Fucking Walmart allows 100 length

1

u/[deleted] Sep 18 '21

Yeah, limits on text fields is a basic thing that should be in a checklist.

2

u/ekolis Sep 18 '21

JamesTKirkDarthVaderHuckleberryFinnZaphodBeeblebroxAtticusFinchMegaman42!

What do you mean it's too long?!

2

u/[deleted] Sep 18 '21

That's nothing. My bank security requirements is that your password has to contain a letter, a number, must not contain any special characters, is case insensitive, and be exactly six characters long.

My password manager is very unhappy about that one.

4

u/j--__ Sep 18 '21

that's not a security requirement; it's an insecurity requirement.

3

u/[deleted] Sep 19 '21

You used to have to type it in by clicking randomly placed letters on a "virtual keyboard"

1

u/No-Bodybuilder4925 Jul 18 '22

someone change my password : spaceballs"

0

u/[deleted] Sep 18 '21

[deleted]

34

u/[deleted] Sep 18 '21

Or copy and paste.......or autofill.......the list goes on

15

u/lostinsomethin Sep 18 '21

Can't wait to see the day they enforce no wallpaper changing because of security reasons.

1

u/Deathbyillusion Oct 27 '24

I know right! Like if you have an app that you needed disable developer settings for security reasons then I would question it the opposite for the first place. You should just allow it and make sure that everything is safe and secure regardless if you have it enabled or not. I mean I actually use legit purposes for my developer settings and I have like the show Taps on the screen and stuff like that.

1

u/libton1980 May 11 '25

i just bookmarked the link of this comment of yours

and i now remember it because i am clearing my bookmarks

i never expected someone to comment on a 4 years old post

the date of my bookmark was when your comment was just hours old

and lastly i fully agree with you

-3

u/_HEATH3N_ Matt Sep 18 '21

You know any app can read the contents of your clipboard, right? (below Android 10 anyway, and still on Windows and other platforms...) You don't see why some fields might disable copying?

9

u/s73v3r Sep 18 '21

Disabling copy/paste means that you can’t easily use a password manager, which has been shown to have much more secure passwords than ones you have to remember.

-1

u/_HEATH3N_ Matt Sep 19 '21

Good password managers like 1pass and Lastpass don't use the paste event to achieve field population so...get a better password manager?

7

u/dontgetaddicted Sep 19 '21

But if I copy the password before realizing that the app or page doesn't allow pasting, this doesn't really do much good. I'm not exactly going to attempt a paste without a copy first ya know?

1

u/pee_wee__herman Nov 15 '24

I don't get it either. Any malicious tool that would get clipboard data would also be able to get keylogs. Plus in any case, as you point out, the password is already in the clipboard before user realizes they can't paste. It is a horrifically brain dead security measure.

115

u/libbaz Sep 18 '21

If anything, it raises questions about just what their app might be leaking that adb becomes such a risk.

48

u/[deleted] Sep 18 '21

Probably printing credentials to Logcat

9

u/Dinos_12345 Sep 18 '21

Wouldn't be surprised

69

u/ClaymoresInTheCloset Developer Sep 18 '21

They're not the only ones that do this. I actually dont get it.

128

u/MrStahlfelge Sep 18 '21

As someone working in the financial app industry, I can assure you these ideas aren't made up by the developers.

27

u/empiricalis Sep 18 '21

Yeah, I bet this was the idea of a manager that has no idea what the developer options even do, but proudly touts this “security feature” he spearheaded when it comes time for review and bonuses

24

u/yaaaaayPancakes Sep 18 '21

Not even a manager. More likely, some knob in "infosec" that reads blogs all day about "best practices" and doesn't think for themselves.

I used to work at a fintech. They made me put safetynet in, because "we need to block rooted devices". I had to say "so you don't want me using the app? We let everyone use the website on PC's, they're all technically rooted too". Ultimately, just had to put a warning screen up if safetynet was tripped but we didn't block you.

5

u/Chris2112 Sep 19 '21

Yess, exactly this. I used to work as a dev for a Fortune 100 financial company, man it was fucking painful. At one point they wanted us to use this jank ass out of date "security" SDK that would require us to show a popup permission asking the user to let our app manage phone calls (I think it was the READ_PHONE_STATE permission, don't 100% remember), because the SDK wanted to capture information like the device phone number and serial number and shit (and send it to the 3rd party company that created this SDK of course). So aside from being a horrible UX it was also probably against google's privacy policy, yet it still took way to long to convince my management that this was a horrible idea and that no, there's no way for us to change the message on the permission request dialog let alone suppress it entirely.

4

u/tadfisher Sep 19 '21

I know exactly which SDK you're talking about. We ended up ripping it out after Google straight-up removed the app and told us we were violating policies. I'm very glad they did.

(This was at my last company, also in fintech)

13

u/CodyEngel Sep 18 '21

Although the devs at Citi could, you know, say this isn’t necessary and is a waste of time.

13

u/[deleted] Sep 18 '21

Yeah, the devs say no, and some smartass in management still pushes it through.

I used to work for a company that maintained the website of a pretty big budget airline in Europe. The price quote page (that displayed the whole week) was incredibly slow to load, so we optimised it. Their management came back and demanded we undo it, because they WANTED it to be slow and annoying to the users, to avoid people going "price hunting". And I'm talking about like, 20-30s reduced to around 2-3 seconds.

A bit more explanation: instead of making complex SQL queries that would've resulted in the same output, the original design was single step queries parsed by the backend and followed up in further queries. E.g. you'd select a week from 10th to 16th, and it would manually request the flights separately for each day, then query those flights one by one for pricing.

7

u/CodyEngel Sep 18 '21

Sounds like a place I wouldn’t want to work.

7

u/[deleted] Sep 18 '21

Yep, it was quite bad. Luckily the software was our own white label product, so we just left it in their variant, and the core had the fixed, optimised queries.

17

u/wankthisway Sep 18 '21

Okay, and the managers won't give a shit. Dev pushback isn't always successful, especially when there's a lot of bureaucratic red tape

4

u/[deleted] Sep 18 '21

Yeah - I worked in a company, codebase was horrible. Kept pushing for improvements, management kept refusing. Despite the fact that it was hurting the company's bottom line, hurting customers, and hurting developers. Some managers are just fucking idiots.

4

u/Runner_Escaper Sep 18 '21

Lol you think they care? Your manager will say “I know, do it anyways.”

If you don’t, he’ll get someone else to do it.

-1

u/CodyEngel Sep 18 '21 edited Sep 18 '21

In this job market? Good luck with that.

2

u/s73v3r Sep 18 '21

Managers like that aren’t rational thinkers.

3

u/Runner_Escaper Sep 18 '21

You don’t understand.

In a large development team you have say 30 people. If even 20 people care about the app and customers, 10 will always be there for a paycheque. The manager will get one of the other 10 who don’t care and just do this for $$ to do it.

-4

u/CodyEngel Sep 18 '21

30 devs on one team? That sounds horrible. I’d probably find a new job.

14

u/[deleted] Sep 18 '21

And then the boss says, 2e will just replace you with someone who will do it? Then what?

5

u/CodyEngel Sep 18 '21

What would I do? I’d find a new job where my expertise is appreciated.

2

u/[deleted] Sep 19 '21

Or, like me, finally realize that those places are rare enough that I'm further ahead changing careers.

-7

u/Izacus Developer Sep 18 '21 edited Apr 27 '24

I love the smell of fresh bread.

4

u/phoenixuprising Sep 18 '21

It’s a dumb hill to die on as a developer. It was likely raised by an audit and there’s little reason to fight it when they could make your life way worse. No manager is going to waste their devs time on a feature like this unless raised by a third party.

2

u/[deleted] Sep 18 '21

Not always that easy. You can get rejected from a variety of jobs for any reason. And if you're short on savings, or have to depend on a worker visa, or have some job gaps in the recent past, you can't just quit cold turkey. You're forced to go along with what your boss says, and quietly find a job meanwhile.

1

u/[deleted] Sep 18 '21

Im not saying its a good idea I'm just saying sometimes that isn't an option.

0

u/[deleted] Sep 18 '21

[deleted]

1

u/CodyEngel Sep 18 '21

That sounds awfully dramatic.

-11

u/hemenex Sep 18 '21

Well, sometimes they are, in a sense "hey dev, tell us 3 security features we could implement, or we don't need you anymore".

6

u/congalala Sep 18 '21

Security consultants.

4

u/Auxx Sep 18 '21

If only you could see what's going on inside banking apps, lol.

2

u/[deleted] Sep 18 '21

Technically........we could just disassemble it.

0

u/ComfortablyBalanced You will pry XML Views from my cold dead hands Sep 18 '21

It's not that simple, most modern android apps with decent minded developers use a obfuscation method like proGuard or R8 (however R8 is more than that), so even if you disassemble it or in this case decompile it, it' very hard to comprehend detail of the app code.

4

u/[deleted] Sep 18 '21

Sure, it takes more effort, but you can.seee what it's doing

2

u/SA_FL Sep 27 '21

Which compared to something like Denuvo/VMProtect are a total joke and I wouldn't be surprised if most of it could be automatically unobfuscated by now.

10

u/bluecaller Sep 18 '21

Google Pay doesn't work on Lineage OS. I don't even have developer options enabled. https://imgur.com/a/3Oizncq

8

u/_neddard Sep 18 '21

It works for me right out of the box. Have been using lineage for nearly 7 months now. Maybe, you could try magisk.

8

u/[deleted] Sep 18 '21

Yeah, that's due to LineageOS and not developer options. Probably due to unlocked bootloader, verity etc.

6

u/SupremeLisper Sep 18 '21

Is the bootloader locked? Maybe, you are not using play services or microG. Try magiskhide to possibly mitigate the issue.

2

u/JayS36 Sep 18 '21

Use magiskhide dude, works for me

1

u/SA_FL Sep 27 '21

Most likely they are using a standard library or SDK that includes that feature. I have seen something similar several times though it only cares about usb debugging being enabled not developer options as a whole. While it can be worked around with tasker (hint: 'settings put global adb_enabled 0' and if necessary 'settings put global development_settings_enable 0' can do it if you have root/magisk/magiskhide/universal safetynet bypass) I am sure there will be better solution out sooner or later.

67

u/Izacus Developer Sep 18 '21 edited Apr 27 '24

I like learning new things.

18

u/knotty-by-nature Sep 18 '21

I'm a compliance and risk officer in fintech and this hurts right in the feels because of how accurate it is.

6

u/mazamorac Sep 19 '21

I used to be an IT subdirector in a financial group, in charge of the brokerage, treasury and mutual funds systems. The bank's IT department had an inordinate weight compared to ours, and kept trying to push idiotic security theater onto us.

They kept trying to do it via outside consultants pushing "best practices." I spent about a third of time educating young, green, consultants from the Big Four as to why what they were proposing was a bad idea. I succeeded most of the time, but not enough.

5

u/Izacus Developer Sep 18 '21

The PTSD never stops I'm afraid. :(

3

u/knotty-by-nature Sep 18 '21

Nope, does not.

In the meantime I am just entertaining offers on the chance I find a new position that doesn't require tools which only work on IE for...reasons. I miss startups after dealing with the corporate side of fintech.

3

u/ClaymoresInTheCloset Developer Sep 18 '21

tools which only work on IE for...reasons.

☠️☠️☠️☠️

2

u/tadfisher Sep 19 '21

Might check out the company in my flair, I was worried I wouldn't find a place like my last company that shut down (Simple), but this place is legit and is definitely not a cargo cult. We use Haskell for f's sake.

1

u/knotty-by-nature Sep 19 '21

Thanks for the tip, appreciated! Will look into it.

10

u/3dom test on Nokia + Samsung Sep 18 '21

do the opposite of what these incompetent clowns are doing.

Eh, the good ol' Dwight Schrute's "would an idiot do that?" rule.

https://www.officetally.com/the-office-quotes-dwight-in-business-school

3

u/qualiky Sep 18 '21

It is …. actually effective if you think about it hahaha

5

u/scyth3s Sep 18 '21

Whatever you do with security in your app, do the opposite of what these incompetent clowns are doing.

Got it, only let devices with developer mode enabled use the app!

3

u/M4570d0n Sep 18 '21

My bank (Community Bank of TX) did the same thing with their mobile banking app. Just tested it out myself. Won't let me access my account with Developer Options enabled but as soon as I turn Dev Options off the app works again.

1

u/Talador12 May 25 '23

So you are saying that sms 2 factor authentication was a bad idea? No one could ever spoof a phone number!

20

u/cornish_warrior Sep 18 '21

This would make sense if you were running Android 4 or earlier. If you had USB debugging on anyone could connect to your phone and have the access ADB has, which is the shell user account with far more access than an app gets. I am sure even then your phone had to be unlocked.

They clearly don't know about all the changes to add authorisation per device that connects over ADB, and the newer automatic revoking of that ADB authorisation.

3

u/[deleted] Sep 18 '21 edited Sep 18 '21

Even still, what's it saying on ADB?

9

u/VisualFanatic Sep 18 '21

They recommend to disable it, but will not let you open the app with the setting enabled.

29

u/3dom test on Nokia + Samsung Sep 18 '21

The security circus works to convince a Joe Average that it's safe to use the product. It's like TSA patting balls of millions people every year when Israeli air security service does just fine without that.

6

u/jack_michalak Sep 18 '21

Have you been through security in Israel? It was far more strict than the US when I was there. The US is like an inspection assembly line; in Israel I got a bespoke organic painstakingly hand-crafted inspection.

3

u/3dom test on Nokia + Samsung Sep 18 '21 edited Sep 18 '21

It's like the difference between consuming the $2 supermarket boxed wine and 20+ years old special blends: you feel used in case of the former and respected / satisfied in case of the latter, regardless of the taste and outcome.

But what could I know being a simple human who doesn't like random people patting my balls without even offering me a dinner first? Same for an average phone user who like to be reminded about security when it comes to their - usually negative - debit/credit bank balance: flash them a "security" feature, then charge them for non-existent service. Profit!

24

u/NatoBoram Sep 18 '21

r/AssholeDesign and nothing more. There's literally no security benefits to doing this. It's just about controlling you and what you do with your own hardware.

4

u/carefree12 Sep 18 '21

controlling you

i do not even think these people control them-self.

3

u/[deleted] Sep 18 '21

They are not controlling anyone, they think it can fight against...Hackers? It's pure ignorance from them and no one with conscience should use this app

0

u/SA_FL Sep 27 '21

Most likely a standard "security" library/sdk.

5

u/dadofbimbim Sep 18 '21

This Citi app is shit.

5

u/davidgro novice dev Sep 18 '21

Oh no! The user has enabled "Show touches" and "Stay awake" (while charging), we can't allow that!

Seriously, for some reason there is useful stuff even if I weren't a dev hidden in dev options. This is the app for my Costco Card, if it starts complaining you bet I'll be leaving bad reviews and e-mailing/calling/snail-mailing them.

0

u/[deleted] Sep 20 '21

[deleted]

2

u/davidgro novice dev Sep 20 '21

Bank apps (and of course websites) that I have seen already just have a timeout pop-up. I'm pretty sure this one specifically already does.

5

u/M4570d0n Sep 18 '21 edited Sep 18 '21

My banking app (regional bank here) stopped working this week and now says my access has been restricted on my device for my protection. I wonder if it's for the same reason.

Edit: Yep! Disabled Developer Options and now the app works again.

11

u/grishkaa Sep 18 '21

And then they allow you to do everything on the web, without being able to "verify device integrity" to "protect your data" and without even knowing for sure whether it's a real browser on the other end.

2

u/Avamander Sep 18 '21

Oh don't worry, that stupidity will come as well if they're given the chance.

2

u/[deleted] Sep 18 '21

First thing they'll do is block Linux users, because they're hAcKeRs . They don't care that ChromeOS is literally a Linux distribution.

4

u/Avamander Sep 18 '21

Widevine says hi.

2

u/cornish_warrior Sep 19 '21

Does your bank website not require any 2FA? Here in the UK at least every bank/credit card site I've used requires at least SMS code authentication, the banks use their apps in place of the physical 2FA device they used to provide. I cannot transfer money out without my phone. The mobile device is regarded as far more secure.

I can understand rooted devices not running bank apps, but ADB isn't anywhere near the risk of root.

2

u/grishkaa Sep 19 '21

In some banks you login with just the username and password, but you get a somewhat read-only access, you need a one-time code to confirm transactions. In others you have to provide a one-time code when you log in.

2

u/cornish_warrior Sep 19 '21

So the web isn't trusted, which makes sense. Mobile devices, general use of lockscreens, app sandboxing, secure enclaves is just safer than a desktop OS with a browser.

SMS 2FA isnt trusted much anymore either. But it's better than not having 2FA at all.

4

u/DivideFun9617 Sep 18 '21

Worked with citi for a bit, and i am not surprised seeing this absurd check. They have quite a bit of incompetent peeps

1

u/WestonP Sep 18 '21

Hmm, I have dev mode enabled and the Citi app, but don't get this notice... Maybe it's from a specific developer option?

3

u/karljamoralin Sep 18 '21

It's from the Citibank PH app (perhaps yours is for a different country)

3

u/wowawiwowa Sep 18 '21

I mean, I'll make more sense to be concerned of rooting instead of dev options enabled at that point

2

u/[deleted] Sep 18 '21

Security theater

3

u/towcar Sep 18 '21

Wow that is actually a little infuriating. Time to switch banks.

3

u/vertigo3pc Sep 18 '21

Not sure why, but I have a Citi account and have Developer Options enabled and my app doesn't show this.

5

u/Generic_Wanderer Sep 18 '21

My best bet would be for preventing screen-sharing apps. Most scammers use the same for duping relatively naive users.
Its more common that we'd like to acknowledge.

5

u/tadfisher Sep 19 '21

Window.FLAG_SECURE does that well enough without blocking your customers.

2

u/[deleted] Sep 18 '21

'Security' mandated by upper management, it looks like.

2

u/Runner_Escaper Sep 18 '21

I work at a bank, the Android teams themselves generally don’t want this, it’s the higher ups or the security teams which don’t care about user choice.

2

u/Kobeissi2 Sep 18 '21

God that's infuriating. Makes things more annoying for people who use those options while not really doing anything for security.

2

u/dandiemer Sep 18 '21

When you can't test the release build with adb install

2

u/Mable_Chan Jun 09 '22

Is there an actual work around for that kind of problem? I need developer mode for university and some apps don't allow it.

1

u/Leather_Adeptness485 Sep 02 '26

I may be late for this but you can use 'geto' (install from f-droid) with shizuku and a pc to grant some permissions to bypass this entire shit. You can ask the Google ai search for the whole step by step tutorial

2

u/No-Bowler2894 Dec 01 '23 edited Nov 02 '25

continue attempt doll quaint nine dinner command society exultant offbeat

This post was mass deleted and anonymized with Redact

3

u/nataniel_rg Sep 18 '21

Their app also weights 74mb for a simple banking app

7

u/muhwyndhp Sep 18 '21

App size has been the rule of thumb for me. The bigger the app size is vs the functionality it contains, the more likely a more severe security and usability issue the app has. Some that come to mind:

  • Unobfuscated and Untrimmed Code.

  • Too many 3rd Party Dependencies, which may or may not contains legacy and unsafe code.

  • Using Non-Vector Source for simple graphics lIke Logo and Pallete.

2

u/ShaggedShaggy Sep 18 '21

Is that a lot really? Btw not sure how simple is it, never used it

2

u/nataniel_rg Sep 18 '21

It's a lot for a simple app, most apps don't need a lot of storage

2

u/ShaggedShaggy Sep 18 '21

Yeah i mean most of my bank apps weight around 60mb

1

u/ClaymoresInTheCloset Developer Sep 18 '21

Hell yeah it's a lot. What the fuck else are they shipping in this app besides code and some logo PNGs?

5

u/zFadil995 Sep 18 '21

In case you’re actually wondering, half a dozen libs. Some deprecated, some huge, some targeting 7yo android versions. Oftentimes 5-10mb might just be the lib that’s scans ID card or similar.

Oh and also animated backgrounds for login screens. My bank does this and they also added audio so if you’re listening to music it pauses it to play SILENT audio. Fuck me.

1

u/hassan_theitguy Jun 14 '23

This is what chatgpt thinks

"Banks disable their apps if developer mode is enabled on a user's device due to security concerns, as developer mode provides advanced access and capabilities that can compromise the app's security and the user's financial information. Enabling developer mode on rooted or modified devices, potential app tampering, and the risk of data exposure or malware attacks are key reasons for disabling the app, ensuring the protection of sensitive data and mitigating security risks."

1

u/mochaslave Oct 31 '24

Why is an application on my phone able to see how I have my device configured? Any way to mask that?

1

u/fluentmoheshwar Mar 29 '25

They should have a option to ignore it.

1

u/robc025 Oct 21 '25

Get a new bank. None of my banking apps do this

1

u/[deleted] Sep 18 '21

Not really

1

u/vyashole Sep 18 '21

Banking apps are shit. Just use the website.

1

u/thefanum Sep 18 '21

Magisk hide can probably bypass this. Maybe

1

u/ProfWhite Sep 18 '21

Last time I tried Magisk Google had finally caught up and patched the security compliance bypass that allowed Magisk hide to work. Checked daily for a week and never saw any updates from Magisk that they were working on another work around. That was in January/early February IIRC. Haven't checked since then.

Tl;Dr: emphasis on the maybe I think.

1

u/SA_FL Sep 27 '21

The Universal Safetynet Bypass works for that.

1

u/cl4rkc4nt Sep 19 '21

Deprecated.

1

u/SA_FL Sep 27 '21

Unfortunately not but it can be worked around via tasker if you have Magisk (as you have to run commands as root).

1

u/edinn Sep 19 '21

My bank also did similar thing, if OEM unlocking is enabled (unlocked bootloader), NFC payments won't work.

1

u/rohithkumarsp Apr 03 '23

I have transaction scale set to 0.5 in developer settings in Samsung. How do I bypass this? 

-3

u/Equivalent_Style4790 Sep 18 '21

Yes, developer mode enables u to connect the phone to android studio and check the logs. The console will at leash show the endpoints of requests. Some warning or errors also provide insights on what the tech been used in the app. Wich open many doors

4

u/[deleted] Sep 18 '21

You do know people can just obtain the APK and disassemble the app? Or even use browser dev tools?

Assume your server endpoints have already been determined and can be called by anybody.

This check isn't doing shit to protect the users or the company. It's just needless bullshit.

-1

u/Equivalent_Style4790 Sep 18 '21

Protection doesnt work this way. If a protection system can eliminate 10% of the candidates to attack it, statistically it is less vulnerable. Everything is hackable in a way or another, only thing we can do is make it hard at least a bit.

4

u/[deleted] Sep 18 '21

Yeah, but detecting Developer Options and inconveniencing users doesn't do anything to stop that 10%. It doesn't even stop 0.0000001%.

You're not achieving anything with such tactic, except for driving away paying customers.

1

u/gold_rush_doom Sep 19 '21

Logcat can also be read by other apps.

-19

u/MacroJustMacro Sep 18 '21

Developer options is where you would enable device debugging. One of the anti-tampering mitigations in a secured app is to disable the ability to debug the app. There are many mitigations. And there are many ways to attack an app and reverse engineer it. This is a tiny piece of the possibilities.

4

u/karljamoralin Sep 18 '21

Do you mean enable app debugging? Production apps aren't normally debuggable unless you explicitly set debuggable to true in build.gradle.

1

u/MacroJustMacro Sep 18 '21

Going to hijack this comment for a minute :)

It appears most of the commenters here are simply android developers who never reversed an app even once. All of their replies show lack of knowledge.

I'll try and explain the idea.

Once you have a production apk, you can reverse it using apktool. That's easy. Then when you repack it, you can add a debuggable=true flag in androidmanifest. That way you have an apk that is debuggable. Next thing you need to do is sign the app using your key (most likely you do not have the original signing key). Then you can install it on a device and in essence, you are now ready to debug the app during run time using JDB (yes Jdb).

To mitigate such tampering actions, developers can do a lot of things. One of them is to detect an app is now debuggable (there are a few ways to do that in code). Once the app detects it is debuggable, it can terminate it self. This is what you are seeing in this picture.

One of the ways to detect that, is by reading specific values from the device, one of which is whether developer options is enabled or not. If it is not, a few other techniques might be used to detect the app is debuggable. If it is, this specific app takes that as an indication that someone is attempting to debug it, so it terminates.

This is why I am saying that once an app detects it is debuggable, it will terminate. This is only one way to prevent app tampering and detecting Developer options is enabled is one way to detect the app is debuggable.

All of the down votes I got here, just goes to show that most developers have no clue about securing their apps. Nonsense about using a server? What does that have to do with this topic? Nothing. That other dude that said the app is not debuggable in the first place? Clearly failed to comprehend what I am saying.

I can go on and on about reversing apps, its part of my job.

So to answer your question, no I did not mean making the app debuggable, I literally meant, enabling Developer options in the device is an indication that you may be trying to debug an app. And banking apps do not want that.

And to the rest of you down voters, its not about that. I really wish you would read just a tad about securing apps. Obfuscating is great but it is not enough. Most apps are easy to reverse. And that includes apps that use NDK. And once you reverse an app and able to debug it during run time, you can patch code, change code, skip code, reach activities you should not have access, bypass in app purchase, read the data in registers (in memory), read encrypted data, keys etc.

6

u/justjanne Developer – QuasselDroid Sep 18 '21

And where's the issue with reversing an app? I can reverse such bank apps fine anyway, all the checks can't stop me anyway.

And as developer, the apps I'm involved in don't use any obfuscation or such checks because honestly, why would I? The user of the app can access or modify whatever they want, a properly secure app will still be secure anyway. The server should never trust the client app anyway.

1

u/[deleted] Sep 18 '21

Of course the client can't be trusted, that's why stupid measures like this occurs

23

u/daberni_ Sep 18 '21

If you really want to reverse engineer that app you can run it on a simulated environment where this check for developer options would return that they are not active but at the same time you have root access to everything. As an app developer you have to assume you are running on an untrusted device and behave accordingly. It's a client, nothing more.

-7

u/MacroJustMacro Sep 18 '21

Other mitigations in place would certainly detect you are running on an emulator and would detect you are running as root as well. At that point, a secured app will stop working in the same way. This is really basic stuff. No client will ask the developers to: “umm please make sure our clients cannot enable Device Developer options and then connect using ADB”. The client doesn’t have a clue about such things. Not allowing developer options is basic anti-tampering technique. You would need to reverse the app and statically find where in the code this detection occurs, remove that code or patch it and only then, maybe, you will be able to run the app and debug it. Running an app on an emulator doesn’t really mean anything, even as root if the app is secured enough. There are a lot of mitigations.

11

u/daberni_ Sep 18 '21

No, each check which is performed by the app can be faked by the hosting environment. There is no 100% solution for this, so just assume the host is untrusted. All those solutions only make it a bit harder and raise the bar a bit, but never are able to fully prevent such attacks. This can only be assured in a backend where the attacker doesn't have access to the environment other than public APIs.

5

u/Runner_Escaper Sep 18 '21

Dude if you put your code through obfuscation and other techniques, it already can’t be debugged.

If your concern is about logcat logs, we have a custom log class in my app which (in release) doesn’t do anything but in debug prints normally. This is easy to do.

Developer options barely (if at all) has any security impact and just hurts customers.

I use developer settings for things like half animation time and showing touches. Things like this would actually make me switch banks in protest.

17

u/Avamander Sep 18 '21

Simply having ADB enabled doesn't make an app debuggable.

0

u/FrezoreR Sep 18 '21

It makes it vurnetable to certain types of attacks. For you can take screenshots of the screen without the app knowing, circumventing an Android feature. But honestly there's tons of things you can do to get more information about the running app that you can't otherwise. Making it debuggable is only possible if it's built with debug flags, so that wouldn't be something anyone would care for.

1

u/Avamander Sep 18 '21

You mean tapping the about line in settings seven times, enabling ADB, connecting it to a PC, granting it access and then you can make a few screenshots? What's the threat model here? This is a "vulnerability" as much as is the CVE assigned to a serial port being accessible.

-1

u/FrezoreR Sep 18 '21

Taking screenshots of your banking information is pretty bad IMO. There's a lot you can do with that information. This is why there's a secure flag in android to disallow screenshots of your activity.

The point here is that developer options is already enabled, so you have just removed one level of security.

If they also get to infect your host (which is likely the way you argue about security). They can silently do more or less anything to your phone.

If you care about security you have to be way more paranoid than you are right now. Banks are a lot more paranoid than most apps because they are liable.

0

u/Avamander Sep 18 '21

If you've got such a setup, you might as well take an actual picture with a camera. It's the point where malicious additional chips on a motherboard become equally as realistic. This measure is useless at best, user-hostile at worst.

If not taking screenshots is a security measure then you also have bigger fish to fry, whatever they might be.

If they also get to infect your host (which is likely the way you argue about security). They can silently do more or less anything to your phone.

This is a point where we should take a look at the realm of PCs and how we shift that responsibility to the user. Can't use Windows, sounds fine? No? Sorry, "banks are a lot more paranoid than most apps because they are liable." But well actually no, not really.

If you care about security you have to be way more paranoid than you are right now.

No, security doesn't work on paranoia.

0

u/FrezoreR Sep 18 '21

Because taking a photo with an actual camera requires you to be physically there. Taking one with adb doesn’t. It also requires a lot more effort.

I mean you think it’s not a problem but these attacks really do happen. Security definitely works on paranoia. Because you’re underestimate how sophisticated some of these attacks are.

Just because you don’t agree or understand them doesn’t mean they don’t exist. There are attacks that even attack the firmware of devices, in which case your fucked either way.

0

u/Avamander Sep 18 '21 edited Sep 19 '21

Because taking a photo with an actual camera requires you to be physically there. Taking one with adb doesn’t. It also requires a lot more effort.

No, it doesn't.

Security definitely works on paranoia.

Nope, paranoia is irrational, security has to be rational, careful. I suggest you read up on the topic a bit more, or simply look up the definition of the word paranoia.

Just because you don’t agree or understand them doesn’t mean they don’t exist.

Just because in some rare cases these risks might exist, doesn't mean they're reasonable to account for. It also doesn't mean that the steps taken haphazardly have any real effect on the threats. Cargo culting, like you're doing, doesn't provide any security.

2

u/[deleted] Sep 18 '21

Nope, paranoia is irrational, security has to be rational, careful. I suggest you read up on the topic a bit more.

Its not paranoia until you have no damn idea where the exploit is on a HUGE codebase and you have to fix it NOW

Stop saying nonsense shit

-1

u/Avamander Sep 19 '21

and you have to fix it NOW

Paranoia doesn't help against that.

Stop saying nonsense shit

paranoia a mental condition characterized by delusions of persecution, unwarranted jealousy, or exaggerated self-importance, typically worked into an organized system. It may be an aspect of chronic personality disorder, of drug abuse, or of a serious condition such as schizophrenia in which the person loses touch with reality.

Not a basis for an informed and functional security policy or hardening efforts.

Anything else still unclear?

→ More replies (0)

-12

u/MacroJustMacro Sep 18 '21

That is correct. I think you miss read what I said. I said it enables device debugging. Meaning you are able now to debug on that device. An app isnt debuggable until you mark it debuggable in androidmanifest. But in order to actually debug anything on a device, you need to enable adb. Preventing that, helps mitigate debugging. Do you see the logic?

11

u/Auxx Sep 18 '21

No, there's no logic in that. When your bank web site is running in my web browser you don't care about debugging, but when it's an app - you suddenly do. And I can debug your code without you knowing anyways.

Average Joe can't debug your app even if he wants, malicious actor can no matter which protections you put in place. If you rely on security through obscurity, you lose the battle instantly.

1

u/[deleted] Sep 18 '21

If web had the ability and options you had in android, they would obviously use it

So there's no point in saying "buuuut browsers"

1

u/Auxx Sep 19 '21

You can have the same functionality in the browser. And if your security model assumes that your users are legitimate - you have a giant security hole. And looking at the code of some apps of major worldwide banks I can assure you that this is the case.

5

u/Avamander Sep 18 '21

How does mitigating debugging other apps help with this app's security at all? It's some control-freak corporate idiocy.

-2

u/MacroJustMacro Sep 18 '21

What? It has nothing to do with other apps. They are just trying to prevent you from debugging their app. Ill let you think it over. Looks like you are missing the entire point.

5

u/Avamander Sep 18 '21 edited Sep 18 '21

They are just trying to prevent you from debugging their app.

Their app is already not debuggable, having ADB enabled doesn't change that! Do you work in that bank that you're doing all these mental gymnastics to excuse this idiocy?

4

u/Northern23 Sep 18 '21

My banking app works fine with developer mode enabled

0

u/FrezoreR Sep 18 '21

It's not a functionality issue. It's the app trying to save you from someone phishing information from it. Have developer options on is a little like leaving the door open. It doesn't mean someone will invade your house, but if they choose to you now made it easier.

3

u/[deleted] Sep 18 '21 edited Sep 19 '21

Not really. Only concerning option for security, is adb, and you still have to unlock the screen, approve any devices etc.

0

u/FrezoreR Sep 18 '21

We can discuss details but it doesn't change that you're opening up a new attack vector.

1

u/tadfisher Sep 19 '21

It's much easier to actually phish the user, e.g. by creating an activity that resembles the bank app's sign-in screen.

1

u/FrezoreR Sep 19 '21

It depends on what information you're after.

-1

u/FrezoreR Sep 18 '21

Yes, or rather having developer options on and adb i particular opens up your device.

I think adj turns itself off in newer versions of Android.