China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-12 05:48
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [Closed] Create Hash Rules for Group Policy Software Restriction Using Batch View 2,282 Replies 8
Original Poster Posted 2009-01-10 23:39 ·  中国 广西 桂林 电信
新手上路
Credits 12
Posts 21
Joined 2008-11-20 21:05
17-year member
UID 131595
Gender Male
Status Offline
Can't find relevant content in the forum and GOOGL. Please help. There are several programs under the C drive. I want to prohibit them from running through the hash rule in the software restriction policy of group policy. Because creating a new rule involves the selection of these several files, I don't know if batch processing can be used to realize creating the hash rules of these several programs.

[ Last edited by HAT on 2009-1-13 at 23:33 ]
Floor 2 Posted 2009-01-11 01:11 ·  中国 上海 静安区 电信
高级用户
★★★
Credits 916
Posts 377
Joined 2004-03-08 00:00
22-year member
UID 19523
Gender Male
Status Offline
Search for the Windows security guide. There is a Group Policy called secedit that updates the system policy by refreshing the policy template. Unfortunately, I still don't know how to generate the policy template.

Now we are also using Symantec SEP, which is not bad
Floor 3 Posted 2009-01-12 01:33 ·  中国 北京 联通
银牌会员
★★★★
[b]看你妹啊[/b]
Credits 1,488
Posts 1,357
Joined 2006-05-20 12:00
20-year member
UID 55770
Status Offline
This is also one of the problems I want to solve, give it a thumbs up

有问题请发论坛或者自行搜索,再短消息问我的统统是SB
Floor 4 Posted 2009-01-12 10:09 ·  中国 广东 深圳 电信
初级用户
★★
游手好闲 + 无所事事 ..
Credits 194
Posts 167
Joined 2007-04-30 09:43
19-year member
UID 87022
Gender Male
Status Offline
I have used two methods to prohibit the operation of specified programs, not the hash rules. Method 2 can be referred to. Generally, if there is no prompt, most people don't know what's going on...

Method 1: Group Policy (can specify running or specify prohibiting running)
The function of disabling programs in Group Policy: Run the "gpedit.msc" command to open the Group Policy console, expand "User Configuration - Administrative Templates - System" in it,
The policies of "Only allow running licensed Windows applications" and "Do not run specified Windows programs" on the right can help you a lot.
When the user tries to run an unallowed program, a dialog box of "......The restriction is canceled. Please contact the system administrator." will pop up.

Method 2: Image hijacking
For example, running QQ actually starts ctfmon, and the system will have no prompt.
You can also consider starting a VBS or BAT to perform password verification before running the specified program.
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\qq.exe" /v debugger /t reg_sz /d "C:\WINDOWS\system32\ctfmon.exe" /f

[ Last edited by exzzz on 2009-1-12 at 10:19 ]
Floor 5 Posted 2009-01-12 10:23 ·  中国 广东 深圳 电信
初级用户
★★
游手好闲 + 无所事事 ..
Credits 194
Posts 167
Joined 2007-04-30 09:43
19-year member
UID 87022
Gender Male
Status Offline
Found some information

First configure the rules on your own machine, then export the hash rules:
Show system files, show all files. Copy out C:\WINDOWS\system32\GroupPolicy\gpt.ini by directory
c:\WINDOWS\system32\GroupPolicy\Machine\Registry.pol

And overwrite the above files to the target machine... You can test it, I have no place to test
Floor 6 Posted 2009-01-12 10:52 ·  中国 四川 泸州 联通
高级用户
★★★
Credits 609
Posts 374
Joined 2006-08-02 22:38
20-year member
UID 59720
Status Offline
First, manually configure the programs and paths (not allowed) or the programs running under the specified paths (not restricted) on your own machine. Then copy the Registry.pol file. If you need to configure on other machines, copy the Registry.pol file over. If you want to remove all settings, just delete the Registry.pol file.
Floor 7 Posted 2009-01-12 11:36 ·  中国 广东 深圳 电信
初级用户
★★
游手好闲 + 无所事事 ..
Credits 194
Posts 167
Joined 2007-04-30 09:43
19-year member
UID 87022
Gender Male
Status Offline
If you really want to be completely automatic, consider the following ideas:
1. Use VBS or BAT to read the "block list" and write it into variables, mainly the full program path.
2. Use VBS's sendkeys to simulate keyboard operations to GPEDIT.MSC to add these variables.
3. VBS or bat copies the local Registry.pol and remotely logs in to overwrite the files of the target machine.
Floor 8 Posted 2009-01-13 22:30 ·  中国 广西 桂林 电信
新手上路
Credits 12
Posts 21
Joined 2008-11-20 21:05
17-year member
UID 131595
Gender Male
Status Offline
Thank you very much for the guidance from exzzz and ZJHJ!

The problem has been resolved. The policy file of the system is indeed the Registry.pol file. After configuring the policy on the server, synchronize the Registry.pol and gpt.ini files to the same directory of the client, and then run gpupdate /force to refresh the group policy.
Floor 9 Posted 2010-10-18 01:12 ·  中国 广东 揭阳 揭西县 电信
新手上路
Credits 1
Posts 1
Joined 2010-02-21 02:37
16-year member
UID 160900
Gender Male
Status Offline
Not bad, make a mark! ~
Forum Jump: