Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2022-37703 PoC — Amanda 路径遍历漏洞

Source
Associated Vulnerability
Title:Amanda 路径遍历漏洞 (CVE-2022-37703)
Description:In Amanda 3.5.1, an information leak vulnerability was found in the calcsize SUID binary. An attacker can abuse this vulnerability to know if a directory exists or not anywhere in the fs. The binary will use `opendir()` as root directly without checking the path, letting the attacker provide an arbitrary path.
Description
Amanda Information Disclosure bug.
Readme
> [Suggested description]
> In Amanda 3.5.1, an information leak vulnerability was found in
> calcsize SUID binary. The attacker can abuse the vulnerability to know
> if a directory exist or not anywhere in the fs. The binary will use
> `opendir()` as root directly without checking the path, letting the
> attacker provide an arbitrary path. The attacker needs to be the
> `backup` user to be able to run calcsize binary.
>
> ------------------------------------------
>
> [Additional Information]
> The PoC is very simple you just have to run the binary like this:
> ./calcsize MAHER dir1 -X [directory]
> if the binary did not generate any output then the directory is available.
> If it's not available it will say that it is not available like this:
>
> backup@maher:/home/maher/pwn/ubuntu/userland/suid/amanda/sec$ ./calcsize MAHER dir1 -X /etcc
> /etcc/.: No such file or directory
>
> ------------------------------------------
>
> [Vulnerability Type]
> Insecure Permissions
>
> ------------------------------------------
>
> [Vendor of Product]
> Amanda
>
> ------------------------------------------
>
> [Affected Product Code Base]
> calcsize - 3.5.1
>
> ------------------------------------------
>
> [Affected Component]
> Component: calcsize SUID binary.
> C file: calcsize.c
> Line: 435 `if((d = opendir(dirname)) == NULL) {`
>
> ------------------------------------------
>
> [Attack Type]
> Local
>
> ------------------------------------------
>
> [Impact Information Disclosure]
> true
>
> ------------------------------------------
>
> [Attack Vectors]
> To exploit the vulnerability the attacker need to have access to the calcsize binary (one of the amanda packages being installed).
>
> ------------------------------------------
>
> [Reference]
> http://www.amanda.org/
>
> ------------------------------------------
>
> [Discoverer]
> Maher Azzouzi
File Snapshot

[4.0K] /data/pocs/5633260077c878eecd3138946b899227b13f1932 └── [1.8K] README.md 0 directories, 1 file
Shenlong Bot has cached this for you
Remarks
    1. It is advised to access via the original source first.
    2. Local POC snapshots are reserved for subscribers — if the original source is unavailable, the local mirror is part of the paid plan.
    3. Mirroring, verifying, and maintaining this POC archive takes ongoing effort, so local snapshots are a paid feature. Your subscription keeps the archive online — thank you for the support. View subscription plans →