feat(v1.4.3): add native android & droidsec mobile security auditing module, docs, and bump engine version
This commit is contained in:
1 parent
517b2cdb35
commit
79bf41cb56
5 files changed
+478
-17
No files matched your search
+14
-13
@@ -5,7 +5,7 @@
|
||||
---
|
||||
|
||||
## 🌟 Overview
|
||||
AiraLang features 14 built-in standard library modules engineered natively for speed, AI capabilities, cyber security recon, system operations, and developer joy.
|
||||
AiraLang features 15 built-in standard library modules engineered natively for speed, AI capabilities, cyber security recon, system operations, and developer joy.
|
||||
|
||||
All modules are loaded natively via the `import` statement:
|
||||
```aira
|
||||
@@ -19,19 +19,20 @@ import "<module_name>";
|
||||
| # | Module | Category | Primary Purpose | Key Methods |
|
||||
|---|---|---|---|---|
|
||||
| 1 | [`ai`](./ai.md) | Artificial Intelligence | Universal LLM engine (OpenAI, DeepSeek, Claude, Gemini, Groq, Ollama, OpenRouter, etc.) | `ask()`, `set_provider()`, `set_endpoint()`, `set_key()`, `providers()` |
|
||||
| 2 | [`proposal`](./proposal.md) | Fun & Cyber-Prank | Automated HTTP 500 love timeout & AI sentiment checker | `ask()`, `set_key()`, `set_system()`, `wish()`, `set_wish()` |
|
||||
| 2 | [`android`](./android.md) / `droidsec` | Mobile Security & Recon | Android device integrity audit, root detection, and static APK security analyzer | `device_info()`, `audit_device()`, `audit_apk()`, `audit_package()`, `check_root()` |
|
||||
| 3 | [`sec`](./sec.md) | Cybersecurity | Port scanning, header auditing, subdomain discovery | `scan_ports()`, `audit_headers()`, `subdomains()`, `crack_md5()` |
|
||||
| 4 | [`http`](./http.md) | Networking | Web requests, REST APIs, and file downloads | `get()`, `post()`, `download()`, `status()` |
|
||||
| 5 | [`file`](./file.md) | System I/O | Read, write, append, and inspect local files | `read()`, `write()`, `append()`, `exists()`, `delete()` |
|
||||
| 6 | [`os`](./os.md) | System | Shell commands, environment variables, directories | `cmd()`, `env()`, `cwd()`, `listdir()`, `mkdir()`, `platform()` |
|
||||
| 7 | [`math`](./math.md) | Mathematics | Math functions, trigonometry, and constants | `sqrt()`, `pow()`, `abs()`, `random()`, `round()`, `pi`, `e` |
|
||||
| 8 | [`time`](./time.md) | System | Epoch time, timestamps, and execution delays | `now()`, `time()`, `sleep()` |
|
||||
| 9 | [`json`](./json.md) | Data | Parsing and serialization of JSON payloads | `parse()`, `stringify()`, `mkstring()` |
|
||||
| 10 | [`crypto`](./crypto.md) | Security | Cryptographic hashes and encoding utilities | `md5()`, `sha256()`, `sha1()`, `base64_encode()`, `base64_decode()` |
|
||||
| 11 | [`string`](./string.md) | Utilities | Advanced text manipulation and transformation | `split()`, `replace()`, `upper()`, `lower()`, `trim()`, `join()` |
|
||||
| 12 | [`sqlite`](./sqlite.md) | Database | Lightweight embedded SQL relational database | `open()`, `query()`, `execute()`, `close()` |
|
||||
| 13 | [`net`](./net.md) | Networking | Host pings, TCP port checks, and IP discovery | `ping()`, `port_open()`, `local_ip()`, `fetch()` |
|
||||
| 14 | [`thread`](./thread.md) | Concurrency | Thread spawning, worker pools, and parallel execution | `spawn()`, `join()`, `pool()`, `sleep()` |
|
||||
| 4 | [`proposal`](./proposal.md) | Fun & Cyber-Prank | Automated HTTP 500 love timeout & AI sentiment checker | `ask()`, `set_key()`, `set_system()`, `wish()`, `set_wish()` |
|
||||
| 5 | [`http`](./http.md) | Networking | Web requests, REST APIs, and file downloads | `get()`, `post()`, `download()`, `status()` |
|
||||
| 6 | [`file`](./file.md) | System I/O | Read, write, append, and inspect local files | `read()`, `write()`, `append()`, `exists()`, `delete()` |
|
||||
| 7 | [`os`](./os.md) | System | Shell commands, environment variables, directories | `cmd()`, `env()`, `cwd()`, `listdir()`, `mkdir()`, `platform()` |
|
||||
| 8 | [`math`](./math.md) | Mathematics | Math functions, trigonometry, and constants | `sqrt()`, `pow()`, `abs()`, `random()`, `round()`, `pi`, `e` |
|
||||
| 9 | [`time`](./time.md) | System | Epoch time, timestamps, and execution delays | `now()`, `time()`, `sleep()` |
|
||||
| 10 | [`json`](./json.md) | Data | Parsing and serialization of JSON payloads | `parse()`, `stringify()`, `mkstring()` |
|
||||
| 11 | [`crypto`](./crypto.md) | Security | Cryptographic hashes and encoding utilities | `md5()`, `sha256()`, `sha1()`, `base64_encode()`, `base64_decode()` |
|
||||
| 12 | [`string`](./string.md) | Utilities | Advanced text manipulation and transformation | `split()`, `replace()`, `upper()`, `lower()`, `trim()`, `join()` |
|
||||
| 13 | [`sqlite`](./sqlite.md) | Database | Lightweight embedded SQL relational database | `open()`, `query()`, `execute()`, `close()` |
|
||||
| 14 | [`net`](./net.md) | Networking | Host pings, TCP port checks, and IP discovery | `ping()`, `port_open()`, `local_ip()`, `fetch()` |
|
||||
| 15 | [`thread`](./thread.md) | Concurrency | Thread spawning, worker pools, and parallel execution | `spawn()`, `join()`, `pool()`, `sleep()` |
|
||||
|
||||
---
|
||||
*Maintained by the AiraLang Core Engineering Team. Created by Adam Eehan.*
|
||||
@@ -0,0 +1,98 @@
|
||||
# 📱 `android` Module (AiraLang Native Android Security)
|
||||
|
||||
Native Android security inspection, APK static analysis, and device hardening module engineered specifically for mobile application penetration testing and security auditing directly inside Termux and Linux environments.
|
||||
|
||||
Can be imported as either:
|
||||
```aira
|
||||
import "android";
|
||||
# or
|
||||
import "droidsec";
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🛠️ Functions & Capabilities
|
||||
|
||||
### 1. `android.device_info()`
|
||||
Returns comprehensive hardware and operating system profile details:
|
||||
- `brand`: Device brand (e.g. Redmi, Samsung, Google)
|
||||
- `model`: Device hardware model code
|
||||
- `manufacturer`: Hardware manufacturer
|
||||
- `android_version`: Android OS release version (e.g. "16")
|
||||
- `sdk_version`: Android API level integer (e.g. 36)
|
||||
- `arch`: CPU architecture (e.g. arm64-v8a)
|
||||
- `build_type`: OS build variant (e.g. "user", "userdebug")
|
||||
|
||||
```aira
|
||||
import "android";
|
||||
let dev = android.device_info();
|
||||
say "Device: " + dev.brand + " " + dev.model;
|
||||
say "Android Version: " + dev.android_version + " (API " + dev.sdk_version + ")";
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 2. `android.audit_device()`
|
||||
Performs complete security posture and integrity audit on the host device:
|
||||
- `is_rooted`: Boolean checking SU binaries (`/system/bin/su`, `/data/local/su`, Magisk paths).
|
||||
- `bootloader_locked`: Boolean evaluating `ro.boot.flash.locked`.
|
||||
- `verified_boot`: Android Verified Boot (AVB) state (e.g. "green", "yellow", "orange").
|
||||
- `is_debuggable_os`: Boolean checking if OS runs with `ro.debuggable=1`.
|
||||
- `security_score`: Calculated integer security health score (0 - 100).
|
||||
- `posture`: Overall rating: `"SECURE"`, `"MODERATE_RISK"`, or `"HIGH_RISK"`.
|
||||
- `findings`: List of security risks discovered.
|
||||
- `recommendations`: Hardening recommendations.
|
||||
|
||||
```aira
|
||||
import "android";
|
||||
let audit = android.audit_device();
|
||||
say "Device Posture: " + audit.posture;
|
||||
say "Security Score: " + audit.security_score + "/100";
|
||||
say "Root Detected: " + audit.is_rooted;
|
||||
say "Findings: " + audit.findings;
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 3. `android.audit_apk(apk_path)`
|
||||
High-speed zero-dependency static APK security auditor:
|
||||
- **Binary AXML String Extractor:** Decodes permissions and configuration flags from compiled `AndroidManifest.xml`.
|
||||
- **Dangerous Permissions Identifier:** Flags high-risk permissions (SMS, Camera, Location, Audio, Contacts).
|
||||
- **Security Misconfigurations:** Checks `debuggable`, `allowBackup`, and `usesCleartextTraffic`.
|
||||
- **DEX Bytecode Key Scanner:** Scans compiled `.dex` files for exposed cloud keys (Google API `AIza...`, AWS `AKIA...`, plaintext HTTP URLs).
|
||||
- **Signature Audit:** Checks for META-INF signatures and flags insecure Android Debug Keystores.
|
||||
|
||||
```aira
|
||||
import "android";
|
||||
let report = android.audit_apk("/sdcard/Download/target.apk");
|
||||
say "Package Name: " + report.package_name;
|
||||
say "Risk Level: " + report.risk_level;
|
||||
say "Dangerous Permissions: " + report.dangerous_permissions;
|
||||
say "Exposed Keys: " + report.hardcoded_secrets;
|
||||
say "Findings: " + report.findings;
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 4. `android.audit_package(package_name)`
|
||||
Attempts to locate and audit an installed package by name.
|
||||
|
||||
```aira
|
||||
import "android";
|
||||
let report = android.audit_package("com.whatsapp");
|
||||
say report;
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 5. `android.check_root()` / `android.is_rooted()`
|
||||
Quick boolean helper returning `true` if root / su binary is detected.
|
||||
|
||||
---
|
||||
|
||||
### 6. `android.get_prop(prop_name)`
|
||||
Queries any Android system property via `/system/bin/getprop`:
|
||||
```aira
|
||||
import "android";
|
||||
say "CPU ABI: " + android.get_prop("ro.product.cpu.abi");
|
||||
```
|
||||
Reference in new issue
Block a user