PowerShellEmpire / PowerTools

PowerTools is a collection of PowerShell projects with a focus on offensive operations.
Other
2.05k stars 812 forks source link

PowerUp WebConfig Misparsed #63

Closed Meatballs1 closed 8 years ago

Meatballs1 commented 8 years ago

If the connection string doesn't have a user/password we get the following result:

user   : True
pass   : 1800
dbserv : BLAH,PORT
vdir   : PATH
path   : PATH\Web.config
encr   : No

from:

<add name="NAME" connectionString="Data Source=HOST,PORT;Initial Catalog=SOMETHING;Persist Security Info=True;Connection Timeout=1800; Workstation ID=SOMETHING; Max Pool Size=20" />
Meatballs1 commented 8 years ago

Running as non-UAC (presumably I cant read the files?):

[*] Checking for encrypted application pool and virtual directory passwords...

user    : System.Object[]
pass    : System.Object[]
type    : Application Pool
vdir    : NA
apppool :

user    : System.Object[]
pass    : System.Object[]
type    : Application Pool
vdir    : NA
apppool : . )

user    : System.Object[]
pass    : System.Object[]
type    : Application Pool
vdir    : NA
apppool : Description: Cannot read configuration file due to insufficient permissions

user    : System.Object[]
pass    : System.Object[]
type    : Application Pool
vdir    : NA
apppool : ERROR ( message:Configuration error

user    : System.Object[]
pass    : System.Object[]
type    : Application Pool
vdir    : NA
apppool : Filename: redirection.config

user    : System.Object[]
pass    : System.Object[]
type    : Application Pool
vdir    : NA
apppool : Line Number: 0

user    : System.Object[]
pass    : System.Object[]
type    : Virtual Directory
vdir    :
apppool : NA

user    : System.Object[]
pass    : System.Object[]
type    : Virtual Directory
vdir    : . )
apppool : NA

user    : System.Object[]
pass    : System.Object[]
type    : Virtual Directory
vdir    : Description: Cannot read configuration file due to insufficient permissions
apppool : NA

user    : System.Object[]
pass    : System.Object[]
type    : Virtual Directory
vdir    : ERROR ( message:Configuration error
apppool : NA

user    : System.Object[]
pass    : System.Object[]
type    : Virtual Directory
vdir    : Filename: redirection.config
apppool : NA

user    : System.Object[]
pass    : System.Object[]
type    : Virtual Directory
vdir    : Line Number: 0
apppool : NA
HarmJ0y commented 8 years ago

Did this fix it? https://github.com/PowerShellEmpire/PowerTools/commit/c1bb0ad126bd58a546798e07e0342bb6a5d35fbc

HarmJ0y commented 8 years ago

Hmmmm? :)

Meatballs1 commented 8 years ago

I think it made it better, or less buggy output! I've been super busy and not in that environment anymore sorry!!

HarmJ0y commented 8 years ago

Cool, wanted to check. I'm going to mark this as closed- please feel free to reopen if you find additional issues with it on future gigs.