Added code to be able to (sorta) randomly generate users

main
John Hammond 2022-05-20 00:00:05 -07:00
parent ff9c90c1ad
commit 0b43d1258e
6 changed files with 889 additions and 0 deletions

164
code/data/first_names.txt Normal file
View File

@ -0,0 +1,164 @@
Abigail
Adam
Adrian
Alan
Alexander
Alexandra
Alison
Amanda
Amelia
Amy
Andrea
Andrew
Angela
Anna
Anne
Anthony
Audrey
Austin
Ava
Bella
Benjamin
Bernadette
Blake
Boris
Brandon
Brian
Cameron
Carl
Carol
Caroline
Carolyn
Charles
Chloe
Christian
Christopher
Claire
Colin
Connor
Dan
David
Deirdre
Diana
Diane
Dominic
Donna
Dorothy
Dylan
Edward
Elizabeth
Ella
Emily
Emma
Eric
Evan
Faith
Felicity
Fiona
Frank
Gabrielle
Gavin
Gordon
Grace
Hannah
Harry
Heather
Ian
Irene
Isaac
Jack
Jacob
Jake
James
Jan
Jane
Jasmine
Jason
Jennifer
Jessica
Joan
Joanne
Joe
John
Jonathan
Joseph
Joshua
Julia
Julian
Justin
Karen
Katherine
Keith
Kevin
Kimberly
Kylie
Lauren
Leah
Leonard
Liam
Lillian
Lily
Lisa
Lucas
Luke
Madeleine
Maria
Mary
Matt
Max
Megan
Melanie
Michael
Michelle
Molly
Natalie
Nathan
Neil
Nicholas
Nicola
Oliver
Olivia
Owen
Paul
Penelope
Peter
Phil
Piers
Pippa
Rachel
Rebecca
Richard
Robert
Rose
Ruth
Ryan
Sally
Sam
Samantha
Sarah
Sean
Sebastian
Simon
Sonia
Sophie
Stephanie
Stephen
Steven
Stewart
Sue
Theresa
Thomas
Tim
Tracey
Trevor
Una
Vanessa
Victor
Victoria
Virginia
Wanda
Warren
Wendy
William
Yvonne
Zoe

12
code/data/group_names.txt Normal file
View File

@ -0,0 +1,12 @@
Employees
Managers
Executives
Engineers
Researchers
Developers
Personnel
Sales
Marketing
Student
Lawyer
Operations

149
code/data/last_names.txt Normal file
View File

@ -0,0 +1,149 @@
Abraham
Allan
Alsop
Anderson
Arnold
Avery
Bailey
Baker
Ball
Bell
Berry
Black
Blake
Bond
Bower
Brown
Buckland
Burgess
Butler
Cameron
Campbell
Carr
Chapman
Churchill
Clark
Clarkson
Coleman
Cornish
Davidson
Davies
Dickens
Dowd
Duncan
Dyer
Edmunds
Ellison
Ferguson
Fisher
Forsyth
Fraser
Gibson
Gill
Glover
Graham
Grant
Gray
Greene
Hamilton
Hardacre
Harris
Hart
Hemmings
Henderson
Hill
Hodges
Howard
Hudson
Hughes
Hunter
Ince
Jackson
James
Johnston
Jones
Kelly
Kerr
King
Knox
Lambert
Langdon
Lawrence
Lee
Lewis
Lyman
MacDonald
Mackay
Mackenzie
MacLeod
Manning
Marshall
Martin
Mathis
May
McDonald
McLean
McGrath
Metcalfe
Miller
Mills
Mitchell
Morgan
Morrison
Murray
Nash
Newman
Nolan
North
Ogden
Oliver
Paige
Parr
Parsons
Paterson
Payne
Peake
Peters
Piper
Poole
Powell
Pullman
Quinn
Rampling
Randall
Rees
Reid
Roberts
Robertson
Ross
Russell
Rutherford
Sanderson
Scott
Sharp
Short
Simpson
Skinner
Slater
Smith
Springer
Stewart
Sutherland
Taylor
Terry
Thomson
Tucker
Turner
Underwood
Vance
Vaughan
Walker
Wallace
Walsh
Watson
Welch
White
Wilkins
Wilson
Wright
Young

