Skip to content

Commit

Permalink
5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
rev1si0n committed Sep 17, 2023
1 parent 9dccd71 commit 37dab39
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 55 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
5.2
* 修复 Selector 包含的 False 值时无效的问题。感谢 ThanhPham
* 使用 LAMDA 时可同时使用其他无障碍服务(仅限安卓 >= 8.0)

5.0
版本 5.0 和 3.0 没有太大的本质区别,修复了一个较为严重的漏洞以及一些小问题,
这个漏洞可能会在任意情况下导致设备被入侵。在服务内部权限上也做了一些调整,
Expand Down
10 changes: 2 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ LAMDA 是一个用于逆向及自动化的辅助框架,它设计为减少安
* 界面布局检视
* 无线连接内置 root 权限的 WIFI ADB
* 支持自定义启动配置
* 支持模拟器及真机、云手机/无头开发板、redroid (仅ARM)
* 支持模拟器及真机、云手机/无头开发板、Redroid
* 支持安卓 6.0 (M, API 23) - 13 (T, API 33)
* 支持 WSA (Windows Subsystem for Android™️)
* 支持 UDP 协议代理(socks5 UDP 模式)
Expand Down Expand Up @@ -50,12 +50,6 @@ LAMDA 是一个用于逆向及自动化的辅助框架,它设计为减少安

![动图演示](image/demo.gif)

## 无视恶意软件对抗

MOMO (vvb2060) 是我们认为目前最强的ROOT特征检测软件,如 MOMO 所说:我们的目标是提高用户的知识水平。注意这段描述的功能**并不属于 LAMDA 框架的能力范畴**,它是由 LAMDA 和**未公开**的基建项目共同组成,我们只是以此来引出:你可以相信 LAMDA。

![反检测动图演示](image/detection.gif)

## 一键中间人流量分析

支持常规以及国际APP流量分析,DNS流量分析,得益于 [mitmproxy flow hook](https://docs.mitmproxy.org/stable/api/events.html),你可以对任何请求做到最大限度的掌控,mitmproxy 功能足够丰富,你可以使用 Python 脚本实时修改或者捕获应用的请求,也可以通过其 `Export` 选项导出特定请求的 `curl` 命令或者 `HTTPie` 命令,分析重放、拦截修改、功能组合足以替代你用过的任何此类商业/非商业软件。如果你仍不清楚 mitmproxy 是什么以及其具有的能力,请务必先查找相关文档,因为 LAMDA 将会使用 mitmproxy 为你展现应用请求。
Expand Down Expand Up @@ -254,7 +248,7 @@ emulator -avd Pixel_5_API_29 -partition-size 2048 -no-snapshot-load

> Redroid (android in docker)
注意目前**仅支持基于 ARM (aarch64) 宿主机**的 Redroid,你可以通过命令 `uname -m` 来检查。
注意目前 LAMDA **3.0****5.0** **仅支持基于 ARM (aarch64) 宿主机** Redroid,**7.0** 才支持 x86 版本的 Redroid,你可以通过命令 `uname -m` 来检查。

如果使用的是 Redroid (android in docker),以官方建议的 `Ubuntu 20.04` 为例,首先安装 linux-modules-extra 相关模块,(注意下列方法可能不适合其他 Linux 发行版,如果你不熟悉 Linux,我们不太建议你继续下面的操作)。

Expand Down
Binary file removed image/detection.gif
Binary file not shown.
2 changes: 1 addition & 1 deletion lamda/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
#
# Distributed under MIT license.
# See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
__version__ = "5.0"
__version__ = "5.2"
10 changes: 8 additions & 2 deletions lamda/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def corner(b, position):

ApplicationInfo = protos.ApplicationInfo
# uiautomator types
Selector = protos.Selector
_Selector = protos.Selector
Bound = protos.Bound
Point = protos.Point

Expand Down Expand Up @@ -239,6 +239,12 @@ def to_dict(prot):
return json.loads(r)


def Selector(**kwargs):
""" Selector wrapper """
sel = _Selector(**kwargs, fields=kwargs.keys())
return sel


class BaseCryptor(object):
def __str__(self):
return "{}".format(self.__class__.__name__)
Expand Down Expand Up @@ -332,7 +338,7 @@ def __init__(self, stub, selector):
UiAutomator 子接口,用来模拟出实例的意味
"""
self._selector = selector
self.selector = protos.Selector(**selector)
self.selector = Selector(**selector)
self.stub = stub
def __str__(self):
selector = ", ".join(["{}={}".format(k, v) \
Expand Down
56 changes: 12 additions & 44 deletions lamda/rpc/uiautomator.proto
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,7 @@ message Selector {
uint32 instance = 26;
repeated string childOrSibling = 27;
repeated Selector childOrSiblingSelector = 28;
repeated string fields = 50;
}

message DeviceInfo {
Expand All @@ -425,92 +426,59 @@ message DeviceInfo {
}

message SelectorTakeScreenshotRequest {
oneof _selector {
Selector selector = 1;
string object = 2;
}
Selector selector = 1;
uint32 quality = 3;
}
message SelectorSetTextRequest {
oneof _selector {
Selector selector = 1;
string object = 2;
}
Selector selector = 1;
string text = 3;
}
message SelectorClickRequest {
oneof _selector {
Selector selector = 1;
string object = 2;
}
Selector selector = 1;
Corner corner = 3;
}
message SelectorOnlyRequest {
oneof _selector {
Selector selector = 1;
string object = 2;
}
Selector selector = 1;
}
message SelectorDragToRequest {
oneof _selector {
Selector selector = 1;
string object = 2;
}
Selector selector = 1;
oneof _target {
Selector target = 3;
Point point = 4;
}
uint32 step = 5;
}
message SelectorScrollToRequest {
oneof _selector {
Selector selector = 1;
string object = 2;
}
Selector selector = 1;
oneof _target {
Selector target = 3;
Point point = 4;
}
bool vertical = 5;
}
message SelectorWaitRequest {
oneof _selector {
Selector selector = 1;
string object = 2;
}
Selector selector = 1;
uint32 timeout = 3;
}
message SelectorSwipeRequest {
oneof _selector {
Selector selector = 1;
string object = 2;
}
Selector selector = 1;
Direction direction = 3;
uint32 step = 4;
}
message SelectorFlingRequest {
oneof _selector {
Selector selector = 1;
string object = 2;
}
Selector selector = 1;
bool vertical = 3;
uint32 maxSwipes = 4;
}
message SelectorScrollRequest {
oneof _selector {
Selector selector = 1;
string object = 2;
}
Selector selector = 1;
bool vertical = 3;
uint32 maxSwipes = 4;
uint32 step = 5;
}

message SelectorPinchRequest {
oneof _selector {
Selector selector = 1;
string object = 2;
}
Selector selector = 1;
uint32 percent = 3;
uint32 step = 4;
}
Expand Down

0 comments on commit 37dab39

Please sign in to comment.