Image
 
linkedin_logo.png rss_logo.jpg
twitter_logo.png youtube_logo.jpg
Latest Additions
 
EH-Net Login
Welcome Guest.






Lost Password?
No account yet? Register
Who's Online
We have 43 guests online
 
Advertisement

You are here: Home arrow Resourcesarrow Toolsarrow tools ot Modify DACL of remote machine
EH-Net
May 21, 2013, 06:15:23 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Go back to The Ethical Hacker Network Online Magazine Home Page
 
   Home   Help Calendar Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: tools ot Modify DACL of remote machine  (Read 12727 times)
0 Members and 1 Guest are viewing this topic.
Hack_80
Jr. Member
**
Offline Offline

Posts: 86


Black buck


View Profile
« on: December 19, 2011, 02:59:54 AM »

HI,
I m bit in a situation where most of the machines has been reported with services installed by business applications with improper DACl permissions.
Authenticated Users may change the configuration of service. looking for the tool \ solution to apply the DACL permissions  remotely.

Thanks in advance
Logged
3xban
Hero Member
*****
Offline Offline

Posts: 607


View Profile WWW
« Reply #1 on: December 19, 2011, 08:26:41 AM »

Powershell might work so long as you have local admin rights to the system.  There are also some GPO tools as well.
Logged

Certs: GCWN
(@)Dewser
ajohnson
Recruiters
Hero Member
*
Offline Offline

Posts: 1057


aka dynamik


View Profile WWW
« Reply #2 on: December 19, 2011, 10:32:56 AM »

If you can't use Powershell, psexec and icacls should do the trick.
Logged

WIP: GCFA | www.infosiege.net | @infosiege

The day you stop learning is the day you start becoming obsolete.
l33t5h@rk
Jr. Member
**
Offline Offline

Posts: 79



View Profile WWW
« Reply #3 on: December 19, 2011, 04:31:58 PM »

If you can't use Powershell, psexec and icacls should do the trick.

Yep - these can all do it. If you don't have powershell, figure out what the ACL should look like, write out the icacls.exe command & variables, then save it in a batch file and script it out to the other boxes.

What OS(es) are involved? All W2K3?
Logged
Hack_80
Jr. Member
**
Offline Offline

Posts: 86


Black buck


View Profile
« Reply #4 on: December 19, 2011, 11:37:26 PM »

Thanks for the reply...
All the reported boxes are windows Xp Sp3

Logged
l33t5h@rk
Jr. Member
**
Offline Offline

Posts: 79



View Profile WWW
« Reply #5 on: December 20, 2011, 08:48:35 AM »

If you're just trying to add:
psexec \\srvName icacls.exe D:\temp\* /grant user-name:(D,GR,X)

Obviously it will need a little tweaking w/ the switches but this should do you for a starter.
Logged
Hack_80
Jr. Member
**
Offline Offline

Posts: 86


Black buck


View Profile
« Reply #6 on: December 20, 2011, 10:08:39 PM »

Thanks for the response.
Currently i m using subinacl.exe for fixing the dacl permission of Services.
This sounds to be good tool to fix the permission of services.



Logged
Hack_80
Jr. Member
**
Offline Offline

Posts: 86


Black buck


View Profile
« Reply #7 on: September 18, 2012, 01:06:34 AM »

Since the SUBINACL is working fine...looking for proactive solutions via Group policy...ANy suggestions....
Logged
ajohnson
Recruiters
Hero Member
*
Offline Offline

Posts: 1057


aka dynamik


View Profile WWW
« Reply #8 on: September 18, 2012, 01:50:36 AM »

Have you looked at this? http://technet.microsoft.com/en-us/library/cc756952(v=ws.10).aspx
Logged

WIP: GCFA | www.infosiege.net | @infosiege

The day you stop learning is the day you start becoming obsolete.
tturner
Sr. Member
****
Offline Offline

Posts: 432


View Profile WWW
« Reply #9 on: September 18, 2012, 10:36:07 AM »

I have a few of these scripts in Powershell I posted to my blog at http://sentinel24.com/blog/?page_id=51 . One example recurses through a file structure and adds permissions for a user

(FYI - I use the long form for Powershell syntax when writing tutorials but you can make this much shorter using gci, gwmi, ft, etc)

Code:
Get-ChildItem -recurse * | ForEach-Object -process { $_.FullName } | % { c:\subinacl.exe /file $_ /grant=domain\username=F}

Obviously this won't work for services, so how to accomplish the same thing?

First I want to enumerate services, but I want to sort based on startmode and name and suppress everything except for the service name. (no status or table headers for example)

Code:
Get-WmiObject -computer computername win32_service | sort startmode, displayname | Format-Table -property Displayname -HideTableHeaders

I'm not 100% sure what you are hoping to accomplish here, but if you wanted to add an account entry for each of those you can combine the 2 scripts into something like

Code:
Get-WmiObject -computer computername win32_service | sort startmode, displayname | Format-Table -property Displayname -HideTableHeaders | ForEach-Object -process { $_.FullName } | % { "C:\Program Files\Windows Resource Kits\Tools\subinacl.exe /service $_ \\computername\$_ /grant=domain\username=F"}

http://ss64.com/nt/subinacl.html has additional subinacl syntax and is what I used when writing the scripts at my blog.

*Edit* While my way is more fun (I am addicted to making Powershell 1 liners!), I'd suggest checking out ajohnson's suggestion as that's probably closer to what you are looking for. Smiley
« Last Edit: September 18, 2012, 10:54:09 AM by tturner » Logged

Certifications:
CISSP, CISA, GPEN, GWAPT, GAWN, GCIA, GCIH, GSEC, OPSE, CSWAE, CSTP, VCP

WIP: OSWP, GSSP-JAVA, GXPN

Udacity on hold, again. I suck.

http://sentinel24.com/blog  @tonylturner http://bsidesorlando.org
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!
Page created in 0.076 seconds with 23 queries.
 
Exclusive Deal

sansfire13_245x90_cw90.jpg
SANSFIRE 2013
June 15 - 22

5% Off w/ Code: EHN_5

SANS Deals 4 EH-Netters
5% OFF Any SANS Course in Any Format!
Coupon Code: EHN_5 Including SANS Rocky Mountain 2013 & SANS Boston 2013
Polls
Compared to this year, 2013 will be:
 
Recent Forum Topics
EH-Net News Feeds
Latest Additions
 
         
Free Business and Tech Magazines and eBooks

© 2013 The Ethical Hacker Network
Joomla! is Free Software released under the GNU/GPL License.