Web
Nmap discovered a Web service on the port 80
of the 192.168.209.211
host.
The running service is Apache httpd 2.4.29 ((Ubuntu))
┌──(kali㉿kali)-[~/PEN-200/PG_PLAY/election1]
└─$ curl -I -X OPTIONS http://$IP/
HTTP/1.1 200 OK
Date: Tue, 01 Jul 2025 18:09:07 GMT
Server: Apache/2.4.29 (Ubuntu)
Allow: POST,OPTIONS,HEAD,GET
Content-Length: 0
Content-Type: text/html
┌──(kali㉿kali)-[~/PEN-200/PG_PLAY/election1]
└─$ curl -I http://$IP/
HTTP/1.1 200 OK
Date: Tue, 01 Jul 2025 18:09:09 GMT
Server: Apache/2.4.29 (Ubuntu)
Last-Modified: Sun, 20 Oct 2019 15:04:12 GMT
ETag: "2aa6-59558e1434548"
Accept-Ranges: bytes
Content-Length: 10918
Vary: Accept-Encoding
Content-Type: text/html
Webroot
It’s the default Apache installation page.
Fuzzing
┌──(kali㉿kali)-[~/PEN-200/PG_PLAY/election1]
└─$ ffuf -c -w /usr/share/wordlists/seclists/Discovery/Web-Content/big.txt -u http://$IP/FUZZ -ic -e .html,.txt,.php
________________________________________________
:: Method : GET
:: URL : http://192.168.209.211/FUZZ
:: Wordlist : FUZZ: /usr/share/wordlists/seclists/Discovery/Web-Content/big.txt
:: Extensions : .html .txt .php
:: Follow redirects : false
:: Calibration : false
:: Timeout : 10
:: Threads : 40
:: Matcher : Response status: 200-299,301,302,307,401,403,405,500
________________________________________________
.htaccess [Status: 403, Size: 280, Words: 20, Lines: 10, Duration: 19ms]
.htaccess.html [Status: 403, Size: 280, Words: 20, Lines: 10, Duration: 19ms]
.htaccess.txt [Status: 403, Size: 280, Words: 20, Lines: 10, Duration: 20ms]
.htaccess.php [Status: 403, Size: 280, Words: 20, Lines: 10, Duration: 19ms]
.htpasswd [Status: 403, Size: 280, Words: 20, Lines: 10, Duration: 19ms]
.htpasswd.html [Status: 403, Size: 280, Words: 20, Lines: 10, Duration: 19ms]
.htpasswd.php [Status: 403, Size: 280, Words: 20, Lines: 10, Duration: 20ms]
.htpasswd.txt [Status: 403, Size: 280, Words: 20, Lines: 10, Duration: 22ms]
election [Status: 301, Size: 321, Words: 20, Lines: 10, Duration: 21ms]
index.html [Status: 200, Size: 10918, Words: 3499, Lines: 376, Duration: 21ms]
javascript [Status: 301, Size: 323, Words: 20, Lines: 10, Duration: 21ms]
phpinfo.php [Status: 200, Size: 95498, Words: 4715, Lines: 1170, Duration: 27ms]
phpmyadmin [Status: 301, Size: 323, Words: 20, Lines: 10, Duration: 20ms]
robots.txt [Status: 200, Size: 30, Words: 1, Lines: 5, Duration: 19ms]
robots.txt [Status: 200, Size: 30, Words: 1, Lines: 5, Duration: 21ms]
server-status [Status: 403, Size: 280, Words: 20, Lines: 10, Duration: 20ms]
:: Progress: [81912/81912] :: Job [1/1] :: 1587 req/sec :: Duration: [0:00:55] :: Errors: 0 ::
┌──(kali㉿kali)-[~/PEN-200/PG_PLAY/election1]
└─$ ffuf -c -w /usr/share/wordlists/seclists/Discovery/Web-Content/directory-list-lowercase-2.3-medium.txt -u http://$IP/FUZZ/ -ic
________________________________________________
:: Method : GET
:: URL : http://192.168.209.211/FUZZ/
:: Wordlist : FUZZ: /usr/share/wordlists/seclists/Discovery/Web-Content/directory-list-lowercase-2.3-medium.txt
:: Follow redirects : false
:: Calibration : false
:: Timeout : 10
:: Threads : 40
:: Matcher : Response status: 200-299,301,302,307,401,403,405,500
________________________________________________
[Status: 200, Size: 10918, Words: 3499, Lines: 376, Duration: 21ms]
icons [Status: 403, Size: 280, Words: 20, Lines: 10, Duration: 23ms]
javascript [Status: 403, Size: 280, Words: 20, Lines: 10, Duration: 20ms]
election [Status: 200, Size: 7003, Words: 1676, Lines: 173, Duration: 266ms]
phpmyadmin [Status: 200, Size: 10531, Words: 504, Lines: 26, Duration: 408ms]
server-status [Status: 403, Size: 280, Words: 20, Lines: 10, Duration: 19ms]
:: Progress: [207630/207630] :: Job [1/1] :: 1923 req/sec :: Duration: [0:02:02] :: Errors: 0 ::
/election/
/phpinfo.php
/phpmyadmin/
/robots.txt
/robots.txt
Only
/election/
endpoint is valid.
/phpmyadmin/
phpMyAdmin instance at the
/phpmyadmin/
endpoint.
No credential is known at this time.
/phpinfo.php
DOCUMENT_ROOT
is set to /var/www/html
/election/
Endpoint
eLection instance by Tripath Project.
Source code is available for review.
The latest version is
2.0
and was released over 7 years ago.
Checking the Candidates section reveals a single user
It appears to be fetched from a database, strongly suggesting a potential SQL injection vulnerability.
Fuzzing /election/
Endpoint
┌──(kali㉿kali)-[~/PEN-200/PG_PLAY/election1]
└─$ ffuf -c -w /usr/share/wordlists/seclists/Discovery/Web-Content/big.txt -u http://$IP/election/FUZZ -ic -e .html,.txt,.php
________________________________________________
:: Method : GET
:: URL : http://192.168.209.211/election/FUZZ
:: Wordlist : FUZZ: /usr/share/wordlists/seclists/Discovery/Web-Content/big.txt
:: Extensions : .html .txt .php
:: Follow redirects : false
:: Calibration : false
:: Timeout : 10
:: Threads : 40
:: Matcher : Response status: 200-299,301,302,307,401,403,405,500
________________________________________________
admin [Status: 301, Size: 327, Words: 20, Lines: 10, Duration: 25ms]
card.php [Status: 200, Size: 1935, Words: 215, Lines: 2, Duration: 22ms]
data [Status: 301, Size: 326, Words: 20, Lines: 10, Duration: 21ms]
index.php [Status: 200, Size: 7003, Words: 1676, Lines: 173, Duration: 27ms]
js [Status: 301, Size: 324, Words: 20, Lines: 10, Duration: 22ms]
languages [Status: 301, Size: 331, Words: 20, Lines: 10, Duration: 21ms]
lib [Status: 301, Size: 325, Words: 20, Lines: 10, Duration: 21ms]
media [Status: 301, Size: 327, Words: 20, Lines: 10, Duration: 20ms]
themes [Status: 301, Size: 328, Words: 20, Lines: 10, Duration: 19ms]
:: Progress: [81912/81912] :: Job [1/1] :: 1980 req/sec :: Duration: [0:00:48] :: Errors: 0 ::
/admin/
/card.php
/card.php
Endpoint
The
/election/card.php
endpoint hosts a binary blob
Decoding
It was encoded twice with binary format.
The decode result is a credential;
1234
:Zxc123!@#
Admin Panel
Admin panel is available at the
/admin/
endpoint.
The default credential is 1234
:1234
But a valid credential is already found above; 1234
:Zxc123!@#
Successfully authenticated.
Version Information
Version information is disclosed at the Settings menu;
2.0
Vulnerabilities
┌──(kali㉿kali)-[~/PEN-200/PG_PLAY/election1/source_code]
└─$ searchsploit eLection 2.0
------------------------------------ ---------------------------------
Exploit Title | Path
------------------------------------ ---------------------------------
eLection 2.0 - 'id' SQL Injection | php/webapps/48122.txt
------------------------------------ ---------------------------------
Shellcodes: No Results
Papers: No Results
eLection 2.0
suffers from an authenticated SQL injection; CVE-2020-9340