A set of hotkeys I've made to make formatting easier and to help with investiagations.
- Download the Files from GitHub
- Download and Install Python
- In a terminal Install pyperclip, and pynput.
pip install pyperclip pynput
I believe thatrequirments.txtshould cover this step. - In the terminal, navigate to the location of Cyber_Paste.py
cd <path> - In the terminal start the program (You should see a list of the available hotkeys)
python Cyber_Paste.py - Press
ctrl+alt+shift+escto exit
Anytime \s(space) \t(tab) or \n(newline) is seen, this is to show the formatting kibana has for the respective object, if you just copy and pasted it, and does not need to be added to get the hotkeys to function properly.
Arrows( → , ↳ ) indicate what that line is transformed into after the hotkey. Arrows( → , ↳ ) without anything to their left indicates that this hotkey inserts the stuff on the right of the Arrow( → , ↳ ) in its formatting process.
Curly Braces( { } ) indicate text that is not in the formating but that helps with clarity.
All hotkeys used after copying their respective information to your clipboard, the hotkey will then put the formatted version of the information back into your clipboard, ready for you to paste it into your case or discover.
- This hotkey takes alert fields and capitalizes and adds spaces to the field name and puts the feild content in backticks. It will apply the formating to as many lines as you have copied from the alert tab.
eg.
this.example.field \t field content → This Example Field `field content` - Adds Group `` on a new line under the User field as well as adding a black line to seperate Host, User, and Group from the rest of the info that is copied at that time.
eg.
host.name \t exampleHost → Host `exampleHost`
user.name \t exampleUser → User `exampleUser`
→ Group ``
→ {empty line}
process.executable \t exampleProcess.exe → Process Executable `exampleProcess.exe` - Removes extrenous parts of field names: Events, events, text, pe, name, or process if the next word is parent or command
- Removes uninteresting fields from the overview tab: agent.status, Endpoint.policy.applied.artifacts.global.channel, or Source Event
- This hotkey takes the host, user, group and the last line copied and converts it into my standard Observation Statement format
eg.
Host `exampleHost`
User `exampleUser`
Group `exampleGroup`
{any number of inrelevant lines, your choice based off what you copy}
Process Executable `exampleProcess.exe`
File Path `exampleFile.path`
↳ File Path `exampleFile.path` flagged for {you would insert the alert name here} on Host `exampleHost` under User `exampleUser` at Group `exampleGroup`.
- This hotkey takes the url for a hive case and optionally the case number and formates into a duplicate hive case link.
- To add the case number, copy it to your clipboard and then use the
Extra Texthotkey to store it. Then copy the url and use this hotkey. - hiveCase.URL → Duplicate of [Hive Case #{value stored with the Extra Text Hotkey}](hiveCase.URL)
- This hotkey stores your clipboard for another hotkey to use later.
- This hotkey is to store additional info, currently only used to store the User Job Title in the
Person Infohotkey.
- This hotkey is to store additional info, currently only used to store the User Department in the
Person Infohotkey.
- This hotkey takes a column from discover and puts each entry in backticks( ` ). This version cuts off the first and last charcter of each entry since copying a column from discover has quotes( " ) around the values.
- Will also put anything stored with the Extra Text hotkey at the start of the column.
- This hotkey is the same as Column Format but doesnt remove the first and last character of each entry.
- This hotkey takes the link to discover and makes the hyperlink format.
- discovertab.URL → This [Discover tab](discovertab.URL) shows
- This hotkey puts what ever you have copied into backticks( ` ).
eg.
exampleText → `exampleText`
- This hotkey takes the hyperlink to people finder and adds text to have the users title and department listed easily.
- Optionally will put the user name, title, and department into the formated text.
eg.
people\finder.URL → [{Extra Text}](people\finder.URL) is a `{Extra Text 1}` in the `{Extra Text 2}` department.
- This hotkey puts the copied text into a format to search in hive.
- ie. put astricks( * ) around each word and replacing special characters( - \s \ _ ) with astricks( * ) as well.
- This hotkey puts .parent inbetween process and name or pid for discover queries.
eg.
(process.name: example.exe and process.pid: 1234) → (process.parent.name: example.exe and process.parent.pid: 1234)
- This hotkey removes any blank lines when copying a coulmn from discover. This will also put backticks( ` ) around each row.
- This hotkey takes the ip info from the timeline view and formats it nicely.
eg.
source 123.456.7.890 : 1234, destination 098.765.4.321 : 4321 → Source `123.456.7[.]890` : `1234` \n Destination `098.765.4[.]321` : `4321`
- This hotkey puts two columns next to each other with a vertical line( | ) between the two columns.
- The coulmn that you want on the left should be stored by fromatting into column format and then use the
Extra Text 1Hotkey. Then copy your new column and use this hotkey and it will format your right hand column and put the two columns next to each other.
- This hotkey will remove duplicate entries in the column format. This will also put backticks( ` ) around each row.
- This hotkey puts backticks( ` ) around each field when copying from a row in discover.
eg.
Timestamp @ 10 \t exampleField1 \t example field 2 → `Timestamp @ 10` `exampleField1` `example field 2` - Also works with any tab deliniated line.
- This hotkey takes a copied line from the timeline view and puts the process in backticks( ` ) and puts the command on a new line. By combining the process args together and puts the command in backticks( ` ) as well.
eg. process.exe \n (process.pid field) \n processArg1 \n porcessArg2 \n ect.
↳ {Type if this is the Process or the Parent from the timeline view}`process.exe`
↳ Command `processArg1 processArg2 ect.` - This is used on the line within the timeline view that has
user.name\user.domain@host.nameinprocess.working_directorystarted processprocess.nameprocess.pidprocess.argswith exit codeprocess.exit_codevia parent processprocess.parent.nameprocess.parent.pidwith resultevent.outcome
- This hotkey takes the Email To Address, Email From Address Email Subject, and Email Reporter fields to write an observation statement.
eg.
Email To Address `example@address.ex1`
Email From Address `example@address.ex2`
Email Subject `exampleSubject`
{any number of inrelevant lines, your choice based off what you copy}
Email Reporter `example@address.ex3`
↳ Email with Subject `exampleSubject` from `example@address.ex2` sent to `example@address.ex1` was flagged as a Phishing Email by `example@address.ex3`.
- This hotkey takes the url for a website case and optionally the link name and text after the link and formates into a hyperlink.
- To add the link name, copy it to your clipboard and then use the
Extra Texthotkey to store it. - To add text after the link, copy it to your clipboard and then use the
Extra Text 1hotkey to store it. Then copy the url and use this hotkey. - website.URL → [{value stored with the Extra Text Hotkey}](website.URL) {value stored with the Extra Text 1 Hotkey}
- This hotkey takes the url for Virus Total, the process or file your checking and optionally the maliciousness and popular threat label and formates into a hyperlink.
- To add the process or file name, copy it to your clipboard and then use the
Extra Texthotkey to store it. - To add maliciousness and popular threat label, copy the ratio of vendors flagging over vendors testing to your clipboard and then use the
Extra Text 1hotkey to store it. Next copy the popular threat label and use theExtra Text 2hotkey to store it. Need both to get this variation of the format. - Then copy the url and use this hotkey.
- website.URL, nothing stored in
Extra Text 2→ [VT](website.URL) shows `{value stored with firstText}` is nonmalicious - website.URL, something stored in
Extra Text 2→ [VT](website.URL) shows {value stored in extraText1 (will look like x/y)} vendors flag `{value stored in firstText}` as malicious with `{value stored in extraText2}` being a popular threat label.
- This hotkey takes the text from the exception lists and formats it nicely. It removes the extreneous information, keeping only the exception name and the logic behind the exception.
- This hotkey takes the host name saved with the First Text hotkey and puts the pipe(
|) between the alert name that is copied. - This wil also put a second host name after the first if its saved with the Extra Text1 hotkey.
- If nothing is stored with the First Text hotkey, it will put Multiple Hosts in its place.