Journal
Continuing my windows journey
Raw Notes
Windows - CMD - Searching Text in Files
find "persian" C:\Docs\cats.txt
→ will look for the string “persian” in the cats.txt file- You can pipe
find
ie|
- Find does not support Regex
- You can pipe
findstr "Alan Pasta" text.txt
→ this will search for all occurances of either Alan or Pasta inside of the txt docmore
→ allows us to look at big outputs in a more user friendly method by allowing us to use arrowing to paginate through the output.
Windows - CMD - System data
systeminfo
→ gives information around the given windows system like OS version and name-
User Accounts
- Administrator
- Self explanatory. Master user
- Normal User
- This is for regular users. Essentially day to day users but people that dont need Admin access
- Guest
- Short term burner accounts with limited access
- System
- Administrative level permissions for managing critical services
- Administrator
-
Groups
- Administrators
- Similar to root access permissions
- Users
- Standard users
- Remote Desktop Users
- users who are permitted to log in remotely
- Administrators
net
→ allows us to manage users and groupsnet user
→ Lists all users on the current machinenet user <USERNAME>
→ Will list all details of the account to the username given.net localgroup
→ shows all the local groups for the machinenet localgroup Administrators
→ shows us all the users tied to the Administrator groupnet user /add Catman thiswouldbeapassword
→ Allows you to add a user- NOTE you have to do this running CMD as Administrator
net localgroup Administrators Catman /add
→ Adds Catman to the administrators group- NOTE you have to do this running CMD as Administrator
net localgroup Administrators Catman /del
→ Removes Catman from Administrators group- NOTE you have to do this running CMD as Administrator
net user /del Catman
→ Deletes the user Catman- NOTE you have to do this running CMD as Administrator
- To be able to run commands in CMD like using
sudo
you have to boot up the CMD terminal in Administrator mode.
Windows Permissions - Files and Directories
- NTFS (Windows New Technology File System)
- The standard file system for Windows. Controls file and folder permissions.
- DACLs (Discretionary Access Control Lists)
- Lists that control and define permission assigned to users and groups for any object.
- ACEs (Access Control Entities)
- Are the parts of a DACL that say which user or group has access to what.
icacls
→ allows you to view and interact with permissionsicacls cat.txt
→ Will show us the ACE’s of the fileicacls "cat.txt" /grant Catman:R
→ Grants Catman read only access to cat.txticacls "cat.txt" /deny Catman:R
→ Removes the read only access to cat.txt for Catman.