508
code/data/passwords.txt Normal file
View File

@ -0,0 +1,508 @@
123456
12345
123456789
password
iloveyou
princess
1234567
rockyou
12345678
abc123
nicole
daniel
babygirl
monkey
lovely
jessica
654321
michael
ashley
qwerty
111111
iloveu
000000
michelle
tigger
sunshine
chocolate
password1
soccer
anthony
friends
butterfly
purple
angel
jordan
liverpool
justin
loveme
123123
football
secret
andrea
carlos
jennifer
joshua
bubbles
1234567890
superman
hannah
amanda
loveyou
pretty
basketball
andrew
angels
tweety
flower
playboy
hello
elizabeth
hottie
tinkerbell
charlie
samantha
barbie
chelsea
lovers
teamo
jasmine
brandon
666666
shadow
melissa
eminem
matthew
robert
danielle
forever
family
jonathan
987654321
computer
whatever
dragon
vanessa
cookie
naruto
summer
sweety
spongebob
joseph
junior
softball
taylor
yellow
daniela
lauren
mickey
princesa
alexandra
alexis
estrella
miguel
william
thomas
beautiful
mylove
angela
poohbear
patrick
iloveme
sakura
adrian
alexander
destiny
christian
121212
sayang
america
dancer
monica
richard
112233
princess1
555555
diamond
carolina
steven
rangers
louise
orange
789456
999999
shorty
11111
nathan
snoopy
gabriel
hunter
cherry
killer
sandra
alejandro
buster
george
brittany
alejandra
patricia
rachel
tequiero
7777777
cheese
159753
arsenal
dolphin
antonio
heather
david
ginger
stephanie
peanut
blink182
sweetie
222222
beauty
987654
victoria
honey
00000
fernando
pokemon
maggie
corazon
chicken
pepper
cristina
rainbow
kisses
manuel
myspace
rebelde
angel1
ricardo
babygurl
heaven
55555
baseball
martin
greenday
november
alyssa
madison
mother
123321
123abc
mahalkita
batman
september
december
morgan
mariposa
maria
gabriela
iloveyou2
bailey
jeremy
pamela
kimberly
gemini
shannon
pictures
sophie
jessie
hellokitty
claudia
babygirl1
angelica
austin
mahalko
victor
horses
tiffany
mariana
eduardo
andres
courtney
booboo
harley
ronaldo
iloveyou1
precious
october
inuyasha
peaches
veronica
chris
888888
adriana
cutie
james
banana
prince
friend
jesus1
crystal
celtic
zxcvbnm
edward
oliver
diana
samsung
freedom
angelo
kenneth
master
scooby
carmen
456789
sebastian
rebecca
jackie
spiderman
christopher
karina
johnny
hotmail
0123456789
school
barcelona
august
orlando
samuel
cameron
slipknot
cutiepie
monkey1
50cent
bonita
kevin
maganda
babyboy
casper
brenda
adidas
kitten
karen
mustang
isabel
natalie
cuteako
javier
789456123
123654
sarah
bowwow
portugal
laura
777777
marvin
denise
tigers
volleyball
jasper
rockstar
january
alicia
nicholas
flowers
cristian
tintin
bianca
chrisbrown
chester
101010
smokey
silver
internet
sweet
strawberry
garfield
dennis
panget
francis
cassie
benfica
love123
696969
asdfgh
lollipop
olivia
camila
qwertyuiop
superstar
harrypotter
ihateyou
charles
monique
midnight
vincent
christine
apples
scorpio
jordan23
lorena
andreea
mercedes
katherine
charmed
abigail
rafael
icecream
mexico
brianna
nirvana
aaliyah
pookie
johncena
lovelove
abcdef
benjamin
131313
gangsta
brooke
333333
hiphop
aaaaaa
mybaby
sergio
welcome
metallica
julian
travis
myspace1
babyblue
sabrina
michael1
jeffrey
stephen
love
dakota
catherine
badboy
fernanda
westlife
blondie
sasuke
smiley
jackson
simple
melanie
steaua
dolphins
roberto
fluffy
teresa
piglet
ronald
slideshow
asdfghjkl
minnie
newyork
jason
raymond
santiago
jayson
88888888
5201314
jerome
gandako
muffin
gatita
babyko
246810
sweetheart
chivas
ladybug
kitty
popcorn
alberto
valeria
cookies
leslie
jenny
nicole1
12345678910
leonardo
jayjay
liliana
dexter
232323
amores
rockon
christ
babydoll
anthony1
marcus
fatima
miamor
lover
chris1
single
eeyore
lalala
252525
scooter
natasha
skittles
brooklyn
colombia
159357
teddybear
winnie
happy
manutd
123456a
britney
katrina
christina
pasaway
cocacola
mahal
grace
linda
albert
tatiana
london
cantik
0123456
lakers
marie
teiubesc
147258369
charlotte
natalia
francisco
amorcito
smile
paola
angelito
manchester
hahaha
elephant
mommy1
shelby
147258
kelsey
genesis
amigos
snickers
xavier
turtle
marlon
linkinpark
claire
stupid
147852
marina
garcia
diego
brandy
letmein
hockey
444444
sharon
bonnie
spider
iverson
andrei

