Jump to content

can I save my password in script


FATIHTALI
 Share

Recommended Posts

I have big network.

We dont want administrator on our network. Everybody will be standart user.

But some special process need to administrator privillage.

If I run program with this script it will work. But I dont want to lost my password.

How can I save my password in my script.

RunAs("administrator","domain","password",0,"c:\xxxx.exe",@SystemDir)

Startup Agent It is my small Startup Agent. You can install programs on startup Domain pc without Admin rights.
Link to comment
Share on other sites

I used Medic84 code, compiled it and then checked the resulting exe. You can't find the password because the code seems to be encrypted.

So you can't find the password using an hex editor.

But you CAN find the password (the whole code) when you use an decompiler. A post some days ago mentioned it to be still possible.

$passv = "password"
RunAs("administrator","domain",$passv,0,"c:\xxxx.exe",@SystemDir)

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Well yes but at least it is a little bit more secure then nothing.

It wont be so easy for a 8 year old with google access to see your pass.

Anyway - decompiling is against the EUA.

I don't think a 8 year old with Google access knows what EULA is, and even if he does he's not going to care.
Link to comment
Share on other sites

Link to comment
Share on other sites

Do a conversion of your password with MD5. Use an MD5 UDF like the following link and this way, your password will not be revealed even if it is decompiled. Apparently there is no way to reverse crack an MD5 hash.

So essentially, your password should be stored in your script as the MD5 computed output of your real password, then you use an MD5 conversion to dynamically take input from the program to authenticate against the stored MD5 password.

If I have more time in the next few hours, I will post an example.

http://www.dailycupoftech.com/?page_id=135

Justin

Link to comment
Share on other sites

Using the above UDF, I have created an example CLI app that only accepts the password 'password'. However, note that this password is not stored in the code at all and cannot be decrypted (Unless authenticated against a "known MD5 result" database - very unlikely for your password).

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Change2CUI=y
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <Hash39.au3>

$passwordMD5 = "5f4dcc3b5aa765d61d8327deb882cf99" ; This is the MD5 version of the password 'password' . This is what a hacker would see

$password = _Hash("md5", $CmdLine[1])

Switch $password
    Case "5f4dcc3b5aa765d61d8327deb882cf99"
        MsgBox(0, "Password correct", "The password you typed is correct")
    Case Else
        MsgBox(0, "Password incorrect", "The password you typed is incorrect")

EndSwitch

Justin

Link to comment
Share on other sites

Apparently there is no way to reverse crack an MD5 hash.

Cute. MD5 is not considered a very secure hashing algorithm. Proves of collisions have been found and bruteforcing them is getting easier by the minute. For example, if you have a new high-end graphics card you can achieve around 1 billion hashes/s without any real problems. Also, since most passwords are just random words people come up with most passwords will be found within minutes using a hybrid dictionary/bruteforce attack.

So essentially, your password should be stored in your script as the MD5 computed output of your real password, then you use an MD5 conversion to dynamically take input from the program to authenticate against the stored MD5 password.

Since Windows doesn't accept an MD5 hash as password what are you going to do with the hash?

Edited by monoceres

Broken link? PM me and I'll send you the file!

Link to comment
Share on other sites

Cute. MD5 is not considered a very secure hashing algorithm. Proves of collisions have been found and bruteforcing them is getting easier by the minute. For example, if you have a new high-end graphics card you can achieve around 1 billion hashws/s without any real problems. Also, since most passwords are just random words people come up with most passwords will be found within minutes using a hybrid dictionary/bruteforce attack.

Since Windows doesn't accept an MD5 hash as password what are you going to do with the hash?

Well, I guess I'm not up to date on MD5 issues, however with the UDF you use many other hashing algorithms : CRC, Adler, MD5, SHA, HAVAL, RIPEMD, Tiger, WHIRLPOO

Also, Windows doesn't have to support MD5 if you are using the provided UDF. Check out my example and replace MD5 with whatever hashing mechanism you want.

This should still provide him with what he is looking for.

Justin

Link to comment
Share on other sites

  • 2 months later...

B):);)

I don't think a 8 year old with Google access knows what EULA is, and even if he does he's not going to care.

Thats very offensive LOL im 11 B) Got a problem??? I know what an EULA is and I DO CARE!!! OMG B)

i can make hacks,trainers and virisis(all kinds) and i'm 11!!!

B)

Hi.

Link to comment
Share on other sites

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...