Jump to content

Cannot write to @homedrive


 Share

Recommended Posts

Hey everybody. I need to copy a file to the users @homedrive. the problem is that these users do not have permissions to do so. the file source is inside of a UNC path that all users have access to. How can i copy the file with higher credentials?

Link to comment
Share on other sites

That macro only returns a drive letter, maybe a complete path is needed for your operation?

Try this:

ConsoleWrite(@HomeDrive & @HomePath & @LF)

or

ConsoleWrite(@HomeDrive & "\" & @LF)
Edited by snowmaker

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Link to comment
Share on other sites

You may want to look at doing it like this.

$usr = 'Administrator'
$pwd = 'password'
$dom = @ComputerName

RunAs($usr, $dom, $pwd, "", @ComSpec & ' /k ' & 'mkdir c:\test123' & ' ' & '&&' & ' ' & 'dir' & ' ' & '&&' & ' ' & 'cd c:\test123', @SystemDir, @SW_SHOW)

or you can do just bare basic

$usr = 'Administrator'
$pwd = 'password'
$dom = @ComputerName

RunAs($usr, $dom, $pwd, "", @ComSpec & ' /k ' & 'mkdir' & ' ' & @HomeDrive & '\test123', @SystemDir, @SW_SHOW)

only down side is the creds are stored within the exe, but you could have it read from an ini file or include encrypt string etc etc.

just remember that my example is just that an example showing you the potential of what you can do, not many people know how to trunk multiple commands in DoS.

ftc

Edited by failedtocompile
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...