36 KiB
Android Applications Basics
{% hint style="success" %}
Learn & practice AWS Hacking:HackTricks Training AWS Red Team Expert (ARTE)
Learn & practice GCP Hacking: HackTricks Training GCP Red Team Expert (GRTE)
Support HackTricks
- Check the subscription plans!
- Join the ð¬ Discord group or the telegram group or follow us on Twitter ðŠ @hacktricks_live.
- Share hacking tricks by submitting PRs to the HackTricks and HackTricks Cloud github repos.
Try Hard Security Group
{% embed url="https://discord.gg/tryhardsecurity" %}
Android Security Model
äºã€ã®ã¬ã€ã€ãŒããããŸãïŒ
- OSã¯ãã€ã³ã¹ããŒã«ãããã¢ããªã±ãŒã·ã§ã³ãäºãã«éé¢ããŸãã
- ã¢ããªã±ãŒã·ã§ã³èªäœã¯ãéçºè ãç¹å®ã®æ©èœãå ¬éããã¢ããªã±ãŒã·ã§ã³ã®æ©èœãæ§æããããšãå¯èœã«ããŸãã
UID Separation
åã¢ããªã±ãŒã·ã§ã³ã«ã¯ç¹å®ã®ãŠãŒã¶ãŒIDãå²ãåœãŠãããŸããããã¯ã¢ããªã®ã€ã³ã¹ããŒã«æã«è¡ãããã¢ããªã¯ãã®ãŠãŒã¶ãŒIDãææãããã¡ã€ã«ãŸãã¯å ±æãã¡ã€ã«ãšããçžäºäœçšã§ããŸããããããã£ãŠãã¢ããªèªäœãOSã®ç¹å®ã®ã³ã³ããŒãã³ããããã³ã«ãŒããŠãŒã¶ãŒã®ã¿ãã¢ããªã®ããŒã¿ã«ã¢ã¯ã»ã¹ã§ããŸãã
UID Sharing
äºã€ã®ã¢ããªã±ãŒã·ã§ã³ã¯åãUIDã䜿çšããããã«æ§æã§ããŸããããã¯æ
å ±ãå
±æããã®ã«äŸ¿å©ã§ãããäžæ¹ã䟵害ããããšäž¡æ¹ã®ã¢ããªã±ãŒã·ã§ã³ã®ããŒã¿ã䟵害ãããããšã«ãªããŸããããããã®åäœãæšå¥šãããªãçç±ã§ãã
åãUIDãå
±æããã«ã¯ãã¢ããªã±ãŒã·ã§ã³ã¯ãããã§ã¹ãã§åãandroid:sharedUserId
å€ãå®çŸ©ããå¿
èŠããããŸãã
Sandboxing
Androidã¢ããªã±ãŒã·ã§ã³ãµã³ãããã¯ã¹ã¯ãåã¢ããªã±ãŒã·ã§ã³ãå¥ã®ãŠãŒã¶ãŒIDã®äžã§å¥ã®ããã»ã¹ãšããŠå®è¡ããããšãå¯èœã«ããŸããåããã»ã¹ã¯ç¬èªã®ä»®æ³ãã·ã³ãæã£ãŠãããããã¢ããªã®ã³ãŒãã¯ä»ã®ã¢ããªããéé¢ãããŠå®è¡ãããŸãã
Android 5.0(L)以éã¯SELinuxã匷å¶ãããŸããåºæ¬çã«ãSELinuxã¯ãã¹ãŠã®ããã»ã¹éã®çžäºäœçšãæåŠãããã®åŸãæåŸ
ãããçžäºäœçšã®ã¿ãèš±å¯ããããªã·ãŒãäœæããŸããã
Permissions
ã¢ããªãã€ã³ã¹ããŒã«ãããšãã«æš©éãèŠæ±ãããå Žåãã¢ããªã¯AndroidManifest.xmlãã¡ã€ã«ã®**uses-permission
èŠçŽ ã«èšå®ãããæš©éãèŠæ±ããŠããŸããuses-permissionèŠçŽ ã¯ãnameå±æ§å
ã§èŠæ±ãããæš©éã®ååã瀺ããŸãããŸããmaxSdkVersionå±æ§ããããæå®ãããããŒãžã§ã³ãããé«ãããŒãžã§ã³ã§ã¯æš©éã®èŠæ±ãåæ¢ããŸãã
Androidã¢ããªã±ãŒã·ã§ã³ã¯æåã«ãã¹ãŠã®æš©éãèŠæ±ããå¿
èŠã¯ãªããåçã«æš©éãèŠæ±ããããšãã§ããŸããããã¹ãŠã®æš©éã¯ãããã§ã¹ãã§å®£èšãããªããã°ãªããŸããã**
ã¢ããªãæ©èœãå
¬éããå Žåãç¹å®ã®æš©éãæã€ã¢ããªã®ã¿ãã¢ã¯ã»ã¹ã§ããããã«å¶éããããšãã§ããŸãã
æš©éèŠçŽ ã«ã¯äžã€ã®å±æ§ããããŸãïŒ
- æš©éã®åå
- é¢é£ããæš©éãã°ã«ãŒãåããããã®permission-groupå±æ§ã
- æš©éãã©ã®ããã«ä»äžããããã瀺ãprotection-levelãåã€ã®ã¿ã€ãããããŸãïŒ
- Normal: ã¢ããªã«ç¥ãããŠããè åšããªãå Žåã«äœ¿çšãããŸãããŠãŒã¶ãŒã¯æ¿èªããå¿ èŠã¯ãããŸããã
- Dangerous: ãã®æš©éãèŠæ±ã¢ããªã±ãŒã·ã§ã³ã«ææ Œããã¢ã¯ã»ã¹ãä»äžããããšã瀺ããŸãããŠãŒã¶ãŒã«æ¿èªãæ±ããããŸãã
- Signature: ã³ã³ããŒãã³ãããšã¯ã¹ããŒããããã®ãšåã蚌ææžã§çœ²åãããã¢ããªã®ã¿ãæš©éãä»äžãããããšãã§ããŸããããã¯æã匷åãªä¿è·ã¿ã€ãã§ãã
- SignatureOrSystem: ã³ã³ããŒãã³ãããšã¯ã¹ããŒããããã®ãšåã蚌ææžã§çœ²åãããã¢ããªãŸãã¯ã·ã¹ãã ã¬ãã«ã®ã¢ã¯ã»ã¹ã§å®è¡ãããŠããã¢ããªã®ã¿ãæš©éãä»äžãããããšãã§ããŸãã
Pre-Installed Applications
ãããã®ã¢ããªã¯äžè¬çã«**/system/app
ãŸãã¯/system/priv-app
ãã£ã¬ã¯ããªã«ããããã®äžã«ã¯æé©åããããã®ããããŸãïŒclasses.dex
ãã¡ã€ã«ãèŠã€ãããªãããšããããŸãïŒããããã®ã¢ããªã±ãŒã·ã§ã³ã¯ãæã
éå°ãªæš©éã§å®è¡ãããŠãã**ããã確èªãã䟡å€ããããŸãïŒã«ãŒããšããŠïŒã
- AOSPïŒAndroid OpenSource ProjectïŒROMã«ä»å±ããŠãããã®
- ããã€ã¹ã®è£œé å ã«ãã£ãŠè¿œå ããããã®
- æºåž¯é»è©±ã®ãããã€ããŒã«ãã£ãŠè¿œå ããããã®ïŒåœŒãããè³Œå ¥ããå ŽåïŒ
Rooting
ç©ççãªAndroidããã€ã¹ã«ã«ãŒãã¢ã¯ã»ã¹ãååŸããã«ã¯ãäžè¬çã«1ã€ãŸãã¯2ã€ã®è匱æ§ãæªçšããå¿
èŠããããŸãããããã¯éåžžãããã€ã¹ããã³ããŒãžã§ã³ã«ç¹æã§ãã
ãšã¯ã¹ããã€ããæåãããšãéåžžãLinuxã®su
ãã€ããªããŠãŒã¶ãŒã®PATHç°å¢å€æ°ã§æå®ãããå ŽæïŒäŸïŒ/system/xbin
ïŒã«ã³ããŒãããŸãã
suãã€ããªãèšå®ããããšãå¥ã®Androidã¢ããªãsu
ãã€ããªãšã€ã³ã¿ãŒãã§ãŒã¹ããã«ãŒãã¢ã¯ã»ã¹ã®ãªã¯ãšã¹ããåŠçããŸããäŸãã°ãSuperuserãSuperSUïŒGoogle Playã¹ãã¢ã§å
¥æå¯èœïŒãªã©ã§ãã
{% hint style="danger" %} ã«ãŒãåããã»ã¹ã¯éåžžã«å±éºã§ãããããã€ã¹ã«æ·±å»ãªæå·ãäžããå¯èœæ§ãããããšã«æ³šæããŠãã ããã {% endhint %}
ROMs
ã«ã¹ã¿ã ãã¡ãŒã ãŠã§ã¢ãã€ã³ã¹ããŒã«ããŠOSã眮ãæããããšãå¯èœã§ããããã«ãããå€ãããã€ã¹ã®æçšæ§ãæ¡åŒµãããããœãããŠã§ã¢å¶éãåé¿ããããææ°ã®Androidã³ãŒãã«ã¢ã¯ã»ã¹ãããããããšãã§ããŸãã
OmniROMãLineageOSã¯äœ¿çšããã®ã«æã人æ°ã®ãããã¡ãŒã ãŠã§ã¢ã®äºã€ã§ãã
ã«ã¹ã¿ã ãã¡ãŒã ãŠã§ã¢ãã€ã³ã¹ããŒã«ããããã«ããã€ã¹ãã«ãŒãåããå¿ èŠã¯ãªãããšã«æ³šæããŠãã ãããäžéšã®è£œé å ã¯ãææžåãããå®å šãªæ¹æ³ã§ããŒãããŒããŒã®ããã¯è§£é€ãèš±å¯ããŠããŸãã
Implications
ããã€ã¹ãã«ãŒãåããããšãä»»æã®ã¢ããªãã«ãŒããšããŠã¢ã¯ã»ã¹ãèŠæ±ã§ããŸããæªæã®ããã¢ããªã±ãŒã·ã§ã³ããããååŸãããšãã»ãŒãã¹ãŠã«ã¢ã¯ã»ã¹ã§ããé»è©±ãæå·ãããããšãã§ããŸãã
Android Application Fundamentals
- Androidã¢ããªã±ãŒã·ã§ã³ã®åœ¢åŒã¯_ APKãã¡ã€ã«åœ¢åŒ_ãšåŒã°ããŸããåºæ¬çã«ã¯ZIPãã¡ã€ã«ã§ãïŒãã¡ã€ã«æ¡åŒµåã.zipã«å€æŽããããšã§ãå 容ãæœåºããŠè¡šç€ºã§ããŸãïŒã
- APKã®å 容ïŒç¶²çŸ çã§ã¯ãããŸããïŒ
- AndroidManifest.xml
- resources.arsc/strings.xml
- resources.arsc: ãã€ããªXMLã®ãããªäºåã³ã³ãã€ã«ããããªãœãŒã¹ãå«ã¿ãŸãã
- res/xml/files_paths.xml
- META-INF/
- ããã«èšŒææžãååšããŸãïŒ
- classes.dex
- Dalvikãã€ãã³ãŒããå«ã¿ãã¢ããªã±ãŒã·ã§ã³ãããã©ã«ãã§å®è¡ããã³ã³ãã€ã«ãããJavaïŒãŸãã¯KotlinïŒã³ãŒããè¡šããŸãã
- lib/
- CPUã¢ãŒããã¯ãã£ããšã«ãµããã£ã¬ã¯ããªã«åãããããã€ãã£ãã©ã€ãã©ãªãæ ŒçŽããŸãã
armeabi
: ARMããŒã¹ã®ããã»ããµçšã®ã³ãŒãarmeabi-v7a
: ARMv7ããã³ãã以éã®ããã»ããµçšã®ã³ãŒãx86
: X86ããã»ããµçšã®ã³ãŒãmips
: MIPSããã»ããµå°çšã®ã³ãŒã- assets/
- ã¢ããªã«å¿ èŠãªéå€ãªãã¡ã€ã«ãæ ŒçŽããè¿œå ã®ãã€ãã£ãã©ã€ãã©ãªãDEXãã¡ã€ã«ãå«ãå¯èœæ§ããããæã«ã¯ãã«ãŠã§ã¢äœæè ãè¿œå ã®ã³ãŒããé ãããã«äœ¿çšããŸãã
- res/
- resources.arscã«ã³ã³ãã€ã«ãããŠããªããªãœãŒã¹ãå«ã¿ãŸãã
Dalvik & Smali
Androidéçºã§ã¯ãJavaãŸãã¯Kotlinãã¢ããªäœæã«äœ¿çšãããŸãããã¹ã¯ãããã¢ããªã®ããã«JVMã䜿çšãã代ããã«ãAndroidã¯ãã®ã³ãŒããDalvikå®è¡å¯èœïŒDEXïŒãã€ãã³ãŒãã«ã³ã³ãã€ã«ããŸãã以åã¯ãDalvikä»®æ³ãã·ã³ããã®ãã€ãã³ãŒããåŠçããŠããŸããããçŸåšã§ã¯æ°ããAndroidããŒãžã§ã³ã§ã¯Android RuntimeïŒARTïŒãåŒãç¶ãã§ããŸãã
ãªããŒã¹ãšã³ãžãã¢ãªã³ã°ã§ã¯ãSmaliãéèŠã«ãªããŸããããã¯DEXãã€ãã³ãŒãã®äººéå¯èªçã§ããœãŒã¹ã³ãŒãããã€ãã³ãŒãåœä»€ã«å€æããã¢ã»ã³ããªèšèªã®ããã«æ©èœããŸããSmaliãšbaksmaliã¯ããã®æèã§ã®ã¢ã»ã³ããªããã³éã¢ã»ã³ããªããŒã«ãæããŸãã
Intents
ã€ã³ãã³ãã¯ãAndroidã¢ããªããã®ã³ã³ããŒãã³ãéãŸãã¯ä»ã®ã¢ããªãšéä¿¡ããããã®äž»èŠãªæ段ã§ãããããã®ã¡ãã»ãŒãžãªããžã§ã¯ãã¯ãã¢ããªéãŸãã¯ã³ã³ããŒãã³ãéã§ããŒã¿ãéã¶ããšãã§ããHTTPéä¿¡ã§ã®GET/POSTãªã¯ãšã¹ãã®ããã«æ©èœããŸãã
ãããã£ãŠãã€ã³ãã³ãã¯åºæ¬çã«ã³ã³ããŒãã³ãéã§æž¡ãããã¡ãã»ãŒãžã§ããã€ã³ãã³ãã¯ç¹å®ã®ã³ã³ããŒãã³ããã¢ããªã«åããããããšããç¹å®ã®åå人ãªãã§éä¿¡ãããããšãã§ããŸãã
ç°¡åã«èšãã°ãã€ã³ãã³ãã¯æ¬¡ã®ããã«äœ¿çšã§ããŸãïŒ
- ã¢ã¯ãã£ããã£ãéå§ãããããéåžžã¯ã¢ããªã®ãŠãŒã¶ãŒã€ã³ã¿ãŒãã§ãŒã¹ãéã
- ã·ã¹ãã ãã¢ããªã«å€æŽãéç¥ããããã®ãããŒããã£ã¹ããšããŠ
- ããã¯ã°ã©ãŠã³ããµãŒãã¹ãéå§ãåæ¢ãéä¿¡ãããã
- ContentProvidersãä»ããŠããŒã¿ã«ã¢ã¯ã»ã¹ãããã
- ã€ãã³ããåŠçããããã®ã³ãŒã«ããã¯ãšããŠ
è匱ãªå Žåãã€ã³ãã³ãã¯ããŸããŸãªæ»æãå®è¡ããããã«äœ¿çšãããå¯èœæ§ããããŸãã
Intent-Filter
ã€ã³ãã³ããã£ã«ã¿ãŒã¯ãã¢ã¯ãã£ããã£ããµãŒãã¹ããŸãã¯ãããŒããã£ã¹ãã¬ã·ãŒããŒãç°ãªãã¿ã€ãã®ã€ã³ãã³ããšã©ã®ããã«çžäºäœçšã§ããããå®çŸ©ããŸããåºæ¬çã«ããããã®ã³ã³ããŒãã³ãã®èœåã説æããã©ã®ãããªã¢ã¯ã·ã§ã³ãå®è¡ã§ãããããŸãã¯ã©ã®ãããªãããŒããã£ã¹ããåŠçã§ãããã瀺ããŸãããããã®ãã£ã«ã¿ãŒã宣èšããäž»ãªå Žæã¯AndroidManifest.xmlãã¡ã€ã«å ã§ããããããŒããã£ã¹ãã¬ã·ãŒããŒã®å Žåã¯ãã³ãŒãã£ã³ã°ããããšãéžæè¢ã§ãã
ã€ã³ãã³ããã£ã«ã¿ãŒã¯ãã«ããŽãªãã¢ã¯ã·ã§ã³ãããã³ããŒã¿ãã£ã«ã¿ãŒã§æ§æãããè¿œå ã®ã¡ã¿ããŒã¿ãå«ããããšãã§ããŸãããã®èšå®ã«ãããã³ã³ããŒãã³ãã¯å®£èšãããåºæºã«äžèŽããç¹å®ã®ã€ã³ãã³ããåŠçã§ããŸãã
Androidã³ã³ããŒãã³ãïŒã¢ã¯ãã£ããã£/ãµãŒãã¹/ã³ã³ãã³ããããã€ããŒ/ãããŒããã£ã¹ãã¬ã·ãŒããŒïŒã®éèŠãªåŽé¢ã¯ããã®å¯èŠæ§ãŸãã¯å
¬éç¶æ
ã§ããã³ã³ããŒãã³ãã¯ã**exported
ãtrue
ã®å€ã§ããå ŽåããŸãã¯ãããã§ã¹ãã«ã€ã³ãã³ããã£ã«ã¿ãŒã宣èšãããŠããå Žåãå
¬éãšèŠãªãããä»ã®ã¢ããªãšçžäºäœçšã§ããŸãããã ããéçºè
ã¯ãããã®ã³ã³ããŒãã³ããæ瀺çã«ãã©ã€ããŒãã«ä¿ã€æ¹æ³ããããä»ã®ã¢ããªãšæå³ããçžäºäœçšããªãããã«ããããšãã§ããŸããããã¯ããããã§ã¹ãå®çŸ©ã§exported
å±æ§ãfalse
**ã«èšå®ããããšã§å®çŸãããŸãã
ããã«ãéçºè
ã¯ç¹å®ã®æš©éãèŠæ±ããããšã§ããããã®ã³ã³ããŒãã³ããžã®ã¢ã¯ã»ã¹ãããã«ä¿è·ãããªãã·ã§ã³ããããŸãã**permission
**å±æ§ãèšå®ããããšã§ãæå®ãããæš©éãæã€ã¢ããªã®ã¿ãã³ã³ããŒãã³ãã«ã¢ã¯ã»ã¹ã§ããããã«ãã誰ãçžäºäœçšã§ãããã«å¯Ÿããè¿œå ã®ã»ãã¥ãªãã£ãšå¶åŸ¡ã®å±€ãè¿œå ããŸãã
<activity android:name=".MyActivity" android:exported="false">
<!-- Intent filters go here -->
</activity>
ã€ã³ããªã·ããã€ã³ãã³ã
ã€ã³ãã³ãã¯ãã€ã³ãã³ãã³ã³ã¹ãã©ã¯ã¿ã䜿çšããŠããã°ã©ã çã«äœæãããŸã:
Intent email = new Intent(Intent.ACTION_SEND, Uri.parse("mailto:"));
The Action of the previously declared intent is ACTION_SEND and the Extra is a mailto Uri (the Extra if the extra information the intent is expecting).
ãã®ã€ã³ãã³ãã¯ã以äžã®äŸã®ããã«ãããã§ã¹ãå ã§å®£èšããå¿ èŠããããŸã:
<activity android:name="ShareActivity">
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
ã€ã³ãã³ããã£ã«ã¿ãŒã¯ãã¡ãã»ãŒãžãåä¿¡ããããã«ã¢ã¯ã·ã§ã³ãããŒã¿ãããã³ã«ããŽãªãäžèŽããå¿ èŠããããŸãã
ãã€ã³ãã³ã解決ãããã»ã¹ã¯ãã©ã®ã¢ããªãåã¡ãã»ãŒãžãåä¿¡ãããã決å®ããŸãããã®ããã»ã¹ã¯ãintent-filter宣èšã§èšå®ã§ããåªå
床å±æ§ãèæ
®ããåªå
床ãé«ãæ¹ãéžæãããŸãããã®åªå
床ã¯-1000ãã1000ã®éã§èšå®ã§ããã¢ããªã±ãŒã·ã§ã³ã¯SYSTEM_HIGH_PRIORITY
å€ã䜿çšã§ããŸãã競åãçºçããå Žåãããã§ã€ã¶ãŒããŠã£ã³ããŠã衚瀺ããããŠãŒã¶ãŒã決å®ã§ããŸãã
æ瀺çã€ã³ãã³ã
æ瀺çã€ã³ãã³ãã¯ãã¿ãŒã²ãããšããã¯ã©ã¹åãæå®ããŸãïŒ
Intent downloadIntent = new (this, DownloadService.class):
ä»ã®ã¢ããªã±ãŒã·ã§ã³ã§ã¯ã以åã«å®£èšãããã€ã³ãã³ãã«ã¢ã¯ã»ã¹ããããã«ã次ã®ããã«äœ¿çšã§ããŸãïŒ
Intent intent = new Intent();
intent.setClassName("com.other.app", "com.other.app.ServiceName");
context.startService(intent);
Pending Intents
ããã«ãããä»ã®ã¢ããªã±ãŒã·ã§ã³ãããªãã®ã¢ããªã±ãŒã·ã§ã³ã®ä»£çã§ã¢ã¯ã·ã§ã³ãå®è¡ããããšãã§ããŸããPending Intentãæ§ç¯ããéã«ã¯ãã€ã³ãã³ããšå®è¡ããã¢ã¯ã·ã§ã³ãæå®ããå¿ èŠããããŸãããã宣èšãããã€ã³ãã³ããæ瀺çã§ãªãå ŽåïŒã©ã®ã€ã³ãã³ããåŒã³åºãããã宣èšããŠããªãå ŽåïŒãæªæã®ããã¢ããªã±ãŒã·ã§ã³ã被害è ã¢ããªã®ä»£çã§å®£èšãããã¢ã¯ã·ã§ã³ãå®è¡ããå¯èœæ§ããããŸããããã«ãã¢ã¯ã·ã§ã³ãæå®ãããŠããªãå Žåãæªæã®ããã¢ããªã¯è¢«å®³è ã®ä»£çã§ä»»æã®ã¢ã¯ã·ã§ã³ãå®è¡ã§ããããã«ãªããŸãã
Broadcast Intents
åè¿°ã®ã€ã³ãã³ããšã¯ç°ãªãã1ã€ã®ã¢ããªã ããåä¿¡ããã®ã§ã¯ãªãããããŒããã£ã¹ãã€ã³ãã³ãã¯è€æ°ã®ã¢ããªã§åä¿¡å¯èœã§ãããã ããAPIããŒãžã§ã³14以éã¯ãã¡ãã»ãŒãžãåä¿¡ãã¹ãã¢ããªãæå®ããããšãå¯èœã§ããIntent.setPackageã䜿çšããŸãã
ãŸãããããŒããã£ã¹ããéä¿¡ããéã«æš©éãæå®ããããšãå¯èœã§ããåä¿¡ã¢ããªã¯ãã®æš©éãæã£ãŠããå¿ èŠããããŸãã
ãããŒããã£ã¹ãã«ã¯2çš®é¡ããããŸãïŒéåžžïŒéåæïŒãšé åºä»ãïŒåæïŒãé åºã¯åä¿¡è èŠçŽ å ã®èšå®ãããåªå 床ã«åºã¥ããŠããŸããåã¢ããªã¯ãããŒããã£ã¹ããåŠçã転éããŸãã¯ç Žæ£ããããšãã§ããŸãã
Context
ã¯ã©ã¹ã®é¢æ°sendBroadcast(intent, receiverPermission)
ã䜿çšããŠãããŒããã£ã¹ããéä¿¡ããããšãå¯èœã§ãã
ãŸãã**LocalBroadCastManager
ã®sendBroadcast
**é¢æ°ã䜿çšãããšãã¡ãã»ãŒãžãã¢ããªãåºãããšã¯ãããŸãããããã䜿çšãããšãåä¿¡è
ã³ã³ããŒãã³ãããšã¯ã¹ããŒãããå¿
èŠãããããŸããã
Sticky Broadcasts
ãã®çš®ã®ãããŒããã£ã¹ãã¯éä¿¡ãããåŸãé·æéã¢ã¯ã»ã¹å¯èœã§ãã
ãããã¯APIã¬ãã«21ã§éæšå¥šãšãªãã䜿çšããªãããšãæšå¥šãããŠããŸãã
ããã«ãããä»»æã®ã¢ããªã±ãŒã·ã§ã³ãããŒã¿ãçèŽããããšãã§ããã ãã§ãªããããŒã¿ãå€æŽããããšãå¯èœã§ãã
ãstickyããšããåèªãå«ãé¢æ°ïŒäŸïŒsendStickyBroadcast
ãsendStickyBroadcastAsUser
ïŒãèŠã€ããå Žåã¯ã圱é¿ã確èªããåé€ãè©Šã¿ãŠãã ããã
Deep links / URL schemes
Androidã¢ããªã±ãŒã·ã§ã³ã§ã¯ããã£ãŒããªã³ã¯ã䜿çšããŠURLãä»ããŠçŽæ¥ã¢ã¯ã·ã§ã³ïŒã€ã³ãã³ãïŒãéå§ããŸããããã¯ãã¢ã¯ãã£ããã£å ã§ç¹å®ã®URLã¹ããŒã ã宣èšããããšã«ãã£ãŠè¡ãããŸããAndroidããã€ã¹ããã®ã¹ããŒã ãæã€URLã«ã¢ã¯ã»ã¹ããããšãããšãã¢ããªã±ãŒã·ã§ã³å ã®æå®ãããã¢ã¯ãã£ããã£ãèµ·åããŸãã
ã¹ããŒã ã¯**AndroidManifest.xml
**ãã¡ã€ã«ã«å®£èšããå¿
èŠããããŸãïŒ
[...]
<activity android:name=".MyActivity">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="examplescheme" />
</intent-filter>
[...]
åã®äŸã®ã¹ããŒã 㯠exampleapp://
ã§ãïŒcategory BROWSABLE
ã泚æããŠãã ããïŒ
次ã«ãããŒã¿ãã£ãŒã«ã㧠host ãš path ãæå®ã§ããŸã:
<data android:scheme="examplescheme"
android:host="example"
/>
ãŠã§ãããã¢ã¯ã»ã¹ããã«ã¯ã次ã®ããã«ãªã³ã¯ãèšå®ããããšãã§ããŸã:
<a href="examplescheme://example/something">click here</a>
<a href="examplescheme://example/javascript://%250dalert(1)">click here</a>
ã¢ããªã§å®è¡ãããã³ãŒããèŠã€ããããã«ããã£ãŒããªã³ã¯ã«ãã£ãŠåŒã³åºãããã¢ã¯ãã£ããã£ã«ç§»åãã**onNewIntent
**é¢æ°ãæ€çŽ¢ããŸãã
HTMLããŒãžã䜿çšããã«ãã£ãŒããªã³ã¯ãåŒã³åºãæ¹æ³ãåŠã¶ã
AIDL - Androidã€ã³ã¿ãŒãã§ãŒã¹å®çŸ©èšèª
Androidã€ã³ã¿ãŒãã§ãŒã¹å®çŸ©èšèªïŒAIDLïŒã¯ãAndroidã¢ããªã±ãŒã·ã§ã³ã«ãããã¯ã©ã€ã¢ã³ããšãµãŒãã¹éã®ããã»ã¹ééä¿¡ïŒIPCïŒã容æã«ããããã«èšèšãããŠããŸããä»ã®ããã»ã¹ã®ã¡ã¢ãªã«çŽæ¥ã¢ã¯ã»ã¹ããããšã¯Androidã§ã¯èš±å¯ãããŠããªããããAIDLã¯ãªããžã§ã¯ãããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ãç解ã§ãã圢åŒã«ããŒã·ã£ãªã³ã°ããããšã§ãç°ãªãããã»ã¹éã®éä¿¡ã容æã«ããŸãã
äž»èŠæŠå¿µ
-
ããŠã³ããµãŒãã¹: ãããã®ãµãŒãã¹ã¯IPCã®ããã«AIDLãå©çšããã¢ã¯ãã£ããã£ãã³ã³ããŒãã³ãããµãŒãã¹ã«ãã€ã³ããããªã¯ãšã¹ããè¡ããã¬ã¹ãã³ã¹ãåãåãããšãå¯èœã«ããŸãããµãŒãã¹ã®ã¯ã©ã¹å ã®
onBind
ã¡ãœããã¯ãçžäºäœçšãéå§ããããã«éèŠã§ãããè匱æ§ãæ¢ãããã®ã»ãã¥ãªãã£ã¬ãã¥ãŒã«ãããŠéèŠãªé åã§ãã -
ã¡ãã»ã³ãžã£ãŒ: ããŠã³ããµãŒãã¹ãšããŠæ©èœããã¡ãã»ã³ãžã£ãŒã¯ã
onBind
ã¡ãœãããéããŠããŒã¿ãåŠçããããšã«éç¹ã眮ããIPCãä¿é²ããŸãããã®ã¡ãœããã泚ææ·±ãæ€æ»ããå®å šã§ãªãããŒã¿åŠçãæ©å¯é¢æ°ã®å®è¡ããªãã確èªããããšãéèŠã§ãã -
ãã€ã³ããŒ: AIDLã®æœè±¡åã«ãããã€ã³ããŒã»ã¯ã©ã¹ã®çŽæ¥äœ¿çšã¯ããŸãäžè¬çã§ã¯ãããŸãããããã€ã³ããŒã¯ç°ãªãããã»ã¹ã®ã¡ã¢ãªç©ºééã§ããŒã¿è»¢éãä¿é²ããã«ãŒãã«ã¬ãã«ã®ãã©ã€ããŒãšããŠæ©èœããããšãç解ããããšã¯æçã§ãããããªãç解ã®ããã«ããªãœãŒã¹ã¯https://www.youtube.com/watch?v=O-UHvFjxwZ8ã§å ¥æå¯èœã§ãã
ã³ã³ããŒãã³ã
ããã«ã¯ãã¢ã¯ãã£ããã£ããµãŒãã¹ããããŒããã£ã¹ãã¬ã·ãŒããŒããããã€ããŒãå«ãŸããŸãã
ã©ã³ãã£ãŒã¢ã¯ãã£ããã£ãšä»ã®ã¢ã¯ãã£ããã£
Androidã¢ããªã§ã¯ãã¢ã¯ãã£ããã£ã¯ç»é¢ã®ãããªãã®ã§ãã¢ããªã®ãŠãŒã¶ãŒã€ã³ã¿ãŒãã§ãŒã¹ã®ç°ãªãéšåã衚瀺ããŸããã¢ããªã¯å€ãã®ã¢ã¯ãã£ããã£ãæã€ããšãã§ããããããããŠãŒã¶ãŒã«ãŠããŒã¯ãªç»é¢ãæäŸããŸãã
ã©ã³ãã£ãŒã¢ã¯ãã£ããã£ã¯ã¢ããªãžã®äž»èŠãªå ¥ãå£ã§ãããã¢ããªã®ã¢ã€ã³ã³ãã¿ãããããšèµ·åããŸããããã¯ãç¹å®ã®MAINããã³LAUNCHERã€ã³ãã³ããæã€ã¢ããªã®ãããã§ã¹ããã¡ã€ã«ã§å®çŸ©ãããŠããŸãã
<activity android:name=".LauncherActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
ãã¹ãŠã®ã¢ããªãã©ã³ãã£ãŒã¢ã¯ãã£ããã£ãå¿ èŠãšããããã§ã¯ãªããç¹ã«ãŠãŒã¶ãŒã€ã³ã¿ãŒãã§ãŒã¹ãæããªãããã¯ã°ã©ãŠã³ããµãŒãã¹ã®ãããªã¢ããªã¯å¿ èŠãããŸããã
ã¢ã¯ãã£ããã£ã¯ããããã§ã¹ãã§ãexportedããšããŠããŒã¯ããããšã§ãä»ã®ã¢ããªãããã»ã¹ã«å©çšå¯èœã«ããããšãã§ããŸãããã®èšå®ã«ãããä»ã®ã¢ããªããã®ã¢ã¯ãã£ããã£ãéå§ã§ããããã«ãªããŸãïŒ
<service android:name=".ExampleExportedService" android:exported="true"/>
ããããå¥ã®ã¢ããªããã¢ã¯ãã£ããã£ã«ã¢ã¯ã»ã¹ããããšãåžžã«ã»ãã¥ãªãã£ãªã¹ã¯ã§ããããã§ã¯ãããŸãããæžå¿µã¯ãæ©å¯ããŒã¿ãäžé©åã«å ±æãããå Žåã«çããæ å ±æŒæŽ©ã«ã€ãªããå¯èœæ§ããããŸãã
ã¢ã¯ãã£ããã£ã®ã©ã€ããµã€ã¯ã«ã¯onCreateã¡ãœããããå§ãŸããUIãèšå®ãããŠãŒã¶ãŒãšã®ã€ã³ã¿ã©ã¯ã·ã§ã³ã®ããã«ã¢ã¯ãã£ããã£ãæºåããŸãã
ã¢ããªã±ãŒã·ã§ã³ãµãã¯ã©ã¹
Androidéçºã§ã¯ãã¢ããªã¯Applicationã¯ã©ã¹ã®ãµãã¯ã©ã¹ãäœæãããªãã·ã§ã³ããããŸãããå¿
é ã§ã¯ãããŸããããã®ãããªãµãã¯ã©ã¹ãå®çŸ©ããããšãããã¯ã¢ããªå
ã§æåã«ã€ã³ã¹ã¿ã³ã¹åãããã¯ã©ã¹ã«ãªããŸãã**attachBaseContext
ã¡ãœããããã®ãµãã¯ã©ã¹ã§å®è£
ãããŠããå ŽåãonCreate
**ã¡ãœããã®åã«å®è¡ãããŸãããã®ã»ããã¢ããã«ãããã¢ããªã±ãŒã·ã§ã³ã®æ®ãã®éšåãéå§ãããåã«æ©æåæåãå¯èœã«ãªããŸãã
public class MyApp extends Application {
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
// Initialization code here
}
@Override
public void onCreate() {
super.onCreate();
// More initialization code
}
}
ãµãŒãã¹
Services 㯠ããã¯ã°ã©ãŠã³ããªãã¬ãŒãã£ã ã§ããããŠãŒã¶ãŒã€ã³ã¿ãŒãã§ãŒã¹ãªãã§ã¿ã¹ã¯ãå®è¡ããããšãã§ããŸãããããã®ã¿ã¹ã¯ã¯ããŠãŒã¶ãŒãç°ãªãã¢ããªã±ãŒã·ã§ã³ã«åãæ¿ããŠãå®è¡ãç¶ããããšãã§ããããããµãŒãã¹ã¯ é·æéå®è¡ãããæäœ ã«ãšã£ãŠéèŠã§ãã
ãµãŒãã¹ã¯å€çšéã§ãããããŸããŸãªæ¹æ³ã§éå§ã§ããŸãããIntents ãã¢ããªã±ãŒã·ã§ã³ã®ãšã³ããªãŒãã€ã³ããšããŠãµãŒãã¹ãèµ·åããäž»ãªæ¹æ³ã§ããstartService
ã¡ãœããã䜿çšããŠãµãŒãã¹ãéå§ããããšããã® onStart
ã¡ãœãããåäœãéå§ããstopService
ã¡ãœãããæ瀺çã«åŒã³åºããããŸã§å®è¡ãç¶ããŸãããããã¯ããµãŒãã¹ã®åœ¹å²ãã¢ã¯ãã£ããªã¯ã©ã€ã¢ã³ãæ¥ç¶ã«äŸåããŠããå ŽåãbindService
ã¡ãœããã䜿çšããŠã¯ã©ã€ã¢ã³ãããµãŒãã¹ã«ãã€ã³ãããããŒã¿ã®åãæž¡ãã®ããã« onBind
ã¡ãœãããåŒã³åºãããŸãã
ãµãŒãã¹ã®èå³æ·±ãå¿çšã«ã¯ãããã¯ã°ã©ãŠã³ãã§ã®é³æ¥œåçããããã¯ãŒã¯ããŒã¿ã®ååŸãå«ãŸãããŠãŒã¶ãŒãã¢ããªãšå¯Ÿè©±ããããšã劚ããŸãããããã«ããµãŒãã¹ã¯ ãšã¯ã¹ããŒã ãéããŠåãããã€ã¹äžã®ä»ã®ããã»ã¹ã«ã¢ã¯ã»ã¹å¯èœã«ããããšãã§ããŸããããã¯ããã©ã«ãã®åäœã§ã¯ãªããAndroid Manifestãã¡ã€ã«ã§æ瀺çãªèšå®ãå¿ èŠã§ãïŒ
<service android:name=".ExampleExportedService" android:exported="true"/>
Broadcast Receivers
Broadcast receivers ã¯ãã¡ãã»ãŒãžã³ã°ã·ã¹ãã ã«ããããªã¹ããŒãšããŠæ©èœããè€æ°ã®ã¢ããªã±ãŒã·ã§ã³ãã·ã¹ãã ããã®åãã¡ãã»ãŒãžã«å¿çã§ããããã«ããŸããã¢ããªã¯ äºã€ã®äž»èŠãªæ¹æ³ 㧠ã¬ã·ãŒããŒãç»é² ã§ããŸãïŒã¢ããªã® Manifest ãéããŠããŸãã¯ã¢ããªã®ã³ãŒãå
㧠registerReceiver
API ãä»ã㊠åçã«ãManifest ã§ã¯ããããŒããã£ã¹ãã¯æš©éã§ãã£ã«ã¿ãªã³ã°ãããåçã«ç»é²ãããã¬ã·ãŒããŒã¯ç»é²æã«æš©éãæå®ããããšãã§ããŸãã
Intent ãã£ã«ã¿ãŒ ã¯ãäž¡æ¹ã®ç»é²æ¹æ³ã«ãããŠéèŠã§ãã©ã®ãããŒããã£ã¹ããã¬ã·ãŒããŒãããªã¬ãŒãããã決å®ããŸããäžèŽãããããŒããã£ã¹ããéä¿¡ããããšãã¬ã·ãŒããŒã® onReceive
ã¡ãœãããåŒã³åºãããã¢ããªãäœããããªãŒã¢ã©ãŒãã«å¿ããŠåäœã調æŽãããªã©ãé©åã«åå¿ã§ããããã«ãªããŸãã
ãããŒããã£ã¹ã㯠éåæ ã§ããã¹ãŠã®ã¬ã·ãŒããŒã«é åºãªãã§å°éããããšãããã°ãåæ ã§ãã¬ã·ãŒããŒãèšå®ãããåªå é äœã«åºã¥ããŠãããŒããã£ã¹ããåãåãããšããããŸãããã ããã©ã®ã¢ããªã§ãèªåãåªå ãããŠãããŒããã£ã¹ããååã§ãããããæœåšçãªã»ãã¥ãªãã£ãªã¹ã¯ã«æ³šæããããšãéèŠã§ãã
ã¬ã·ãŒããŒã®æ©èœãç解ããã«ã¯ããã®ã¯ã©ã¹å
ã® onReceive
ã¡ãœãããæ¢ããŸãããã®ã¡ãœããã®ã³ãŒãã¯åä¿¡ãã Intent ãæäœã§ããç¹ã« Ordered Broadcasts ã§ã¯ãIntent ãå€æŽãŸãã¯åé€ããå¿
èŠããããããã¬ã·ãŒããŒã«ããããŒã¿æ€èšŒã®å¿
èŠæ§ã匷調ãããŸãã
Content Provider
Content Providers ã¯ãã¢ããªé㧠æ§é åããŒã¿ãå
±æãã ããã«äžå¯æ¬ ã§ãããããŒã¿ã»ãã¥ãªãã£ã確ä¿ããããã« æš©é ãå®è£
ããéèŠæ§ã匷調ããŸããããã«ãããã¢ããªã¯ããŒã¿ããŒã¹ããã¡ã€ã«ã·ã¹ãã ããŸãã¯ãŠã§ããªã©ãããŸããŸãªãœãŒã¹ããããŒã¿ã«ã¢ã¯ã»ã¹ã§ããŸããç¹å®ã®æš©éãäŸãã° readPermission
ãš writePermission
ã¯ãã¢ã¯ã»ã¹ãå¶åŸ¡ããããã«éèŠã§ããããã«ãäžæçãªã¢ã¯ã»ã¹ã¯ãã¢ããªã®ãããã§ã¹ãå
ã® grantUriPermission
èšå®ãéããŠä»äžã§ããpath
ãpathPrefix
ãããã³ pathPattern
ãªã©ã®å±æ§ãå©çšããŠè©³çŽ°ãªã¢ã¯ã»ã¹å¶åŸ¡ãè¡ããŸãã
å
¥åæ€èšŒã¯ãSQL ã€ã³ãžã§ã¯ã·ã§ã³ãªã©ã®è匱æ§ãé²ãããã«éèŠã§ããContent Providers ã¯ãããŒã¿æäœãšã¢ããªã±ãŒã·ã§ã³éã®å
±æãä¿é²ããåºæ¬çãªæäœããµããŒãããŸãïŒinsert()
ãupdate()
ãdelete()
ãããã³ query()
ã
FileProvider ã¯ããã¡ã€ã«ãå®å
šã«å
±æããããšã«ç¹åãã Content Provider ã§ããããã¯ããã©ã«ããŒãžã®ã¢ã¯ã»ã¹ãå¶åŸ¡ããããã®ç¹å®ã®å±æ§ãæã£ãŠã¢ããªã®ãããã§ã¹ãã§å®çŸ©ãããandroid:exported
ãš android:resource
ããã©ã«ããŒæ§æãæããŸããæ©å¯ããŒã¿ã誀ã£ãŠå
¬éããªãããã«ããã£ã¬ã¯ããªãå
±æããéã«ã¯æ³šæãå¿
èŠã§ãã
FileProvider ã®äŸã®ãããã§ã¹ã宣èšïŒ
<provider android:name="androidx.core.content.FileProvider"
android:authorities="com.example.myapp.fileprovider"
android:grantUriPermissions="true"
android:exported="false">
<meta-data android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/filepaths" />
</provider>
filepaths.xml
ã§å
±æãã©ã«ããŒãæå®ããäŸ:
<paths>
<files-path path="images/" name="myimages" />
</paths>
For further information check:
WebViews
WebViewsã¯Androidã¢ããªå ã®ãããŠã§ããã©ãŠã¶ã®ãããªãã®ã§ããŠã§ããŸãã¯ããŒã«ã«ãã¡ã€ã«ããã³ã³ãã³ããååŸããŸããéåžžã®ãã©ãŠã¶ãšåæ§ã®ãªã¹ã¯ã«çŽé¢ããŸãããç¹å®ã®èšå®ãéããŠãªã¹ã¯ã軜æžããæ¹æ³ããããŸãã
Androidã¯2ã€ã®äž»èŠãªWebViewã¿ã€ããæäŸããŠããŸãïŒ
- WebViewClientã¯åºæ¬çãªHTMLã«ã¯é©ããŠããŸãããJavaScriptã®ã¢ã©ãŒãæ©èœããµããŒãããŠããªããããXSSæ»æã®ãã¹ãã«åœ±é¿ãäžããŸãã
- WebChromeClientã¯ããã«Chromeãã©ãŠã¶ã®äœéšã«è¿ãåäœãããŸãã
éèŠãªç¹ã¯ãWebViewãã©ãŠã¶ã¯ããã€ã¹ã®ã¡ã€ã³ãã©ãŠã¶ãšã¯ãããŒãå ±æããªãããšã§ãã
ã³ã³ãã³ããèªã¿èŸŒãããã«ãloadUrl
, loadData
, ããã³ loadDataWithBaseURL
ãªã©ã®ã¡ãœãããå©çšå¯èœã§ãããããã®URLãŸãã¯ãã¡ã€ã«ãå®å
šã«äœ¿çšã§ããããšã確èªããããšãéèŠã§ããã»ãã¥ãªãã£èšå®ã¯WebSettings
ã¯ã©ã¹ãéããŠç®¡çã§ããŸããäŸãã°ãsetJavaScriptEnabled(false)
ã§JavaScriptãç¡å¹ã«ããããšã§ãXSSæ»æãé²ãããšãã§ããŸãã
JavaScriptã®ãããªããžãã¯Javaãªããžã§ã¯ããJavaScriptãšçžäºäœçšããããšãå¯èœã«ããAndroid 4.2以éã¯ã»ãã¥ãªãã£ã®ããã«ã¡ãœããã«@JavascriptInterface
ãä»ããå¿
èŠããããŸãã
ã³ã³ãã³ãã¢ã¯ã»ã¹ãèš±å¯ããïŒsetAllowContentAccess(true)
ïŒããšã§ãWebViewsã¯Content Providersã«ã¢ã¯ã»ã¹ã§ããŸãããã³ã³ãã³ãURLãå®å
šã§ããããšã確èªããªãéããªã¹ã¯ããããŸãã
ãã¡ã€ã«ã¢ã¯ã»ã¹ãå¶åŸ¡ããããã«ïŒ
- ãã¡ã€ã«ã¢ã¯ã»ã¹ãç¡å¹ã«ããïŒ
setAllowFileAccess(false)
ïŒããšã§ããã¡ã€ã«ã·ã¹ãã ãžã®ã¢ã¯ã»ã¹ãå¶éããç¹å®ã®ã¢ã»ããã«äŸå€ãèšããæ©å¯ã§ãªãã³ã³ãã³ãã®ã¿ã«äœ¿çšãããããšãä¿èšŒããŸãã
Other App Components and Mobile Device Management
Digital Signing of Applications
- ããžã¿ã«çœ²åã¯Androidã¢ããªã«å¿ é ã§ãã€ã³ã¹ããŒã«åã«æ£åœã«äœæãããããšãä¿èšŒããŸãããã®ããã»ã¹ã§ã¯ã¢ããªã®èå¥ã®ããã«èšŒææžã䜿çšãããã€ã³ã¹ããŒã«æã«ããã€ã¹ã®ããã±ãŒãžãããŒãžã£ãŒã«ãã£ãŠæ€èšŒãããå¿ èŠããããŸããã¢ããªã¯èªå·±çœ²åãŸãã¯å€éšCAã«ãã£ãŠèªèšŒãããäžæ£ã¢ã¯ã»ã¹ããä¿è·ãããããã€ã¹ãžã®é ä¿¡äžã«ã¢ããªãæ¹ãããããªãããšãä¿èšŒããŸãã
App Verification for Enhanced Security
- Android 4.2以éãVerify Appsãšããæ©èœã«ããããŠãŒã¶ãŒã¯ã€ã³ã¹ããŒã«åã«ã¢ããªã®å®å šæ§ã確èªã§ããŸãããã®æ€èšŒããã»ã¹ã¯ãæœåšçã«æ害ãªã¢ããªã«å¯ŸããŠãŠãŒã¶ãŒã«èŠåãçºããããç¹ã«æªæã®ããã¢ããªã®ã€ã³ã¹ããŒã«ãé²ãã ãããããšã§ããŠãŒã¶ãŒã®ã»ãã¥ãªãã£ã匷åããŸãã
Mobile Device Management (MDM)
- MDMãœãªã¥ãŒã·ã§ã³ã¯ãããã€ã¹ç®¡çAPIãéããŠã¢ãã€ã«ããã€ã¹ã®ç£èŠãšã»ãã¥ãªãã£ãæäŸããŸããããã«ãããã¢ãã€ã«ããã€ã¹ãå¹æçã«ç®¡çããã³ä¿è·ããããã«Androidã¢ããªã®ã€ã³ã¹ããŒã«ãå¿ èŠã§ããäž»ãªæ©èœã«ã¯ããã¹ã¯ãŒãããªã·ãŒã®åŒ·å¶ãã¹ãã¬ãŒãžæå·åã®çŸ©åä»ããããã³ãªã¢ãŒãããŒã¿æ¶å»ã®èš±å¯ãå«ãŸããã¢ãã€ã«ããã€ã¹ã«å¯Ÿããå æ¬çãªå¶åŸ¡ãšã»ãã¥ãªãã£ã確ä¿ããŸãã
// Example of enforcing a password policy with MDM
DevicePolicyManager dpm = (DevicePolicyManager) getSystemService(Context.DEVICE_POLICY_SERVICE);
ComponentName adminComponent = new ComponentName(context, AdminReceiver.class);
if (dpm.isAdminActive(adminComponent)) {
// Set minimum password length
dpm.setPasswordMinimumLength(adminComponent, 8);
}
Try Hard Security Group
{% embed url="https://discord.gg/tryhardsecurity" %}
{% hint style="success" %}
AWSãããã³ã°ãåŠã³ãå®è·µããïŒHackTricks Training AWS Red Team Expert (ARTE)
GCPãããã³ã°ãåŠã³ãå®è·µããïŒHackTricks Training GCP Red Team Expert (GRTE)
HackTricksããµããŒããã
- ãµãã¹ã¯ãªãã·ã§ã³ãã©ã³ã確èªããŠãã ããïŒ
- **ð¬ Discordã°ã«ãŒããŸãã¯Telegramã°ã«ãŒãã«åå ããããTwitter ðŠ @hacktricks_liveããã©ããŒããŠãã ããã
- ãããã³ã°ã®ããªãã¯ãå ±æããã«ã¯ãHackTricksãšHackTricks Cloudã®GitHubãªããžããªã«PRãéä¿¡ããŠãã ããã