Merge pull request #999 from ItsIgnacioPortal/RouterCredentials

feat(passwords): Added router default users and passwords

Source: https://portforward.com/

```
import os
from bs4 import BeautifulSoup

invalidValues = ["none", "N/A", "blank", "user created", "password changes when reset", "none; created during initial setup", "PrintedOnRouterLabel", "provided by ISP"]
invalidKeywords = ["none", "leave blank", "n/a", "blank", "found by", "found on", "printed on", "configured during", "create", "last", "located", "on ", "sticker on", "refer to"]

def extract_credentials(file_path):
	with open(file_path, 'r') as file:
		content = file.read()
		soup = BeautifulSoup(content, 'html.parser')
		table = soup.find('table')
		if table:
			model = table.find('th').text.strip().lower().replace('model', '').strip().replace(' ', '-').replace('/', '-')
			usernames = set()
			passwords = set()
			for row in table.find_all('tr')[1:]:
				cols = row.find_all('td')
				username = cols[1].text.strip()
				password = cols[2].text.strip()

				if username not in invalidValues:
					addUsername = True
					tempusername = username.lower()

					for keyword in invalidKeywords:
						if tempusername.startswith(keyword):
							addUsername=False
							break

					if addUsername:
						usernames.add(username)

				if password not in invalidValues:
					addPassword = True
					temppassword = password.lower()
					for keyword in invalidKeywords:
						if temppassword.startswith(keyword):
							addPassword=False
							break

					if addPassword:
						passwords.add(password)

			return model, sorted(usernames), sorted(passwords)
		else:
			return None, None, None

def save_credentials(model, usernames, passwords, output_dir):
	if model and usernames and passwords:
		user_file_path = os.path.join(output_dir, f'{model}_default-users.txt')
		pass_file_path = os.path.join(output_dir, f'{model}_default-passwords.txt')
		with open(user_file_path, 'w') as user_file:
			user_file.write('\n'.join(usernames))
		with open(pass_file_path, 'w') as pass_file:
			pass_file.write('\n'.join(passwords))

def process_files(input_dir, output_dir):
	for file_name in os.listdir(input_dir):
		print(f'Processing file {file_name}')
		file_path = os.path.join(input_dir, file_name)
		model, usernames, passwords = extract_credentials(file_path)
		save_credentials(model, usernames, passwords, output_dir)

# Input directory containing the text files
input_dir = "C:\\Users\\User\\Desktop\\out\\portforward.com"
# Output directory where the output files will be saved
output_dir = "C:\\Users\\User\\Github\\SecLists\\Passwords\\Default-Credentials\\Routers"
process_files(input_dir, output_dir)
```
This commit is contained in:
g0tmi1k
2024-04-05 15:26:08 +01:00
committed by GitHub
466 changed files with 1158 additions and 0 deletions
@@ -0,0 +1,168 @@
0000
0123456789
0P3N
1
123
1234
12345
123456
12345678
123456789
1234567890
3bb
3play
3UJUh2VemEfUtesEchEC2d2e
4135279
@HuaweiHgw
abcd12345
access key on label
addon
admim
admin
Admin
admin01
admin1
Admin123
admin_Ultimate
adminHW
Administrator
administrator
adminpldt
admintelecom
advanced
airlive
aisadmin
atlantis
attadmin
Aztechadmin
barricade
bayandsl
belong
bEn2o#US9s
bezeqint
broadband
BSNL1234
cableroot
cciadmin
changeme
cht
chtnvdsl
cisco
Cl@r0
comcast
conexant
conf
Conf
ctAdmin
cusadmin
cytauser
default
digi
digicel
draadloos
DSL
dsmart
Enduser
enduser
entel
epicrouter
Epuser
Expert
fastweb
fritzfonbox
geekadsl
Gponinstalador@123
gttuser
guest
Guest
gvt12345
hamlet
highspeed
home
homebro
HPN
hsparouter
HuaweiUser
ipbbx
kpn
KPN
kpn-adsl
lightweight
linksys
liveboxfibra
loqal
LTEcpe
MaxisBB
menara
meo
motorola
Motorola
mtn
mysweex
NEMONTadmin
netis
NOLOGIN
on
OP3N
oper1234
operator
optus
ovislink
password
password
password1
pentagram
pfsense
primus
public
pz938qd6
pz938qdx
root
router
scmcadmin
SerialNumber
sitecom
sky
smartbro
smc
smcadmin
SpeedStream
superonline
superu
superuser
support
surecom
sweex
tattoo@home
Techni1789#
telecomadmin
telekom
telekomst
TELMEX
telstra
Telstra
telus
test
tmadmin
tot
trendchip
trustpower
ttnet
ubnt
unknown
user
User
useradmin
userEp
utstar
VF-IRhg556
vivo12345
vodafone
voo
webadmin
Xavi
zain
zhone
ziggo
zoomadsl
ZXDSL
@@ -0,0 +1,2 @@
1
admin
@@ -0,0 +1 @@
admin
@@ -0,0 +1,3 @@
NOLOGIN
admin
user
@@ -0,0 +1,2 @@
NOLOGIN
admin
@@ -0,0 +1 @@
3bb
@@ -0,0 +1 @@
admin
@@ -0,0 +1,2 @@
1234
admin
@@ -0,0 +1 @@
admin
@@ -0,0 +1,11 @@
# Router default passwords and usernames
Always try using a blank username or a blank password, in combination with all the possible usernames / passwords.
Try using the full MAC address of the device as a password.
Try using the same password as that of the Wi-Fi.
If you have physical access to the router, look for any stickers with passwords on them: anything labeled `key`, `wireless key`, `WPA Key`, `password`, etc.
Try using the serial number found on bottom of the router as a password.
@@ -0,0 +1,3 @@
admin
epicrouter
password
@@ -0,0 +1 @@
admin
@@ -0,0 +1 @@
admin
@@ -0,0 +1 @@
admin
@@ -0,0 +1,6 @@
NOLOGIN
admin
password
password1
telus
unknown
@@ -0,0 +1,2 @@
NOLOGIN
admin
@@ -0,0 +1,2 @@
3play
admin
@@ -0,0 +1,2 @@
3play
admin
@@ -0,0 +1,3 @@
1234
Admin
addon
@@ -0,0 +1,3 @@
Admin
addon
admin
@@ -0,0 +1 @@
admin
@@ -0,0 +1 @@
admin
@@ -0,0 +1,2 @@
admin
unknown
@@ -0,0 +1 @@
admin
@@ -0,0 +1,2 @@
1234
airlive
@@ -0,0 +1 @@
admin
@@ -0,0 +1,2 @@
1234
admin
@@ -0,0 +1 @@
admin
@@ -0,0 +1 @@
ubnt
@@ -0,0 +1,2 @@
superonline
unknown
@@ -0,0 +1 @@
admin
@@ -0,0 +1,3 @@
admin
conf
user
@@ -0,0 +1,3 @@
TELMEX
admin
user
@@ -0,0 +1 @@
admin
@@ -0,0 +1 @@
admin
@@ -0,0 +1 @@
admin
@@ -0,0 +1 @@
admin
@@ -0,0 +1 @@
admin
@@ -0,0 +1,2 @@
cableroot
user
@@ -0,0 +1,2 @@
admin
user
@@ -0,0 +1 @@
admin
@@ -0,0 +1 @@
admin
@@ -0,0 +1 @@
admin
@@ -0,0 +1,6 @@
admin
kpn-adsl
liveboxfibra
sky
telstra
vivo12345
@@ -0,0 +1,3 @@
admin
kpn
liveboxfibra
@@ -0,0 +1,6 @@
1234
admin
motorola
password
the full MAC address
unknown
@@ -0,0 +1,5 @@
Admin
NET_(plus the last six characters of the MAC address)
admin
cusadmin
unknown
@@ -0,0 +1 @@
admin
@@ -0,0 +1 @@
admin
@@ -0,0 +1,2 @@
admin
password
@@ -0,0 +1,2 @@
admin
support
@@ -0,0 +1 @@
epicrouter
@@ -0,0 +1 @@
admin
@@ -0,0 +1,5 @@
Admin
admin
epicrouter
password
root
@@ -0,0 +1,3 @@
Admin
admin
root
@@ -0,0 +1,3 @@
admin
atlantis
password
@@ -0,0 +1,2 @@
admin
atlantis
@@ -0,0 +1 @@
oper1234
@@ -0,0 +1 @@
operator
@@ -0,0 +1,2 @@
1
admin
@@ -0,0 +1 @@
admin
@@ -0,0 +1,4 @@
Aztechadmin
admin
password
user
@@ -0,0 +1,2 @@
admin
user
@@ -0,0 +1,2 @@
admin
hsparouter
@@ -0,0 +1,2 @@
admin
user
@@ -0,0 +1,4 @@
1234
123456789
admin
adminpldt
@@ -0,0 +1,2 @@
admin
adminpldt
@@ -0,0 +1 @@
gvt12345
@@ -0,0 +1 @@
admin
@@ -0,0 +1,2 @@
NEMONTadmin
admin
@@ -0,0 +1 @@
password
@@ -0,0 +1 @@
admin
@@ -0,0 +1,3 @@
admin
password
unknown
@@ -0,0 +1 @@
User
@@ -0,0 +1,2 @@
admin
password
@@ -0,0 +1,2 @@
Admin
admin
@@ -0,0 +1 @@
admin
@@ -0,0 +1,2 @@
admin
unknown
@@ -0,0 +1 @@
admin
@@ -0,0 +1 @@
admin
@@ -0,0 +1,4 @@
admin
password
support
user
@@ -0,0 +1,4 @@
admim
admin
support
user
@@ -0,0 +1,2 @@
admin
password
@@ -0,0 +1,2 @@
Admin
admin
@@ -0,0 +1 @@
admin
@@ -0,0 +1 @@
admin
@@ -0,0 +1,2 @@
admin
password
@@ -0,0 +1 @@
admin
@@ -0,0 +1,2 @@
admin
password
@@ -0,0 +1,2 @@
admin
root
@@ -0,0 +1 @@
support
@@ -0,0 +1,2 @@
admin
support
@@ -0,0 +1 @@
1234
@@ -0,0 +1 @@
admin

Some files were not shown because too many files have changed in this diff Show More