View File

@ -7,6 +7,13 @@ function CreateADGroup(){
New-ADGroup -name $name -GroupScope Global
}
function RemoveADGroup(){
param( [Parameter(Mandatory=$true)] $groupObject )
$name = $groupObject.name
Remove-ADGroup -Identity $name -Confirm:$False
}
function CreateADUser(){
param( [Parameter(Mandatory=$true)] $userObject )
@ -37,6 +44,14 @@ function CreateADUser(){
}
}
function WeakenPasswordPolicy(){
secedit /export /cfg C:\Windows\Tasks\secpol.cfg
(Get-Content C:\Windows\Tasks\secpol.cfg).replace("PasswordComplexity = 1", "PasswordComplexity = 0") | Out-File C:\Windows\Tasks\secpol.cfg
secedit /configure /db c:\windows\security\local.sdb /cfg C:\Windows\Tasks\secpol.cfg /areas SECURITYPOLICY
rm -force C:\Windows\Tasks\secpol.cfg -confirm:$false
}
WeakenPasswordPolicy
$json = ( Get-Content $JSONFile | ConvertFrom-JSON)

41
code/random_domain.ps1 Normal file
View File

@ -0,0 +1,41 @@
param( [Parameter(Mandatory=$true)] $OutputJSONFile )
$group_names = [System.Collections.ArrayList](Get-Content "data/group_names.txt")
$first_names = [System.Collections.ArrayList](Get-Content "data/first_names.txt")
$last_names = [System.Collections.ArrayList](Get-Content "data/last_names.txt")
$passwords = [System.Collections.ArrayList](Get-Content "data/passwords.txt")
$groups = @()
$users = @()
$num_groups = 10
for ( $i = 0; $i -lt $num_groups; $i++ ){
$group_name = (Get-Random -InputObject $group_names)
$group = @{ "name" = "$group_name" }
$groups += $group
$group_names.Remove($group_name)
}
$num_users = 100
for ( $i = 0; $i -lt $num_users; $i++ ){
$first_name = (Get-Random -InputObject $first_names)
$last_name = (Get-Random -InputObject $last_names)
$password = (Get-Random -InputObject $passwords)
$new_user = @{ `
"name"="$first_name $last_name"
"password"="$password"
"groups" = (Get-Random -InputObject $groups).name
}
$users += $new_user
$first_names.Remove($first_name)
$last_names.Remove($last_name)
$passwords.Remove($password)
}
ConvertTo-Json -InputObject @{
"domain"= "xyz.com"
"groups"=$groups
"users"=$users
} | Out-File $OutputJSONFile