Search found 15 matches

by Mark-
Fri Dec 06, 2019 1:57 pm
Forum: madSecurity
Topic: Blowfish and data intergity...
Replies: 2
Views: 8943

Re: Blowfish and data intergity...

Yeah I thought the same. Then I wavered. HA
My main concern was when the data was saved to a file, someone tampered with the file.
I think I will add a CRC.

Thanks for your help and the mad suite.
by Mark-
Fri Dec 06, 2019 5:38 am
Forum: madSecurity
Topic: Blowfish and data intergity...
Replies: 2
Views: 8943

Blowfish and data intergity...

Hello, It is late and I might not have my thinking cap snug. Using the Encrypt/Decrypt on some strings. I encrypt data, save it to a file or send across some network. The encrypted data becomes corrupted. The password is the same on both ends and Decrypt just applies the password to the data. The re...
by Mark-
Sat Aug 20, 2016 12:36 am
Forum: madSecurity
Topic: RenameFile, FileSetAttr, CopyFile...
Replies: 5
Views: 9179

Re: RenameFile, FileSetAttr, CopyFile...

Well no joy. I did not find any new flags/types/etc. for newer OS. I found other strange things with W10. Nothing to do with security. I could rename a file and the file would disappear to Explorer. It was not hidden. But, try to create or copy a file, with the same name, to the directory and the OS...
by Mark-
Thu Aug 18, 2016 5:40 pm
Forum: madSecurity
Topic: RenameFile, FileSetAttr, CopyFile...
Replies: 5
Views: 9179

Re: RenameFile, FileSetAttr, CopyFile...

Thanks for the responses.

No joy on the change of permissions. I tried a bunch of stuff.
I will post a message in the newsgroup and post back when I have it solved.
by Mark-
Thu Aug 18, 2016 3:41 pm
Forum: madSecurity
Topic: RenameFile, FileSetAttr, CopyFile...
Replies: 5
Views: 9179

Re: RenameFile, FileSetAttr, CopyFile...

All the RenameFile, FileSetAttr, CopyFile calls. The first call is setting the permissions and I am not sure if it fails. I do know the "full control" checkbox in the security tabs is not set. Then I call FileSetAttr if the file exist so I can delete it and it fails with access denied. The...
by Mark-
Thu Aug 18, 2016 3:29 pm
Forum: madSecurity
Topic: RenameFile, FileSetAttr, CopyFile...
Replies: 5
Views: 9179

RenameFile, FileSetAttr, CopyFile...

Hello, Delphi XE. madSecurity 1.2 I am renaming a file in directory X, copying a new file to directory X and renaming it. Using MadExcept security wrappers I set the permissions. This works on XP and W7. It fails on W8 and W10. UAC is off on all computers. I have admin rights on all computers but, I...
by Mark-
Tue May 17, 2016 9:57 pm
Forum: madSecurity
Topic: Set permissions...
Replies: 18
Views: 19890

Re: Set permissions...

OK just to close it off and for others that might search for a solution. I had to create a "Deny" ACE and also set the same permissions for the directory containing the file I do not want the user to delete. Also the permissions I selected prevent the user from modifying the directory cont...
by Mark-
Tue May 17, 2016 6:47 pm
Forum: madSecurity
Topic: Set permissions...
Replies: 18
Views: 19890

Re: Set permissions...

More testing iso.DAcl.Deallocate; Does clear out all groups and the icon for the file actually changes to have a little lock in the bottom left corner. Then iso.DAcl.SetFileAccess(Everyone,false); Adds just the one group. Not sure how to test if I can delete the file because I created the file and c...
by Mark-
Tue May 17, 2016 6:33 pm
Forum: madSecurity
Topic: Set permissions...
Replies: 18
Views: 19890

Re: Set permissions...

I did a test.

ShowMessage(IntToStr(iso.DAcl.ItemCount)); <---- shows 4
iso.DAcl.Clear;
iso.DAcl.Flush;
ShowMessage(IntToStr(iso.DAcl.ItemCount)); <---- shows 0

But the four are not deleted from the file.
by Mark-
Tue May 17, 2016 6:28 pm
Forum: madSecurity
Topic: Set permissions...
Replies: 18
Views: 19890

Re: Set permissions...

>You did do the "ProtectedDAcl := false", too, didn't you?

Yes.

Clear does delete some other groups, just not the listed four.
by Mark-
Tue May 17, 2016 6:20 pm
Forum: madSecurity
Topic: Set permissions...
Replies: 18
Views: 19890

Re: Set permissions...

>That's why there's a "Clear" in my original code, which should completely empty the DACL, so that only Everyone is in it afterwards.

Clear does not delete:

Authenticated users
System
Administrators
Users
by Mark-
Tue May 17, 2016 6:08 pm
Forum: madSecurity
Topic: Set permissions...
Replies: 18
Views: 19890

Re: Set permissions...

Yeah it appears: SetFileAccess(Everyone, false); Adds the group "Everyone" and sets the permissions. Also the permissions are applied to the "Users" group. The "Administrators" group is not altered. I tried: iso.DAcl.SetFileAccess(Account('Administrators'),false); iso.D...
by Mark-
Tue May 17, 2016 5:41 pm
Forum: madSecurity
Topic: Set permissions...
Replies: 18
Views: 19890

Re: Set permissions...

Thanks > Of course there are other alternatives, from API hooking to writing kernel mode file system filter drivers. But that sounds like overkill to me. I concur. The file deletion mistake has only happened with a couple of users but, if I can code something (in my program) to prevent the deletion ...
by Mark-
Tue May 17, 2016 5:23 pm
Forum: madSecurity
Topic: Set permissions...
Replies: 18
Views: 19890

Re: Set permissions...

Hello, Thank you. You wrote "I suppose so." Do you know of any method to make it harder for a user to delete a file? I had to add flush to get a change. with FileSecurity('c:\someFolder\someFile.dat'), DAcl do begin ProtectedDAcl := false; Clear; SetFileAccess(Everyone, false); Flush; <---...
by Mark-
Tue May 17, 2016 4:22 pm
Forum: madSecurity
Topic: Set permissions...
Replies: 18
Views: 19890

Set permissions...

Hello, I have searched, without joy, for code (using MadSecurity) to set the permissions on one file. We have one file that is used for licensing. If the user deletes the file (by accident) it causes trouble and takes time to get it replaced. I want to set permissions on the file, for all groups/use...