HA4T

v0.1.6 suspicious
7.0
High Risk

跨平台的UI自动化框架,适用于混合型app

🤖 AI Analysis

Final verdict: SUSPICIOUS

The package exhibits significant risks related to shell execution and moderate risks regarding network calls and obfuscation. These factors suggest potential vulnerabilities that could be exploited, though there is no direct evidence of malicious intent.

  • High shell risk due to use of shell=True
  • Moderate network risk indicating possible internal or external communications
  • Potential obfuscation techniques used
Per-check LLM notes
  • Network: Local network calls may be intended for internal communication but could also indicate an attempt to bypass security measures.
  • Shell: Use of shell=True with subprocess.run can lead to command injection vulnerabilities and suggests potential for executing arbitrary commands.
  • Obfuscation: The presence of base64 decoding suggests possible obfuscation, but it could also be for legitimate image handling purposes.
  • Credentials: No clear patterns indicative of credential harvesting were detected.
  • Metadata: The author has only one package on PyPI, which may indicate a new or less active account.

🔬 Heuristic Checks

Outbound Network Calls score 6.0

Found 4 network call pattern(s)

  • """ return requests.get(f"{self.ws_url}/json").json() class Element: def _
  • status_code = requests.get(f"http://localhost:{port}/json").status_code
  • "" try: requests.get(f"http://localhost:{port}/json", timeout=timeout)
  • process.DEVNULL) requests.get(f"http://localhost:{port}/json", timeout=timeout)
Code Obfuscation score 4.0

Found 2 obfuscation pattern(s)

  • shot") # png data = base64.b64decode(data["result"]["data"]) img = PIL.Image.open(io.Byt
  • me try: decoded = base64.b64decode(data) img_path.write_bytes(decoded) print(f"
Shell / Subprocess Execution score 10.0

Found 6 shell execution pattern(s)

  • # 执行命令 try: subprocess.run(cmd, shell=True, check=True) log_out(f"文件{root_path
  • h.basename(dir_path) subprocess.run( ["tidevice", '-u', _CF.DEVICE_SERIAL, 'fsync',
  • _list(dir_path): subprocess.run(["tidevice", '-u', _CF.DEVICE_SERIAL, 'fsync', "-B", _CF.APP
  • eck=True) else: subprocess.run(f"adb -s {_CF.DEVICE_SERIAL} push {dir_path} /sdcard/", shel
  • F.PLATFORM == "ios": subprocess.run(["tidevice", '-u', _CF.DEVICE_SERIAL, 'fsync', "-B", _CF.APP
  • eck=True) else: subprocess.run(f"adb -s {_CF.DEVICE_SERIAL} push {file_path} /sdcard/", she
Credential Harvesting

No credential harvesting patterns detected

Typosquatting

No typosquatting candidates detected

Registered Email Domain

Email domain looks legitimate: exuils.com>

Suspicious Page Links

All external links appear legitimate

Git Repository History

Repository exuils/HA4T appears legitimate

Maintainer History score 2.0

1 maintainer concern(s) found

  • Author "caishilong" appears to have only 1 package on PyPI (new or inactive account)
Known CVE Vulnerabilities

No known vulnerabilities found in OSV database.

💡 AI App Starter Prompt

Use this prompt to build a project with HA4T
构建一个名为"AppInspector"的小工具,它使用Python的HA4T库来自动化检测和报告混合型应用程序(例如那些同时包含原生组件和Web视图的Android或iOS应用)中的UI元素。这个工具将帮助开发者快速识别应用中不同类型的UI组件,并生成详细的报告,包括每个组件的位置、大小以及其可交互性等信息。

具体步骤如下:
1. 设计并实现一个简单的用户界面,允许用户输入他们想要检查的应用包名或URL。
2. 使用HA4T库启动指定的应用程序,并通过跨平台的UI自动化技术遍历该应用的所有UI元素。
3. 对于每个找到的UI元素,收集相关信息如类型(按钮、文本框、列表项等)、位置、尺寸等,并评估它们是否可以被点击或输入。
4. 将收集到的数据整理成结构化的格式,并以HTML或Markdown文档的形式输出完整的报告。
5. 可选地,添加错误处理机制,确保在遇到不可预料的情况时能够优雅地失败。

建议功能:
- 支持多语言界面,让用户可以根据自己的偏好选择。
- 提供图形化结果展示,使得报告更加直观易懂。
- 实现自动保存功能,每次运行后都能将生成的报告保存下来。
- 添加进度条显示,让用户知道当前的处理状态。

在整个过程中,HA4T库主要被用来进行UI元素的识别和操作。利用它的能力,我们能够有效地模拟用户的操作行为,从而深入地探索应用内部的细节。