Jump to content

All browser password cleanup (IE,Chrome,Mozilla,Opera) and Windows Credentials


Recommended Posts

Hello gents,

Need help in clearing passwords from all browsers and windows credentials. Below is whats required :

Requirement : Clear saved passwords from all browsers and windows credentials

Functionality:

1) Should detect diff browsers like Opera,Mozilla,chrome and IE and then only run command to clear saved password, if browsers are present

2) Clear Windows credentials in control panel (Win 7 and Win 10)

3) Should detect OS: Win 7 and Win 10

 

Issues:

1) Does not seem there is any command line to delete saved passwords in Chrome, Firefox and Opera....(IE does have)

2) Due to which ..have to get Class , instance  and Control ID to get hold of Advanced option to delete all saved passwords at once

3) Deleting Firefox , chrome and opera folders in user profile will also delete some useful information...therefore we cannot delete those folders

I do started creating script but getting no where, any help would be appreciated

#include <MsgBoxConstants.au3>
#include <AutoItConstants.au3>
;~ SplashTextOn("Cleanup Tool", "You have initiated cleanup tool, this will clear Internet explorer, Mozilla Firefox and Chrome cookies and Passwords. Please save your work and close all these browsers", -1, -1, -1, -1, $DLG_TEXTLEFT, "", 16)
;~ Sleep(10000)
;~ SplashOff()


;~ Local $test
;~ local $Mozilla_Local = "C:\Users\" & @UserName & "\AppData\Local\Mozilla\Firefox\Profiles\"
;~ local $Mozilla_Roaming = "C:\Users\" & @UserName & "\AppData\Roaming\Mozilla\Firefox\Profiles\"
;~ local $Mozilla_profile = "C:\Users\" & @UserName & "\AppData\Roaming\Mozilla\Firefox\profiles.ini"
;~ local $Chrome_Local = "C:\Users\" & @UserName & "\AppData\Local\Google\Chrome\User data\"



;~ ProcessClose("Chrome.exe")
;~ sleep(5000)
;~ DirRemove ($Chrome_Local,1)
;~ DirCreate ($Chrome_Local)
;~ MsgBox ($MB_YESNO,"Cache Delete Program", "This will detele all browser cache and password stored in them...do you want to continue...?",10)


;~ Run("RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255")

;~ ProcessClose("Firefox.exe")
;~ sleep(5000)
;~ DirRemove ($Mozilla_Local,1)
;~ sleep(2000)
;~ DirRemove ($Mozilla_Roaming,1)
;~ sleep(2000)
;~ FileDelete ($Mozilla_profile)
;~ sleep(2000)
;~ DirCreate ($Mozilla_Local)
;~ DirCreate ($Mozilla_Roaming)
;~ MsgBox(0,"",$Mozilla_profile)




;~ ; ; FLICKER
;~ Local $sMessage = ""
;~ SplashTextOn("TitleFoo", $sMessage, -1, -1, -1, -1, $DLG_TEXTLEFT, "")
;~ For $i = 1 To 20
;~     $sMessage = $sMessage & $i & @CRLF
;~     SplashTextOn("TitleFoo", $sMessage, -1, -1, -1, -1, $DLG_TEXTLEFT, "")
;~     Sleep(100)
;~ Next

;~ ; ; SMOOTH
;~ $sMessage = ""
;~ SplashTextOn("TitleFoo", $sMessage, -1, -1, -1, -1, $DLG_TEXTLEFT, "")
;~ For $i = 1 To 20
;~     $sMessage = $sMessage & $i & @CRLF
;~     ControlSetText("TitleFoo", "", "Static1", $sMessage)
;~     Sleep(100)
;~ Next
Local $Start_Chrome = Run ("C:\Program Files (x86)\Google\Chrome\Application\chrome.exe", "", @SW_SHOWMAXIMIZED)
WinWait("[CLASS:Chrome]", "", 10)

Send("^+{DEL}")

