Discussion forum for all Windows batch related topics.
Moderator: DosItHelp
-
callumkm
- Posts: 1
- Joined: 19 Dec 2014 12:11
#1
Post
by callumkm » 19 Dec 2014 12:22
Hi,
I'm basically looking to create a file which creates a certain number of files (which are all around 50MB in size) and then use the cacls command to deny the current user access to the file. I'm on Windows 8.1 and just to be clear, this is intended to be a virus BUT more than anything it's just a way of testing my coding skills (someone requested for me to do this).
This is how it's looking so far, the problem occurs when it comes to the cacls part of the file, the initial creation of the file is no problem:
@echo off
set counter=0
:loop
set /a counter=counter+1
fsutil file createnew FILE%counter%.txt 52428800
cacls %__cd__%/FILE%counter%.txt /p %username%:n
pause
goto loop
Ideally I would also love to have a way to hide the cmd window itself (although i'm not sure if this is possible or not)
Thanks in advance,
callumkm
-
Squashman
- Expert
- Posts: 4471
- Joined: 23 Dec 2011 13:59
#2
Post
by Squashman » 19 Dec 2014 12:59
fsutil requires admin privileges. A normal user will not even be able to run your batch file without running an elevated CMD prompt.
Good way to attempt to piss someone off by filling up their hard drive. I really dislike script kiddies.
-
Yury
- Posts: 115
- Joined: 28 Dec 2013 07:54
#3
Post
by Yury » 19 Dec 2014 13:26
Squashman wrote:fsutil requires admin privileges. A normal user will not even be able to run your batch file without running an elevated CMD prompt.
But not in Windows 8.1. I myself was surprised.
Squashman wrote:Good way to attempt to piss someone off by filling up their hard drive. I really dislike script kiddies.
+1
-
Squashman
- Expert
- Posts: 4471
- Joined: 23 Dec 2011 13:59
#4
Post
by Squashman » 19 Dec 2014 13:27
Yury wrote:But not in Windows 8.1. I myself was surprised.
-1 for Microsoft!