Making edits to SCRIPTS
Prior to pulling the most recent version from, or commiting edits to the SCRIPTS repo on the DIP, you will need to have completed the Initial Setup of the MIP with the DIP hosted Gitlab.
Script Folder Labeling Standardβ
Folder Label Formatβ
Full Label Format: <UNIT>-<SHORT_TITLE>-<TYPE>-<SERIES>
Example 1: 262COS-Sigma_To_Detection_Rule_Converter-SCRIPT-001
NOTE: This example title signifies that the folder contains one or more standalone scripts that might have to do with converting Sigma rules to Elastic Detection Rules, and was developed by the 262COS.
Example 2: 262COS-Metasponse_Plugins-PACKAGE-001
- This example title signifies that the folder contains one or more standalone scripts that might have to do with converting Sigma rules to Elastic Detection Rules, and was developed by the 262COS.
Label Breakdownβ
-
<UNIT>: This identifies the unit that the capability was developed by. -
<SHORT_TITLE>: A brief title descriptive enough to inform what the capability does.
Example: ATT&CK_Navigator_Layer_Creator- This is a string to identify the purpose of the capability.
- Replace would-be spaces with underscores (
_) to make it easier to navigate the filestructure in a command-line environment. - It is preferable to be kept short in order to avoid long filenames.
-
<TYPE>: This identifies the type of content expected to be inside the parent folder of the capability.Type Definition SCRIPTOne or more standalone script/executable files that have no dependancy on each other to fulfill the capabilities intended purpose(s), if there are more than one file. EXAMPLES: A series of host artifact collection scripts, or the Sysinternals suite. PACKAGEA combination of script/executable/configuration files that depend on each other, or need to be used together in a certain order to fulfill the capabilities intended purpose(s). EXAMPLES: A "contrib" folder filled with scripts/executables to be imported into Metasponse as custom plugins CONFIGOne or more configuration files that are meant to augment the functionality of a tool/system to perform in a certain way. EXAMPLE: Sysmon configs, Auditbeat rules, database exports (of configuration settings) -
<SERIES>: This is an iterating number starting from001that signifies numbered capability of the sameSHORT_TITLEandTYPE, and from the sameUNIT. This is used to differentiate between the same-ish capabilities developed by different members, such as the many "host agent deployment" scripts out there.
1. Create your own working branchβ
-
Change directories to the
/cvah/git/SCRIPTSproject folder:cd /cvah/git/SCRIPTS -
Ensure the
remotenamedoriginis pointing to the DIP Gitlab instance athttps://gitlab/262-cos/SCRIPTSgit remote -vtipIf
originis not pointing to the correct location, you can change it with the following command:git remote set-url origin https://gitlab/262-cos/SCRIPTS -
Pull the most recent changes of the
mainbranch from the DIP Gitlab instance to your local repo:git pullNOTE: You can skip this step if you do not have a connection to the DIP Gitlab.
-
Create a new branch of the current snapshot of the
mainbranch with name containing your username, then usecheckoutto switch to it:git branch <YOUR_USERNAME>-edits
git checkout <YOUR_USERNAME>-edits -
Publish your new branch to the DIP Gitlab:
git push --set-upstream origin <YOUR_USERNAME>-editsNOTE: You can skip this step if you do not have a connection to the DIP Gitlab.
2. Making changes in VS Codeβ
-
Start VS Code and open the local
SCRIPTSrepository:code /cvah/git/SCRIPTSNOTE: You may be prompted to
Trust the authors of all files in the parent folder 'git'- check the box and click Yes -
Work on the repository as you see fit, using the VS Code Fundamentals page as a reference