ControlClick ("Settings - Google Chrome", "" ,215285776,"[Class:Chrome_RenderWidgetHostHWND;TEXT:Chrome Legacy Window;INSTANCE:1]")
;~ MouseClick($MOUSE_CLICK_LEFT,554,1041)
Sleep(5000)
;~ ProcessClose($Start_Chrome)
;~ MouseClick($MOUSE_CLICK_RIGHT)

 

 

 

Link to comment
Share on other sites

Here's how i would start to get this done:

Get an application that checks real time for file changes/moves etc (i use one but forgot the name, tell you later.)

This application should give you the type of file that gets deleted or modified when you delete the things in question through the browser.

Now that you know what filetype gets deleted/modified, write the autoit code that checks if the application exists,

where the profile is and find that filetype and do the modifications or whatever it needs to be done.

Repeat for all browsers you want.

Spoiler

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Link to comment
Share on other sites

I found that in Google Chrome, password file is located in C:\Users\$username\AppData\Local\Google\Chrome\User Data\Default and it's the Login Data file. 

 

I did not checked for other browsers But, if you use the correct keywords i am sure you can found some userfull links...

If you delete passwords from the current user session you wont need rights to do that.

Edited by caramen

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to comment
Share on other sites

Thanks guys for responding

 

Bert --- But we can't use any third party software for cleaning up browser passwords,cookies etc.

Caramen -- I tried to delete mentioned folder which you suggested but it unlinks other SSO things in firefox ...so this should not either work

 

What i think is can be useful...open Mozilla or Chrome etc and then send Ctrl+SHift + Delete keys and then select "Advanced" settings click all options there (automatically) and clean from there (Mozilla,chrome and opera). But this automation should work for all even if screen resolution is different. I was trying "Autoit info window" to get hold of "Instance Id" etc so that i can acheive that...but....

 

Can somebody guide me steps or code to achieve that please ? ...below is the code which i was trying

Local $Start_Chrome = Run ("C:\Program Files (x86)\Google\Chrome\Application\chrome.exe", "", @SW_SHOWMAXIMIZED)
WinWait("[CLASS:Chrome]", "", 10)

Send("^+{DEL}")

ControlClick ("Settings - Google Chrome", "" ,215285776,"[Class:Chrome_RenderWidgetHostHWND;TEXT:Chrome Legacy Window;INSTANCE:1]")
;~ MouseClick($MOUSE_CLICK_LEFT,554,1041)
Sleep(5000)
;~ ProcessClose($Start_Chrome)
;~ MouseClick($MOUSE_CLICK_RIGHT)

 

Link to comment
Share on other sites

Oh well. If so... I recommand you to learn how to work with IUIAutomation. 

It can do all your need. 

 

You also got WebDrivers > That need an external exe that have to be run. (Without rights too) (i dont know where is the exe for opera but i heard some about it so it exists.

 

You will be able to work in all browsers area and automat anything without coordinate.

 

 

Edit I wont lead you to one or another they are pretty different on how they work but both are very good. (But the good thing with IUIAutomation is if you learn it you will be ble to automate a lot of stuff outside the browsers..) : 

 

Edited by caramen

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to comment
Share on other sites

Instead of using the propitiatory CCleaner (which is probably loaded with spyware and adware in the installers), use the much better free and open source BleachBit program to remove all sorts of junk, including passwords from various browsers! It also has a command-line interface so that you can totally avoid GUI automation

EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time)

DcodingTheWeb Forum - Follow for updates and Join for discussion

Link to comment
Share on other sites

Thanks all for suggestion

@TheDcoder -- Bleachbit is still an third party software and we cannot use it, have to build our own tool to do cleanup.

 

By any reason can i automate script to select Advanced tab (Basic and Advanced are two tabs) and then make sure if password is select if not selected then select it and then click Enter

Link to comment
Share on other sites

@Hitesh_Luthra I see, if you are working in a company you might try to convince your higher-ups to add an exception for BleachBit, it is free and open source software after all. It would be a lot better than something put together with UIAutomation and/or GUI automation.

EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time)

DcodingTheWeb Forum - Follow for updates and Join for discussion

Link to comment
Share on other sites

  • 4 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...