├── .gitignore ├── .vs ├── Athena │ └── v15 │ │ └── .suo ├── VSWorkspaceState.json └── slnx.sqlite ├── LICENSE.md ├── README.md ├── images ├── 1.png ├── 10.png ├── 11.png ├── 12.png ├── 13.png ├── 14.png ├── 15.png ├── 16.png ├── 17.png ├── 18.png ├── 2.png ├── 3.png ├── 4.png ├── 5.png ├── 6.png ├── 7.png ├── 8.png └── 9.png ├── releases ├── Athena_Release_V0.5.zip └── Athena_Release_V0.6.zip ├── src └── Athena │ ├── .vs │ └── Athena │ │ └── v15 │ │ └── .suo │ ├── Athena.sln │ ├── IOCMaker.v12.suo │ ├── IOCMaker │ ├── AddIndicatorForm.Designer.cs │ ├── AddIndicatorForm.cs │ ├── AddIndicatorForm.resx │ ├── App.config │ ├── AthenaPlugins.cs │ ├── GenericParsing.dll │ ├── IOCCollection.cs │ ├── IOCMaker.csproj │ ├── ImportCSV.Designer.cs │ ├── ImportCSV.cs │ ├── ImportCSV.resx │ ├── MainWindow.Designer.cs │ ├── MainWindow.cs │ ├── MainWindow.resx │ ├── Plugins │ │ ├── MISPJsonExportPlugin.cs │ │ ├── SnortRulesExportPlugin.cs │ │ ├── Stix1ExportPlugin.cs │ │ └── YaraRulesExportPlugin.cs │ ├── Program.cs │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ ├── Resources.resx │ │ ├── Settings.Designer.cs │ │ └── Settings.settings │ ├── RelationshipAddForm.Designer.cs │ ├── RelationshipAddForm.cs │ ├── RelationshipAddForm.resx │ ├── VisualiseDataForm.Designer.cs │ ├── VisualiseDataForm.cs │ ├── VisualiseDataForm.resx │ ├── icons │ │ ├── Add-25.png │ │ ├── CSV-25.png │ │ ├── Delete-25.png │ │ ├── Edit Property-25.png │ │ ├── Link-25.png │ │ ├── ProgramIcon.ico │ │ ├── Tree Structure-25.png │ │ └── loading.gif │ ├── obj │ │ ├── Debug │ │ │ ├── Athena.AddIndicatorForm.resources │ │ │ ├── Athena.ImportCSV.resources │ │ │ ├── Athena.MainWindow.resources │ │ │ ├── Athena.Properties.Resources.resources │ │ │ ├── Athena.RelationshipAddForm.resources │ │ │ ├── Athena.VisualiseDataForm.resources │ │ │ ├── Athena.exe │ │ │ ├── Athena.pdb │ │ │ ├── CoreCompileInputs.cache │ │ │ ├── DesignTimeResolveAssemblyReferences.cache │ │ │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ │ │ ├── IOCMaker.csproj.FileListAbsolute.txt │ │ │ ├── IOCMaker.csproj.GenerateResource.Cache │ │ │ ├── IOCMaker.csprojResolveAssemblyReference.cache │ │ │ ├── TempPE │ │ │ │ └── Properties.Resources.Designer.cs.dll │ │ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs │ │ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs │ │ │ └── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs │ │ └── Release │ │ │ ├── Athena.AddIndicatorForm.resources │ │ │ ├── Athena.ImportCSV.resources │ │ │ ├── Athena.MainWindow.resources │ │ │ ├── Athena.Properties.Resources.resources │ │ │ ├── Athena.RelationshipAddForm.resources │ │ │ ├── Athena.VisualiseDataForm.resources │ │ │ ├── Athena.exe │ │ │ ├── Athena.pdb │ │ │ ├── CoreCompileInputs.cache │ │ │ ├── DesignTimeResolveAssemblyReferences.cache │ │ │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ │ │ ├── IOCMaker.AddIndicatorForm.resources │ │ │ ├── IOCMaker.ImportCSV.resources │ │ │ ├── IOCMaker.MainWindow.resources │ │ │ ├── IOCMaker.Properties.Resources.resources │ │ │ ├── IOCMaker.RelationshipAddForm.resources │ │ │ ├── IOCMaker.VisualiseForm.resources │ │ │ ├── IOCMaker.csproj.FileListAbsolute.txt │ │ │ ├── IOCMaker.csproj.GenerateResource.Cache │ │ │ ├── IOCMaker.csprojResolveAssemblyReference.cache │ │ │ ├── IOCMaker.exe │ │ │ ├── IOCMaker.pdb │ │ │ ├── TempPE │ │ │ └── Properties.Resources.Designer.cs.dll │ │ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs │ │ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs │ │ │ └── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs │ └── packages.config │ └── packages │ ├── Microsoft.Msagl.1.0.2 │ ├── Microsoft.Msagl.1.0.2.nupkg │ └── lib │ │ └── net40 │ │ ├── Microsoft.Msagl.XML │ │ └── Microsoft.Msagl.dll │ ├── Microsoft.Msagl.Drawing.1.0.2 │ ├── Microsoft.Msagl.Drawing.1.0.2.nupkg │ └── lib │ │ └── net40 │ │ ├── Microsoft.Msagl.Drawing.XML │ │ └── Microsoft.Msagl.Drawing.dll │ ├── Microsoft.Msagl.GraphViewerGDI.1.0.2 │ ├── Microsoft.Msagl.GraphViewerGDI.1.0.2.nupkg │ └── lib │ │ └── net40 │ │ ├── Microsoft.Msagl.GraphViewerGDI.XML │ │ └── Microsoft.Msagl.GraphViewerGdi.dll │ ├── Newtonsoft.Json.10.0.2 │ ├── LICENSE.md │ ├── Newtonsoft.Json.10.0.2.nupkg │ ├── lib │ │ ├── net20 │ │ │ ├── Newtonsoft.Json.dll │ │ │ └── Newtonsoft.Json.xml │ │ ├── net35 │ │ │ ├── Newtonsoft.Json.dll │ │ │ └── Newtonsoft.Json.xml │ │ ├── net40 │ │ │ ├── Newtonsoft.Json.dll │ │ │ └── Newtonsoft.Json.xml │ │ ├── net45 │ │ │ ├── Newtonsoft.Json.dll │ │ │ └── Newtonsoft.Json.xml │ │ ├── netstandard1.0 │ │ │ ├── Newtonsoft.Json.dll │ │ │ └── Newtonsoft.Json.xml │ │ ├── netstandard1.3 │ │ │ ├── Newtonsoft.Json.dll │ │ │ └── Newtonsoft.Json.xml │ │ ├── portable-net40+sl5+win8+wpa81+wp8 │ │ │ ├── Newtonsoft.Json.dll │ │ │ └── Newtonsoft.Json.xml │ │ └── portable-net45+win8+wpa81+wp8 │ │ │ ├── Newtonsoft.Json.dll │ │ │ └── Newtonsoft.Json.xml │ └── tools │ │ └── install.ps1 │ ├── Resource.Embedder.1.2.2 │ ├── Mono.Cecil.Mdb.dll │ ├── Mono.Cecil.Pdb.dll │ ├── Mono.Cecil.Rocks.dll │ ├── Mono.Cecil.dll │ ├── Resource.Embedder.1.2.2.nupkg │ ├── ResourceEmbedder.Core.dll │ ├── ResourceEmbedder.Core.pdb │ ├── ResourceEmbedder.MsBuild.dll │ ├── ResourceEmbedder.MsBuild.pdb │ ├── Tools │ │ ├── install.ps1 │ │ └── uninstall.ps1 │ └── build │ │ └── Resource.Embedder.targets │ └── repositories.config └── thirdpartylicenses ├── License - GenericParsing by Andrew Rissing.txt ├── License - Icons8.txt ├── License - Microsoft Automatic Graph Layout.txt └── License - Newtonsoft.Json.txt /.gitignore: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # This .gitignore file was automatically created by Microsoft(R) Visual Studio. 3 | ################################################################################ 4 | 5 | /src/Athena/IOCMaker/bin/Debug/Athena.exe 6 | /src/Athena/IOCMaker/bin/Debug 7 | /src/Athena/IOCMaker/bin/Debug 8 | -------------------------------------------------------------------------------- /.vs/Athena/v15/.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/.vs/Athena/v15/.suo -------------------------------------------------------------------------------- /.vs/VSWorkspaceState.json: -------------------------------------------------------------------------------- 1 | { 2 | "ExpandedNodes": [ 3 | "", 4 | "\\src\\Athena", 5 | "\\src\\Athena\\IOCMaker\\bin" 6 | ], 7 | "SelectedNode": "\\releases", 8 | "PreviewInSolutionExplorer": false 9 | } -------------------------------------------------------------------------------- /.vs/slnx.sqlite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/.vs/slnx.sqlite -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012, 2013 MWR InfoSecurity 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of MWR InfoSecurity nor the names of its contributors 13 | may be used to endorse or promote products derived from this software 14 | without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL MWR INFOSECURITY BE LIABLE FOR ANY 20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | 27 | 28 | This licence does not apply to the following components: 29 | 30 | - GenericParsing located at /src/IOCMaker/GenericParsing.dll and releases/Athena_Release_\*.zip/GenericParsing.dll 31 | License and software available at: https://github.com/AndrewRissing/GenericParsing 32 | 33 | - Microsoft Automatic Graph Layout located at /src/IOCMaker and releases/Athena_Release_\*.zip/Microsoft.Msagl\*.dll 34 | It is released under the MIT License 35 | License and software available at: https://github.com/Microsoft/automatic-graph-layout 36 | 37 | - Json.NET located at /src/IOCMaker/ and releases/Athena_Release_\*.zip/Newtonsoft.Json.dll 38 | It is released under the MIT License 39 | License and software available at: https://www.newtonsoft.com/json and https://github.com/JamesNK/Newtonsoft.Json 40 | 41 | - Icons used within the software provided for free under CC BY-ND 3.0 by Icons8: https://icons8.com/ 42 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Athena 2 | ====== 3 | 4 | Athena is a graphical tool to create and output Threat Intelligence information in various file formats. Currently, TI information can be exported as STIX 1.1 XML files or MISP JSON files. 5 | 6 | The latest release is: Athena_Release_V0.6.zip (Windows 32-bit, .NET 4.5) 7 | 8 | Athena has been designed to allow the quick and efficient creation of IOC files post-investigation by IR teams – and to allow those files to be created in various formats. This enables the sharing of intelligence between the IR team and other threat-hunting teams in whatever format is best suited for manual review or ingestion into automated systems. 9 | 10 | The Athena program takes manual input of “Incident” details, and then either manual or CSV input of “Observables”, which are the individual IOCs themselves. This collection of incident information and Observables can be saved to a proprietary format (for later editing) and/or exported to a supported format (currently STIX 1.1 XML files or MISP JSON files). 11 | 12 | ### Program Dependencies and installation 13 | 14 | The program requires no special installation. Simply unzip the Athena_Vxx.zip file to a directory, and then run Athena.exe. 15 | 16 | Athena is written in C# and targets .NET 4.5, 32-bit. It should run on any Windows operating system on which .NET 4.5 is, or can be, installed. 17 | 18 | 19 | 20 | 21 | 22 | Program Usage 23 | ------------- 24 | 25 | Once started, the program will present the user with a blank window: 26 | 27 | Choose File -> New to start creating a new “Investigation” and “Observables”. 28 | 29 | Choose File -> Open to open a previously saved Athena file. 30 | 31 | **Note** – Athena only opens and edits the propriety format to which it saves. It does NOT currently open or edit any of the file types it can export, these are export only. 32 | 33 | 34 | 35 | #### Incident Details 36 | 37 | Once a new incident has been opened or created, the first step is to check and edit the incident details section of the window: 38 | 39 | 40 | 41 | The field names should be self-explanatory, but are open to your interpretation as to their best values for your use case. 42 | 43 | **Note** – Some of the fields in the “Incident Overview” section are used to generate the “ID” values of any observables added to this collection. Therefore it is important that all Incident details are completed at this stage **BEFORE** adding any observables - to ensure ID names are consistent in your collection. The program will try to warn you if you miss any values. 44 | 45 | 46 | 47 | Once you have completed the incident details section, click the “Plus” icon to begin adding observables. 48 | 49 | #### Manually Adding Observables 50 | 51 | Clicking the “Plus” icon will open the “Add/Edit Observable” window. 52 | 53 | The first step is to choose the type of observable you wish to add. 54 | 55 | Currently the supported types are: 56 | * Domain 57 | * IP Address 58 | * Malware Sample 59 | * Registry 60 | 61 | 62 | 63 | The interface will change dependant on the type of observable you select, displaying on the fields relevant to that observable type. 64 | 65 | Fill in the details for your selected observable type. 66 | 67 | 68 | 69 | 70 | Once done, select “Save” to create the observable and return to the main screen or “Save and New” to save this observable and immediately begin creating a new one. 71 | 72 | The “Malware Sample” observable type has an additional feature which allows the user to generate the observable information from the malware file itself. 73 | To use this, select the “Malware Sample” observable type, and then click the “Generate Hashes of a File” button. 74 | Select your malware file, and wait while the hashes are generated. 75 | Complete any missing details and save your observable. 76 | 77 | 78 | 79 | #### Creating Relationships Between Observables 80 | 81 | Athena allows observables to be linked together to give context to individual observables. The relationships follow the STIX vocabulary. This may be updated in future versions to allow user-created and more flexible relationships. 82 | To begin linking observables together, click the “Link” Icon on the main window: 83 | 84 | 85 | 86 | This displays the “Add a Relationship” window. 87 | 88 | **Note** – It doesn’t matter which Observable is selected in the main window when you click the “Link” icon, you can add relationships between any observables you like from this window. 89 | 90 | 91 | 92 | To add a relationship between two or more observables, select one or multiple observables from the left hand box (Hold Control or Shift keys to select multiple observables). 93 | 94 | Next, choose the type of relationship you wish to add, by choosing a description from the STIX vocabulary in the drop down menu. 95 | 96 | Finally, select the observable or observables from the right hand side, to complete the relationship. 97 | 98 | Click “Save” to save the relationship and return to the main window or “Save and Another” to save this relationship and immediately add another one. 99 | 100 | **Note** – Multiple relationships are resolved into individual relationships between objects automatically 101 | 102 | **Note**– To delete a relationship, choose the observable in the main window, then highlight the relationship you wish to delete in the “Relationships” box. Click the dustbin “Delete” icon on the right side of the relationship box. This relationship will be deleted and any broken relationships automatically resolved. 103 | 104 | **Note** – Deleting an observable automatically also deletes any relationships referencing that observable. There is no need to manually delete relationships first. 105 | 106 | #### Visualising Relationships 107 | 108 | **Note** – This feature is still in development, and will continue to improve. 109 | 110 | Athena provides a functionality to visualise the relationships you have created between observables. This allows the user to see the way their observables interact, and also more easily identify “orphaned” observables which do not have any relationships. 111 | 112 | Access the visualisation window by clicking the “Relationships” icon on the main window: 113 | 114 | 115 | 116 | 117 | The “Visualise Data” window opens, showing the observables and their relationships. 118 | 119 | 120 | 121 | Items can be dragged to rearrange the diagram to more easily see your relationships. 122 | 123 | Clicking the Save icon at the top of the window will allow you to save the diagram into an image. 124 | 125 | #### Importing Observables from a CSV 126 | 127 | Athena can import observables in bulk from a CSV file. This is useful for bulk loading observables already stored elsewhere and for limiting the number of clicks needed in the interface. 128 | 129 | **Note** – The CSV format accepted by Athena is fairly rigid in this iteration. It is planned to relax this and allow on-the-fly mapping of detected columns in the CSV in future versions. 130 | 131 | To mass import from a CSV, choose the CSV import icon on the main window: 132 | 133 | 134 | 135 | This opens the CSV Import window. 136 | 137 | 138 | 139 | The blue hyperlink opens the template.csv file allowing the user to populate the IOCs they wish to load. 140 | 141 | **Note** – the template file is saved in the working directory of the program. If you save any sensitive information to this CSV, remember to clear it afterwards. 142 | 143 | The template CSV file is structured as per the screenshot below: 144 | 145 | 146 | 147 | Complete the template as per the example below: 148 | 149 | 150 | 151 | **Note** – The columns displayed across the top of the CSV are all the possible fields for all possible IOC types. The IOC types are displayed down the left hand side in column A. Not all columns apply to all IOC types. Any data supplied in a column which does not apply to that IOC type will be ignored on import. For example, if you supply a value in the “Hashes.MD5” column for an “IP Address” that hash will be ignored. 152 | 153 | To import your CSV, save and close the document and choose it in the “Import CSV” window, then press “Load/Validate”. 154 | 155 | The loaded observables are displayed in the right hand box. Clicking “Save/Close” will add these to your collection. 156 | 157 | Any errors with you CSV will be shown in the box on the left. 158 | 159 | 160 | 161 | #### Building Relationships and visualising again 162 | 163 | Now there are more observables added to our collection, we can build the relationships between them as we did before, and visualise them: 164 | 165 | 166 | 167 | #### Exporting Data 168 | 169 | Choose File -> Save to save your collection locally to guard against program crashes and to allow you to edit and re-export your collection later. 170 | 171 | When you wish to export to STIX or MISP formats, choose File -> Export and then select your desired format. 172 | 173 | 174 | 175 | You will be prompted to select the location to save the file, and the export will begin. 176 | 177 | Depending on the size of the collection of observables, this may take a few seconds. 178 | 179 | 180 | 181 | 182 | 183 | Program Information 184 | ------------------- 185 | 186 | ### Program Version History and Change Log 187 | #### Version 0.6 – Novemberr 2017 188 | Converted export functionality to one compatible with enababling plugins in future 189 | Added Snort Rules and Yara Rules as output formats 190 | 191 | #### Version 0.5 – September 2017 192 | Save/Load format changed. 193 | Various stability and bug fixes 194 | 195 | #### Version 0.4 – August 2017 196 | Visualisation functionality upgraded 197 | Program named Athena 198 | Various stability and bug fixes 199 | 200 | #### Version 0.02 – June 2017 201 | MISP JSON Support added 202 | Visualisation functionality added 203 | Stability and bug fixes 204 | 205 | #### Version 0.01 – April 2017 206 | Initial functionality and program creation. 207 | STIX 1.1 Export support. 208 | 209 | ### Support 210 | Please contact us with bugs, feature requests or questions. This can be done via the git repo by raising issues or publicly by social media. 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | -------------------------------------------------------------------------------- /images/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/images/1.png -------------------------------------------------------------------------------- /images/10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/images/10.png -------------------------------------------------------------------------------- /images/11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/images/11.png -------------------------------------------------------------------------------- /images/12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/images/12.png -------------------------------------------------------------------------------- /images/13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/images/13.png -------------------------------------------------------------------------------- /images/14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/images/14.png -------------------------------------------------------------------------------- /images/15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/images/15.png -------------------------------------------------------------------------------- /images/16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/images/16.png -------------------------------------------------------------------------------- /images/17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/images/17.png -------------------------------------------------------------------------------- /images/18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/images/18.png -------------------------------------------------------------------------------- /images/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/images/2.png -------------------------------------------------------------------------------- /images/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/images/3.png -------------------------------------------------------------------------------- /images/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/images/4.png -------------------------------------------------------------------------------- /images/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/images/5.png -------------------------------------------------------------------------------- /images/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/images/6.png -------------------------------------------------------------------------------- /images/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/images/7.png -------------------------------------------------------------------------------- /images/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/images/8.png -------------------------------------------------------------------------------- /images/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/images/9.png -------------------------------------------------------------------------------- /releases/Athena_Release_V0.5.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/releases/Athena_Release_V0.5.zip -------------------------------------------------------------------------------- /releases/Athena_Release_V0.6.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/releases/Athena_Release_V0.6.zip -------------------------------------------------------------------------------- /src/Athena/.vs/Athena/v15/.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/.vs/Athena/v15/.suo -------------------------------------------------------------------------------- /src/Athena/Athena.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.31101.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IOCMaker", "IOCMaker\IOCMaker.csproj", "{6FD2CEA0-B913-4255-A226-75797A86CB95}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {6FD2CEA0-B913-4255-A226-75797A86CB95}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {6FD2CEA0-B913-4255-A226-75797A86CB95}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {6FD2CEA0-B913-4255-A226-75797A86CB95}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {6FD2CEA0-B913-4255-A226-75797A86CB95}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /src/Athena/IOCMaker.v12.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/IOCMaker.v12.suo -------------------------------------------------------------------------------- /src/Athena/IOCMaker/AddIndicatorForm.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace Athena 2 | { 3 | partial class AddIndicatorForm 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AddIndicatorForm)); 32 | this.label1 = new System.Windows.Forms.Label(); 33 | this.IndicatorTypeDropDownBox = new System.Windows.Forms.ComboBox(); 34 | this.SaveButton = new System.Windows.Forms.Button(); 35 | this.SaveAndNewButton = new System.Windows.Forms.Button(); 36 | this.CancelNewButton = new System.Windows.Forms.Button(); 37 | this.IndicatorFieldsPanel = new System.Windows.Forms.Panel(); 38 | this.GenerateHashesButton = new System.Windows.Forms.Button(); 39 | this.GenerateHashesProgressBar = new System.Windows.Forms.ProgressBar(); 40 | this.SuspendLayout(); 41 | // 42 | // label1 43 | // 44 | this.label1.AutoSize = true; 45 | this.label1.Location = new System.Drawing.Point(12, 26); 46 | this.label1.Name = "label1"; 47 | this.label1.Size = new System.Drawing.Size(91, 13); 48 | this.label1.TabIndex = 0; 49 | this.label1.Text = "Observable Type:"; 50 | // 51 | // IndicatorTypeDropDownBox 52 | // 53 | this.IndicatorTypeDropDownBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 54 | this.IndicatorTypeDropDownBox.FormattingEnabled = true; 55 | this.IndicatorTypeDropDownBox.Location = new System.Drawing.Point(109, 23); 56 | this.IndicatorTypeDropDownBox.Name = "IndicatorTypeDropDownBox"; 57 | this.IndicatorTypeDropDownBox.Size = new System.Drawing.Size(194, 21); 58 | this.IndicatorTypeDropDownBox.TabIndex = 1; 59 | this.IndicatorTypeDropDownBox.SelectedIndexChanged += new System.EventHandler(this.IndicatorTypeDropDownBox_SelectedIndexChanged); 60 | // 61 | // SaveButton 62 | // 63 | this.SaveButton.Location = new System.Drawing.Point(375, 360); 64 | this.SaveButton.Name = "SaveButton"; 65 | this.SaveButton.Size = new System.Drawing.Size(88, 23); 66 | this.SaveButton.TabIndex = 2; 67 | this.SaveButton.Text = "Save"; 68 | this.SaveButton.UseVisualStyleBackColor = true; 69 | this.SaveButton.Click += new System.EventHandler(this.SaveButton_Click); 70 | // 71 | // SaveAndNewButton 72 | // 73 | this.SaveAndNewButton.Location = new System.Drawing.Point(469, 360); 74 | this.SaveAndNewButton.Name = "SaveAndNewButton"; 75 | this.SaveAndNewButton.Size = new System.Drawing.Size(88, 23); 76 | this.SaveAndNewButton.TabIndex = 3; 77 | this.SaveAndNewButton.Text = "Save and New"; 78 | this.SaveAndNewButton.UseVisualStyleBackColor = true; 79 | this.SaveAndNewButton.Click += new System.EventHandler(this.SaveAndNewButton_Click); 80 | // 81 | // CancelNewButton 82 | // 83 | this.CancelNewButton.Location = new System.Drawing.Point(15, 360); 84 | this.CancelNewButton.Name = "CancelNewButton"; 85 | this.CancelNewButton.Size = new System.Drawing.Size(88, 23); 86 | this.CancelNewButton.TabIndex = 4; 87 | this.CancelNewButton.Text = "Cancel"; 88 | this.CancelNewButton.UseVisualStyleBackColor = true; 89 | this.CancelNewButton.Click += new System.EventHandler(this.button3_Click); 90 | // 91 | // IndicatorFieldsPanel 92 | // 93 | this.IndicatorFieldsPanel.Location = new System.Drawing.Point(15, 63); 94 | this.IndicatorFieldsPanel.Name = "IndicatorFieldsPanel"; 95 | this.IndicatorFieldsPanel.Size = new System.Drawing.Size(542, 291); 96 | this.IndicatorFieldsPanel.TabIndex = 5; 97 | // 98 | // GenerateHashesButton 99 | // 100 | this.GenerateHashesButton.Location = new System.Drawing.Point(392, 21); 101 | this.GenerateHashesButton.Name = "GenerateHashesButton"; 102 | this.GenerateHashesButton.Size = new System.Drawing.Size(161, 23); 103 | this.GenerateHashesButton.TabIndex = 6; 104 | this.GenerateHashesButton.Text = "Generate Hashes of a File"; 105 | this.GenerateHashesButton.UseVisualStyleBackColor = true; 106 | this.GenerateHashesButton.Click += new System.EventHandler(this.GenerateHashesButton_Click); 107 | // 108 | // GenerateHashesProgressBar 109 | // 110 | this.GenerateHashesProgressBar.Location = new System.Drawing.Point(392, 47); 111 | this.GenerateHashesProgressBar.Name = "GenerateHashesProgressBar"; 112 | this.GenerateHashesProgressBar.Size = new System.Drawing.Size(161, 10); 113 | this.GenerateHashesProgressBar.TabIndex = 7; 114 | // 115 | // AddIndicatorForm 116 | // 117 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 118 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 119 | this.ClientSize = new System.Drawing.Size(565, 395); 120 | this.Controls.Add(this.GenerateHashesProgressBar); 121 | this.Controls.Add(this.GenerateHashesButton); 122 | this.Controls.Add(this.IndicatorFieldsPanel); 123 | this.Controls.Add(this.CancelNewButton); 124 | this.Controls.Add(this.SaveAndNewButton); 125 | this.Controls.Add(this.SaveButton); 126 | this.Controls.Add(this.IndicatorTypeDropDownBox); 127 | this.Controls.Add(this.label1); 128 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; 129 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 130 | this.Name = "AddIndicatorForm"; 131 | this.Text = "Edit Observable"; 132 | this.ResumeLayout(false); 133 | this.PerformLayout(); 134 | 135 | } 136 | 137 | #endregion 138 | 139 | private System.Windows.Forms.Label label1; 140 | private System.Windows.Forms.ComboBox IndicatorTypeDropDownBox; 141 | private System.Windows.Forms.Button SaveButton; 142 | private System.Windows.Forms.Button SaveAndNewButton; 143 | private System.Windows.Forms.Button CancelNewButton; 144 | private System.Windows.Forms.Panel IndicatorFieldsPanel; 145 | private System.Windows.Forms.Button GenerateHashesButton; 146 | private System.Windows.Forms.ProgressBar GenerateHashesProgressBar; 147 | } 148 | } -------------------------------------------------------------------------------- /src/Athena/IOCMaker/AddIndicatorForm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | using System.Windows.Forms; 10 | using System.IO; 11 | using System.Threading; 12 | using System.Security.Cryptography; 13 | 14 | 15 | namespace Athena 16 | { 17 | public partial class AddIndicatorForm : Form 18 | { 19 | public bool openagain; 20 | public bool clearform; 21 | bool editmode; 22 | List observabletypes; 23 | 24 | //The indicator that we created 25 | public ObservableObject CreatedObservable; 26 | 27 | public AddIndicatorForm(ref ObservableCollection stixcollection,ObservableObject editobservable) 28 | { 29 | InitializeComponent(); 30 | 31 | editmode = true; 32 | // SaveAndCopy.Enabled = false; 33 | SaveAndNewButton.Enabled = false; 34 | 35 | observabletypes = new List(); 36 | observabletypes.Add(editobservable); 37 | IndicatorTypeDropDownBox.Items.Add(editobservable.FriendlyTypeName); 38 | IndicatorTypeDropDownBox.SelectedIndex = 0; 39 | IndicatorTypeDropDownBox.Enabled = false; 40 | GenerateHashesButton.Visible = false; 41 | GenerateHashesProgressBar.Visible = false; 42 | 43 | } 44 | 45 | public AddIndicatorForm(ref ObservableCollection stixcollection) 46 | { 47 | InitializeComponent(); 48 | editmode = false; 49 | openagain = false; 50 | clearform = true; 51 | observabletypes = new List(); 52 | GenerateHashesButton.Visible = false; 53 | GenerateHashesProgressBar.Visible = false; 54 | //Get a dummy object for each type 55 | foreach (ObservableObject.ObservableType type in Enum.GetValues(typeof(ObservableObject.ObservableType))) 56 | { 57 | observabletypes.Add(new ObservableObject(type,ref stixcollection)); 58 | IndicatorTypeDropDownBox.Items.Add(observabletypes.Last().FriendlyTypeName); 59 | } 60 | } 61 | 62 | 63 | 64 | private void IndicatorTypeDropDownBox_SelectedIndexChanged(object sender, EventArgs e) 65 | { 66 | 67 | IndicatorFieldsPanel.Controls.Clear(); 68 | Point location = new Point(0,30); 69 | int xspacer = 10; 70 | int yspacer = 10; 71 | int maxlabelwidth = 0; 72 | 73 | //Display the "generate hashes" button if we are adding a malware sample 74 | if (observabletypes.Find(x => x.FriendlyTypeName == IndicatorTypeDropDownBox.SelectedItem.ToString()).FriendlyTypeName == "Malware Sample") 75 | { 76 | GenerateHashesButton.Visible = true; 77 | GenerateHashesButton.Enabled = true; 78 | //GenerateHashesProgressBar.Visible = false; 79 | } 80 | else 81 | { 82 | GenerateHashesButton.Visible = false; 83 | GenerateHashesButton.Enabled = false; 84 | GenerateHashesProgressBar.Visible = false; 85 | } 86 | 87 | 88 | //Add the ID of this observable to the screen 89 | Label label = new Label(); 90 | label.Text = observabletypes.Find(x => x.FriendlyTypeName == IndicatorTypeDropDownBox.SelectedItem.ToString()).ID; 91 | label.Name = "IDLabel"; 92 | label.Width = labelwidth(label); 93 | IndicatorFieldsPanel.Controls.Add(label); 94 | 95 | 96 | 97 | //Get the maximum label width, to keep controls in line 98 | foreach (ObservableObjectField F in observabletypes.Find(x => x.FriendlyTypeName == IndicatorTypeDropDownBox.SelectedItem.ToString()).Fields) 99 | { 100 | Label lbl = new Label(); 101 | lbl.Text = F.FieldName; 102 | lbl.Width = labelwidth(lbl); 103 | if (maxlabelwidth < lbl.Width) maxlabelwidth = lbl.Width; 104 | } 105 | 106 | //Special line to add a "GetDetailsFromSampleFile" button 107 | if (observabletypes.Find(x => x.FriendlyTypeName == IndicatorTypeDropDownBox.SelectedItem.ToString()).FriendlyTypeName == "Malware Sample") 108 | { 109 | GenerateHashesButton.Visible = true; 110 | } 111 | else 112 | { 113 | GenerateHashesButton.Visible = false; 114 | } 115 | 116 | 117 | foreach (ObservableObjectField F in observabletypes.Find(x => x.FriendlyTypeName == IndicatorTypeDropDownBox.SelectedItem.ToString()).Fields) 118 | { 119 | Label lbl = new Label(); 120 | lbl.Text = F.FieldName + ":"; 121 | lbl.Name = F.FieldName.Replace(" ","") + "_Label"; 122 | lbl.Width = labelwidth(lbl); 123 | IndicatorFieldsPanel.Controls.Add(lbl); 124 | 125 | //Set the location of the label 126 | lbl.Location = location; 127 | 128 | if(F.FieldType == ObservableObjectField.GUIFieldType.TextBox || F.FieldType == ObservableObjectField.GUIFieldType.LongTextBox) 129 | { 130 | TextBox txt = new TextBox(); 131 | txt.Name = F.FieldName.Replace(" ", ""); 132 | if (F.FieldType == ObservableObjectField.GUIFieldType.LongTextBox) 133 | { 134 | txt.Multiline = true; 135 | txt.Width = 400; 136 | txt.Height = 75; 137 | } 138 | else 139 | { 140 | txt.Width = 400; 141 | // txt.Height = 50; 142 | } 143 | location.X = maxlabelwidth + xspacer; 144 | txt.Location = location; 145 | 146 | if (editmode) txt.Text = F.Value; 147 | 148 | 149 | IndicatorFieldsPanel.Controls.Add(txt); 150 | location.X = 0; 151 | location.Y += txt.Height + yspacer; 152 | } 153 | else if(F.FieldType == ObservableObjectField.GUIFieldType.DropDown) 154 | { 155 | ComboBox txt = new ComboBox(); 156 | txt.DropDownStyle = ComboBoxStyle.DropDownList; 157 | txt.Name = F.FieldName.Replace(" ", ""); 158 | txt.Width = 400; 159 | 160 | foreach (string s in F.DropDownOptions) txt.Items.Add(s); 161 | 162 | if (editmode) txt.SelectedItem = F.Value; 163 | 164 | 165 | location.X = maxlabelwidth + xspacer; 166 | txt.Location = location; 167 | IndicatorFieldsPanel.Controls.Add(txt); 168 | location.X = 0; 169 | location.Y += txt.Height + yspacer; 170 | } 171 | 172 | 173 | } 174 | } 175 | 176 | private int labelwidth(Label lbl) 177 | { 178 | using (Graphics g = CreateGraphics()) 179 | { 180 | SizeF size = g.MeasureString(lbl.Text, lbl.Font); 181 | return (int)size.Width+5; 182 | } 183 | } 184 | 185 | private void button3_Click(object sender, EventArgs e) 186 | { 187 | if (DialogResult.OK == MessageBox.Show("Discard this information?", "Discard", MessageBoxButtons.OKCancel, MessageBoxIcon.Question)) 188 | { 189 | this.DialogResult = DialogResult.Cancel; 190 | this.Close(); 191 | } 192 | } 193 | 194 | private void SaveAndNewButton_Click(object sender, EventArgs e) 195 | { 196 | SaveandReturn(true,true); 197 | } 198 | 199 | private void SaveButton_Click(object sender, EventArgs e) 200 | { 201 | SaveandReturn(); 202 | } 203 | 204 | private void GenerateIDs() 205 | { 206 | 207 | } 208 | 209 | private void SaveandReturn(bool another = false,bool clean = false) 210 | { 211 | if (IndicatorTypeDropDownBox.SelectedItem == null) return; 212 | 213 | 214 | //Create a stix object and get the values from the typed data 215 | ObservableObject newobs = observabletypes.Find(x => x.FriendlyTypeName == IndicatorTypeDropDownBox.SelectedItem.ToString()); 216 | for(int i=0;i PopulateFileInfo(diag.FileName)); 267 | filehashthread.Start(); 268 | } 269 | catch 270 | { 271 | GenerateHashesProgressBar.Visible = false; 272 | MessageBox.Show("Error starting to hash file"); 273 | } 274 | } 275 | } 276 | 277 | private void PopulateFileInfo(string filepath) 278 | { 279 | try 280 | { 281 | IndicatorFieldsPanel.BeginInvoke((Action)delegate 282 | { 283 | GenerateHashesProgressBar.Visible = true; 284 | GenerateHashesProgressBar.Maximum = 100; 285 | GenerateHashesProgressBar.Value = 10; 286 | }); 287 | string md5 = getMD5(filepath); 288 | IndicatorFieldsPanel.BeginInvoke((Action)delegate 289 | { 290 | GenerateHashesProgressBar.Value = 50; 291 | }); 292 | string sha1 = getSHA1(filepath); 293 | IndicatorFieldsPanel.BeginInvoke((Action)delegate 294 | { 295 | GenerateHashesProgressBar.Value = 90; 296 | }); 297 | 298 | 299 | string filename = Path.GetFileName(filepath); 300 | 301 | 302 | IndicatorFieldsPanel.BeginInvoke((Action)delegate 303 | { 304 | ((TextBox)IndicatorFieldsPanel.Controls.Find("File_Name", false).First()).Text = filename; 305 | ((TextBox)IndicatorFieldsPanel.Controls.Find("Hashes.MD5", false).First()).Text = md5; 306 | ((TextBox)IndicatorFieldsPanel.Controls.Find("Hashes.SHA1", false).First()).Text = sha1; 307 | if( ((TextBox)IndicatorFieldsPanel.Controls.Find("Title", false).First()).Text == "") 308 | { 309 | ((TextBox)IndicatorFieldsPanel.Controls.Find("Title", false).First()).Text = filename; 310 | } 311 | GenerateHashesProgressBar.Visible = false; 312 | }); 313 | 314 | IndicatorFieldsPanel.BeginInvoke((Action)delegate 315 | { 316 | GenerateHashesProgressBar.Value = 0; 317 | }); 318 | } 319 | catch 320 | { 321 | MessageBox.Show("Error hashing file"); 322 | } 323 | 324 | } 325 | 326 | 327 | private string getMD5(string filepath) 328 | { 329 | using (var md5 = MD5.Create()) 330 | { 331 | using (var stream = File.OpenRead(filepath)) 332 | { 333 | return BitConverter.ToString(md5.ComputeHash(stream)).Replace("-", "‌​").ToLower(); 334 | } 335 | } 336 | } 337 | 338 | private string getSHA1(string filepath) 339 | { 340 | try 341 | { 342 | using (FileStream stream = File.OpenRead(filepath)) 343 | { 344 | using (SHA1Managed sha = new SHA1Managed()) 345 | { 346 | byte[] checksum = sha.ComputeHash(stream); 347 | return BitConverter.ToString(checksum) 348 | .Replace("-", string.Empty).ToLower(); 349 | } 350 | } 351 | } 352 | catch(Exception e) 353 | { 354 | Console.WriteLine(e); 355 | return ""; 356 | } 357 | } 358 | } 359 | } 360 | -------------------------------------------------------------------------------- /src/Athena/IOCMaker/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/Athena/IOCMaker/AthenaPlugins.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Drawing; 4 | using System.Windows.Forms; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | 9 | 10 | namespace Athena 11 | { 12 | class AthenaPluginInterfaces 13 | { 14 | public interface AthenaExportPlugin 15 | { 16 | string Name { get; } //The name of the plugin - not currently used for anything 17 | string Version { get; } //The version of the pluging - not currently used for anything 18 | 19 | string DisplayName { get; } //The text that is shown in the Export-> Menu 20 | 21 | string PluginSelected(); //Fires when the user first selects this export plugin. Should return the a string of filters for the filter property of the Save As dialoge, e.g.: "Yara Files|*.yar" 22 | 23 | void OutputFileSelected(string filepath, ObservableCollection collection); //Fires when the Save As box is closed with "OK" and passes the selected path to the file to save as and the collection to save 24 | 25 | void DoPreSaveOptions(); //Fires straight after OutputFileSelcted. Use this function to display a dialogue etc to edit the options 26 | 27 | void DoSave(); //Fires after DoPreSaveOptions and should do the processing and saving. 28 | 29 | bool ExportSuccessful(); //Should return true on successful save, false on error - Method used to allow processing to check, if needed 30 | 31 | List ReportErrors(); //Fires if DoSave() returns false, main program will handle display to user 32 | } 33 | } 34 | 35 | public static class AthenaPluginFormHelpers 36 | { 37 | public static void AddLabel(string text,Panel target,int posx,int posy,string name="") 38 | { 39 | Label l = new Label(); 40 | l.Text = text; 41 | l.Location = new System.Drawing.Point(posx, posy); 42 | if (name != "") l.Name = name; 43 | 44 | //Set the correct width and height to ensure all text is shown 45 | using (Graphics g = target.CreateGraphics()) 46 | { 47 | SizeF size = g.MeasureString(l.Text, l.Font); 48 | l.Width = (int)size.Width + 5; 49 | SizeF hsize = g.MeasureString(l.Text, l.Font, l.Width); 50 | l.Height = (int)hsize.Height; 51 | } 52 | 53 | target.Controls.Add(l); 54 | } 55 | public static void AddCheckbox(string text,Panel target,int posx,int posy,bool checkedbydefault,string name = "") 56 | { 57 | Label l = new Label(); 58 | l.Text = text; 59 | int width = 50; 60 | using (Graphics g = target.CreateGraphics()) 61 | { 62 | SizeF size = g.MeasureString(l.Text, l.Font); 63 | width = (int)size.Width + 25; 64 | } 65 | 66 | CheckBox b = new CheckBox(); 67 | b.Text = text; 68 | b.Location = new System.Drawing.Point(posx, posy); 69 | b.Checked = checkedbydefault; 70 | b.Width = width; 71 | if (name != "") b.Name = name; 72 | target.Controls.Add(b); 73 | } 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /src/Athena/IOCMaker/GenericParsing.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/IOCMaker/GenericParsing.dll -------------------------------------------------------------------------------- /src/Athena/IOCMaker/IOCMaker.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {6FD2CEA0-B913-4255-A226-75797A86CB95} 8 | WinExe 9 | Properties 10 | Athena 11 | Athena 12 | v4.5 13 | 512 14 | ad346b82 15 | 16 | 17 | AnyCPU 18 | true 19 | full 20 | false 21 | bin\Debug\ 22 | DEBUG;TRACE 23 | prompt 24 | 4 25 | 26 | 27 | AnyCPU 28 | pdbonly 29 | true 30 | bin\Release\ 31 | TRACE 32 | prompt 33 | 4 34 | 35 | 36 | 37 | .\GenericParsing.dll 38 | 39 | 40 | ..\packages\Microsoft.Msagl.1.0.2\lib\net40\Microsoft.Msagl.dll 41 | 42 | 43 | ..\packages\Microsoft.Msagl.Drawing.1.0.2\lib\net40\Microsoft.Msagl.Drawing.dll 44 | 45 | 46 | ..\packages\Microsoft.Msagl.GraphViewerGDI.1.0.2\lib\net40\Microsoft.Msagl.GraphViewerGdi.dll 47 | 48 | 49 | ..\packages\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll 50 | True 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | Form 67 | 68 | 69 | AddIndicatorForm.cs 70 | 71 | 72 | 73 | Form 74 | 75 | 76 | ImportCSV.cs 77 | 78 | 79 | Form 80 | 81 | 82 | MainWindow.cs 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | Form 92 | 93 | 94 | RelationshipAddForm.cs 95 | 96 | 97 | 98 | Form 99 | 100 | 101 | VisualiseDataForm.cs 102 | 103 | 104 | AddIndicatorForm.cs 105 | 106 | 107 | ImportCSV.cs 108 | 109 | 110 | MainWindow.cs 111 | 112 | 113 | ResXFileCodeGenerator 114 | Resources.Designer.cs 115 | Designer 116 | 117 | 118 | True 119 | Resources.resx 120 | True 121 | 122 | 123 | RelationshipAddForm.cs 124 | 125 | 126 | VisualiseDataForm.cs 127 | 128 | 129 | 130 | SettingsSingleFileGenerator 131 | Settings.Designer.cs 132 | 133 | 134 | True 135 | Settings.settings 136 | True 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. 183 | 184 | 185 | 186 | 193 | -------------------------------------------------------------------------------- /src/Athena/IOCMaker/ImportCSV.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace Athena 2 | { 3 | partial class ImportCSV 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ImportCSV)); 32 | this.label1 = new System.Windows.Forms.Label(); 33 | this.TemplateLink = new System.Windows.Forms.LinkLabel(); 34 | this.label2 = new System.Windows.Forms.Label(); 35 | this.FilePathTextBox = new System.Windows.Forms.TextBox(); 36 | this.BrowseButton = new System.Windows.Forms.Button(); 37 | this.LoadButton = new System.Windows.Forms.Button(); 38 | this.ProgressTextBox = new System.Windows.Forms.TextBox(); 39 | this.label3 = new System.Windows.Forms.Label(); 40 | this.ObservablesListBox = new System.Windows.Forms.ListBox(); 41 | this.SaveButton = new System.Windows.Forms.Button(); 42 | this.label4 = new System.Windows.Forms.Label(); 43 | this.label5 = new System.Windows.Forms.Label(); 44 | this.SuspendLayout(); 45 | // 46 | // label1 47 | // 48 | this.label1.AutoSize = true; 49 | this.label1.Location = new System.Drawing.Point(13, 13); 50 | this.label1.Name = "label1"; 51 | this.label1.Size = new System.Drawing.Size(482, 13); 52 | this.label1.TabIndex = 0; 53 | this.label1.Text = "You can import a bulk load of Indicators quickly from a csv. This needs to be in " + 54 | "a specifc format, use "; 55 | // 56 | // TemplateLink 57 | // 58 | this.TemplateLink.AutoSize = true; 59 | this.TemplateLink.Location = new System.Drawing.Point(488, 13); 60 | this.TemplateLink.Name = "TemplateLink"; 61 | this.TemplateLink.Size = new System.Drawing.Size(105, 13); 62 | this.TemplateLink.TabIndex = 1; 63 | this.TemplateLink.TabStop = true; 64 | this.TemplateLink.Text = "this template csv file."; 65 | this.TemplateLink.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.TemplateLink_LinkClicked); 66 | // 67 | // label2 68 | // 69 | this.label2.AutoSize = true; 70 | this.label2.Location = new System.Drawing.Point(11, 58); 71 | this.label2.Name = "label2"; 72 | this.label2.Size = new System.Drawing.Size(50, 13); 73 | this.label2.TabIndex = 2; 74 | this.label2.Text = "CSV File:"; 75 | // 76 | // FilePathTextBox 77 | // 78 | this.FilePathTextBox.Location = new System.Drawing.Point(67, 55); 79 | this.FilePathTextBox.Name = "FilePathTextBox"; 80 | this.FilePathTextBox.Size = new System.Drawing.Size(418, 20); 81 | this.FilePathTextBox.TabIndex = 3; 82 | // 83 | // BrowseButton 84 | // 85 | this.BrowseButton.Location = new System.Drawing.Point(491, 53); 86 | this.BrowseButton.Name = "BrowseButton"; 87 | this.BrowseButton.Size = new System.Drawing.Size(103, 23); 88 | this.BrowseButton.TabIndex = 4; 89 | this.BrowseButton.Text = "Browse"; 90 | this.BrowseButton.UseVisualStyleBackColor = true; 91 | this.BrowseButton.Click += new System.EventHandler(this.BrowseButton_Click); 92 | // 93 | // LoadButton 94 | // 95 | this.LoadButton.Location = new System.Drawing.Point(212, 81); 96 | this.LoadButton.Name = "LoadButton"; 97 | this.LoadButton.Size = new System.Drawing.Size(229, 23); 98 | this.LoadButton.TabIndex = 5; 99 | this.LoadButton.Text = "Load/Validate"; 100 | this.LoadButton.UseVisualStyleBackColor = true; 101 | this.LoadButton.Click += new System.EventHandler(this.LoadButton_Click); 102 | // 103 | // ProgressTextBox 104 | // 105 | this.ProgressTextBox.Location = new System.Drawing.Point(12, 133); 106 | this.ProgressTextBox.Multiline = true; 107 | this.ProgressTextBox.Name = "ProgressTextBox"; 108 | this.ProgressTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; 109 | this.ProgressTextBox.Size = new System.Drawing.Size(343, 147); 110 | this.ProgressTextBox.TabIndex = 6; 111 | // 112 | // label3 113 | // 114 | this.label3.AutoSize = true; 115 | this.label3.Location = new System.Drawing.Point(12, 114); 116 | this.label3.Name = "label3"; 117 | this.label3.Size = new System.Drawing.Size(83, 13); 118 | this.label3.TabIndex = 7; 119 | this.label3.Text = "Progress/Errors:"; 120 | // 121 | // ObservablesListBox 122 | // 123 | this.ObservablesListBox.FormattingEnabled = true; 124 | this.ObservablesListBox.Location = new System.Drawing.Point(361, 133); 125 | this.ObservablesListBox.Name = "ObservablesListBox"; 126 | this.ObservablesListBox.Size = new System.Drawing.Size(233, 147); 127 | this.ObservablesListBox.TabIndex = 8; 128 | // 129 | // SaveButton 130 | // 131 | this.SaveButton.Location = new System.Drawing.Point(285, 286); 132 | this.SaveButton.Name = "SaveButton"; 133 | this.SaveButton.Size = new System.Drawing.Size(308, 23); 134 | this.SaveButton.TabIndex = 9; 135 | this.SaveButton.Text = "Save/Close"; 136 | this.SaveButton.UseVisualStyleBackColor = true; 137 | this.SaveButton.Click += new System.EventHandler(this.SaveButton_Click); 138 | // 139 | // label4 140 | // 141 | this.label4.AutoSize = true; 142 | this.label4.Location = new System.Drawing.Point(358, 114); 143 | this.label4.Name = "label4"; 144 | this.label4.Size = new System.Drawing.Size(168, 13); 145 | this.label4.TabIndex = 10; 146 | this.label4.Text = "Loaded Observables: (Not Saved)"; 147 | // 148 | // label5 149 | // 150 | this.label5.AutoSize = true; 151 | this.label5.Location = new System.Drawing.Point(12, 28); 152 | this.label5.Name = "label5"; 153 | this.label5.Size = new System.Drawing.Size(570, 13); 154 | this.label5.TabIndex = 11; 155 | this.label5.Text = "The column order isn\'t important, but the column names and \"ObservableType\" names" + 156 | " must match the template exactly."; 157 | // 158 | // ImportCSV 159 | // 160 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 161 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 162 | this.ClientSize = new System.Drawing.Size(606, 317); 163 | this.Controls.Add(this.label5); 164 | this.Controls.Add(this.label4); 165 | this.Controls.Add(this.SaveButton); 166 | this.Controls.Add(this.ObservablesListBox); 167 | this.Controls.Add(this.label3); 168 | this.Controls.Add(this.ProgressTextBox); 169 | this.Controls.Add(this.LoadButton); 170 | this.Controls.Add(this.BrowseButton); 171 | this.Controls.Add(this.FilePathTextBox); 172 | this.Controls.Add(this.label2); 173 | this.Controls.Add(this.TemplateLink); 174 | this.Controls.Add(this.label1); 175 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 176 | this.Name = "ImportCSV"; 177 | this.Text = "ImportCSV"; 178 | this.ResumeLayout(false); 179 | this.PerformLayout(); 180 | 181 | } 182 | 183 | #endregion 184 | 185 | private System.Windows.Forms.Label label1; 186 | private System.Windows.Forms.LinkLabel TemplateLink; 187 | private System.Windows.Forms.Label label2; 188 | private System.Windows.Forms.TextBox FilePathTextBox; 189 | private System.Windows.Forms.Button BrowseButton; 190 | private System.Windows.Forms.Button LoadButton; 191 | private System.Windows.Forms.TextBox ProgressTextBox; 192 | private System.Windows.Forms.Label label3; 193 | private System.Windows.Forms.ListBox ObservablesListBox; 194 | private System.Windows.Forms.Button SaveButton; 195 | private System.Windows.Forms.Label label4; 196 | private System.Windows.Forms.Label label5; 197 | } 198 | } -------------------------------------------------------------------------------- /src/Athena/IOCMaker/ImportCSV.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | using System.Windows.Forms; 10 | using System.Threading; 11 | using System.IO; 12 | using GenericParsing; 13 | 14 | namespace Athena 15 | { 16 | 17 | /// 18 | /// This form is the GUI for the importing of data from a CSV into the native IOC format 19 | /// used by this application 20 | /// 21 | public partial class ImportCSV : Form 22 | { 23 | ObservableCollection Collection; //Holds a reference to the collecton of the observables in the main window 24 | List ObservableTypes; //Holds a template of the observable types - domain, url etc 25 | List Observables; //Holds the observables imported from CSV before they are "saved" to the main window 26 | List Errors; //Holds a list of errors encountered when loading a CSV 27 | 28 | public ImportCSV(ref ObservableCollection collection) 29 | { 30 | InitializeComponent(); 31 | Collection = collection; //Save the reference 32 | ObservableTypes = new List(); 33 | Observables = new List(); 34 | Errors = new List(); 35 | 36 | //Get a dummy object for each type of obserable 37 | foreach (ObservableObject.ObservableType type in Enum.GetValues(typeof(ObservableObject.ObservableType))) 38 | { 39 | ObservableTypes.Add(new ObservableObject(type, ref Collection)); 40 | } 41 | } 42 | 43 | /// 44 | /// Shows the file selection diag to allow user to select the csv to import 45 | /// 46 | private void BrowseButton_Click(object sender, EventArgs e) 47 | { 48 | OpenFileDialog diag = new OpenFileDialog(); 49 | diag.Filter = "CSV Files (*.csv)|*.csv"; 50 | if (diag.ShowDialog() == DialogResult.OK) 51 | { 52 | FilePathTextBox.Text = diag.FileName; 53 | } 54 | } 55 | 56 | //When the "load/validate" button is clicked 57 | private void LoadButton_Click(object sender, EventArgs e) 58 | { 59 | ParseCSV(FilePathTextBox.Text); //Parse the CSV (this function generates errors as needed) 60 | } 61 | 62 | /// 63 | /// Adds an error to the list of errors, if the advisory only is set to true, the error will only be added to the console 64 | /// and wont count towards the error count 65 | /// 66 | /// The message for the error 67 | /// Is this only a warning? 68 | private void AddError(string error,bool advisoryonly=false) 69 | { 70 | if(!advisoryonly) Errors.Add(error); 71 | ProgressTextBox.AppendText(error+"\r\n"); 72 | 73 | } 74 | 75 | 76 | /// 77 | /// Parses a CSV file and loads the observables to the temporary Observables list 78 | /// 79 | /// The path to the CSV 80 | private void ParseCSV(string filepath) 81 | { 82 | //If the path is empty, invalid or the file doesn't exist, stop 83 | if (string.IsNullOrWhiteSpace(filepath) || !File.Exists(filepath)) return; 84 | 85 | //Master try to catch any other uncaught issues 86 | try 87 | { 88 | //GenericParser written by AndrewRissing - https://github.com/AndrewRissing/GenericParsing 89 | using (GenericParser parser = new GenericParser()) 90 | { 91 | //Set the params of the parser 92 | parser.SetDataSource(filepath); 93 | parser.ColumnDelimiter = ','; 94 | parser.FirstRowHasHeader = true; 95 | parser.TextQualifier = '\"'; 96 | 97 | //Start looping through the file line by line 98 | int line = 0; 99 | while (parser.Read()) 100 | { 101 | line++; 102 | try //Try per line 103 | { 104 | //Add the parsed columns to our dictionary of name/value pairs 105 | //Column order is expected to be as per strict template order 106 | //TODO: Make more flexible and allow different column orders 107 | Dictionary values = new Dictionary(); 108 | for (int i = 0; i < parser.ColumnCount; i++) 109 | { 110 | values.Add(parser.GetColumnName(i), parser[i]); 111 | } 112 | 113 | 114 | //Create a new observable object from the values read in this line 115 | ObservableObject newobs = null; 116 | string errors = GenerateObservable(values, out newobs); 117 | 118 | //If generating the observable gave any errors, add them to the error list 119 | if (errors != null) AddError(errors); 120 | else 121 | { 122 | //Otherwise add this new observable to our storage list 123 | Observables.Add(newobs); 124 | } 125 | } 126 | catch (Exception exep) 127 | { 128 | //This will likely occur if columns are missing or have been renamed etc in the template 129 | MessageBox.Show("There was an error parsing the CSV at line " + line + ".\r\n\r\n Please make sure it is in correct format - check the template provided."); 130 | return; 131 | } 132 | } 133 | } 134 | } 135 | catch (Exception exep) 136 | { 137 | //Should only occur due to unforseen IO errors like the file being in use etc 138 | MessageBox.Show("There was an error reading the CSV:\r\n"+ exep.Message); 139 | return; 140 | } 141 | 142 | //Try to add the observables to the GUI 143 | try 144 | { 145 | //Clear the box for now and set the displaymember to the right property 146 | ObservablesListBox.Items.Clear(); 147 | ObservablesListBox.DisplayMember = "DisplayTitle"; 148 | 149 | //Add each observable to the listbox 150 | foreach (ObservableObject obs in Observables) ObservablesListBox.Items.Add(obs); 151 | 152 | //Refresh the listbox 153 | ObservablesListBox.Refresh(); 154 | } 155 | catch(Exception exep) 156 | { 157 | //Throw an exception here if there is an error updating the GUI, shouldn't happen under normal conditions 158 | MessageBox.Show("There was an error reading the CSV:\r\n"+ exep.Message); 159 | return; 160 | } 161 | } 162 | 163 | 164 | 165 | /// 166 | /// Takes pairs and converts them into observable objects. Names must match the propeties of that observable type 167 | /// 168 | /// 169 | /// 170 | /// 171 | public string GenerateObservable(Dictionary data,out ObservableObject obs) 172 | { 173 | obs = null; 174 | //Check if this is a valid observable type 175 | if (!data.ContainsKey("ObservableType") || string.IsNullOrWhiteSpace(data["ObservableType"])) return "Row did not contain an \"Observable Type\" column or ObservableType was empty"; 176 | else 177 | { 178 | //Check again 179 | ObservableObject xx = ObservableTypes.Find(x => x.FriendlyTypeName == data["ObservableType"]); 180 | if (xx == null) return data["ObservableType"] + " is not a valid ObservableType"; 181 | else 182 | { 183 | obs = new ObservableObject(xx.Type, ref Collection); 184 | try 185 | { 186 | //Translate the name/value pairs into the fields on the object 187 | foreach (ObservableObjectField f in obs.Fields) 188 | { 189 | if (data.ContainsKey(f.FieldName)) 190 | { 191 | obs.Fields.Find(x => x.FieldName == f.FieldName).Value = data[f.FieldName]; 192 | } 193 | } 194 | } 195 | catch(Exception exep) 196 | { 197 | //If we get an error here, then there is likely an issue with the CSV column naming 198 | return "Error processing fields, import may not be complete for this line"; 199 | } 200 | 201 | } 202 | } 203 | return null; 204 | } 205 | 206 | /// 207 | /// Dynamically Generates and opens a CSV template based on the STIXObservable types available 208 | /// 209 | private void TemplateLink_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) 210 | { 211 | StringBuilder headers = new StringBuilder(); 212 | StringBuilder rows = new StringBuilder(); 213 | 214 | //Get Unique Fields for each observable type 215 | Dictionary fields = new Dictionary(); 216 | foreach(ObservableObject o in ObservableTypes) 217 | { 218 | foreach (ObservableObjectField f in o.Fields) fields[f.FieldName] = ""; 219 | } 220 | 221 | //Print the fields as column headers, remove last comma, add to the output text 222 | int columncounter = 1; 223 | headers.Append("ObservableType" + ","); 224 | foreach (string s in fields.Keys) 225 | { 226 | headers.Append(s + ","); 227 | columncounter++; 228 | } 229 | headers.Remove(headers.Length - 1, 1); 230 | rows.AppendLine(); 231 | 232 | 233 | //Add three examples for each observable type to the template 234 | foreach(ObservableObject o in ObservableTypes) 235 | { 236 | rows.AppendLine(o.FriendlyTypeName+ returncommas(columncounter)); 237 | rows.AppendLine(o.FriendlyTypeName + returncommas(columncounter)); 238 | rows.AppendLine(o.FriendlyTypeName + returncommas(columncounter)); 239 | } 240 | 241 | //Get the output path - current directory and hardcoded filename 242 | string path = Path.Combine(Directory.GetCurrentDirectory(),"IOCCSVTemplate.csv"); 243 | 244 | //Write the file 245 | using(StreamWriter w = new StreamWriter(path)) 246 | { 247 | w.Write(headers.ToString() + rows.ToString()); 248 | } 249 | 250 | //Open the file 251 | System.Diagnostics.Process.Start(path); 252 | } 253 | 254 | 255 | /// 256 | /// Returns a number of empty columns to help with building a csv 257 | /// 258 | /// The number of empty columns (commas) to return 259 | /// S string representing the CSV representation of empty commans 260 | private string returncommas(int number) 261 | { 262 | string rtn =""; 263 | while (number > 0) 264 | { 265 | rtn += ","; 266 | number--; 267 | } 268 | return rtn; 269 | } 270 | 271 | private void SaveButton_Click(object sender, EventArgs e) 272 | { 273 | foreach(ObservableObject o in Observables) 274 | { 275 | Collection.Observables.Add(o); 276 | } 277 | this.DialogResult = DialogResult.OK; 278 | this.Close(); 279 | } 280 | } 281 | } 282 | -------------------------------------------------------------------------------- /src/Athena/IOCMaker/Plugins/MISPJsonExportPlugin.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using Athena; 7 | using System.Windows.Forms; 8 | using System.IO; 9 | using Newtonsoft.Json; 10 | 11 | 12 | namespace MISPJsonExportPlugin 13 | { 14 | public class MISPJsonExportPlugin : AthenaPluginInterfaces.AthenaExportPlugin 15 | { 16 | public ObservableCollection col; 17 | public string outputpath; 18 | public List Errors; 19 | 20 | public string Name { get { return "Export MISP Json"; } } 21 | public string Version { get { return "V0.01"; } } 22 | public string DisplayName { get { return "MISP JSON"; } } //The text that is shown in the Export-> Menu 23 | 24 | public string PluginSelected() 25 | { 26 | Errors = new List(); 27 | outputpath = ""; 28 | col = new ObservableCollection(); 29 | 30 | // MessageBox.Show("Hello from the plug in"); 31 | 32 | return "JSON|*.json"; 33 | 34 | 35 | } 36 | 37 | public void OutputFileSelected(string filepath, ObservableCollection collection) 38 | { 39 | outputpath = filepath; 40 | col = collection; 41 | } 42 | 43 | public void DoPreSaveOptions() 44 | { 45 | 46 | 47 | } 48 | 49 | public void DoSave() 50 | { 51 | MISPEvent evt = new MISPEvent(); 52 | 53 | evt.info = col.IncidentTitle; 54 | evt.publishtimestamp = HelperClass.GetUnixEpochTime(DateTime.Now); 55 | if (col.InitialCompromise != null) evt.timestamp = HelperClass.GetUnixEpochTime((DateTime)col.InitialCompromise); 56 | else evt.timestamp = ""; 57 | evt.analysis = "2"; //"Complete" 58 | evt.published = true; 59 | if (col.IncidentDiscovered != null) evt.date = ((DateTime)col.IncidentDiscovered).ToString("yyyy-MM-dd"); 60 | else evt.date = ""; 61 | 62 | MISPOrgc org = new MISPOrgc(); 63 | org.name = col.ReportingOrganisation; 64 | evt.orgc = org; 65 | 66 | evt.threat_level_id = "2"; //"Medium" - TODO - make this take value from Low/Mid/High by adding a new field to gui 67 | 68 | 69 | //Add the col.Observables as attributes 70 | #region col.ObservablesToAttributes 71 | foreach (ObservableObject o in col.Observables) 72 | { 73 | MISPAttribute A = new MISPAttribute(); 74 | 75 | A.comment = o.Description; 76 | if (col.InitialCompromise != null) A.timestamp = HelperClass.GetUnixEpochTime((DateTime)col.InitialCompromise); 77 | else A.timestamp = ""; 78 | A.to_ids = false; 79 | 80 | //Do different stuff dependant on the type of indicator 81 | #region MalwareSample 82 | if (o.FriendlyTypeName == "Malware Sample") 83 | { 84 | A.category = "Payload delivery"; 85 | 86 | if (o.Fields.FindAll(x => x.FieldName == "Hashes.MD5").Count > 0 && !String.IsNullOrWhiteSpace(o.Fields.Find(x => x.FieldName == "Hashes.MD5").Value)) 87 | { 88 | if (!String.IsNullOrWhiteSpace(o.Fields.Find(x => x.FieldName == "File_Name").Value)) 89 | { 90 | A.value = o.Fields.Find(x => x.FieldName == "File_Name").Value + "|" + o.Fields.Find(x => x.FieldName == "Hashes.MD5").Value; 91 | A.type = "filename|md5"; 92 | } 93 | else 94 | { 95 | A.value = o.Fields.Find(x => x.FieldName == "Hashes.MD5").Value; 96 | A.type = "md5"; 97 | } 98 | } 99 | else if (o.Fields.FindAll(x => x.FieldName == "Hashes.SHA1").Count > 0 && !String.IsNullOrWhiteSpace(o.Fields.Find(x => x.FieldName == "Hashes.SHA1").Value)) 100 | { 101 | if (!String.IsNullOrWhiteSpace(o.Fields.Find(x => x.FieldName == "File_Name").Value)) 102 | { 103 | A.value = o.Fields.Find(x => x.FieldName == "File_Name").Value + "|" + o.Fields.Find(x => x.FieldName == "Hashes.SHA1").Value; 104 | A.type = "filename|sha1"; 105 | } 106 | else 107 | { 108 | A.value = o.Fields.Find(x => x.FieldName == "Hashes.SHA1").Value; 109 | A.type = "sha1"; 110 | } 111 | } 112 | evt.AddAttribute(A); 113 | } 114 | #endregion 115 | #region Domain 116 | else if (o.FriendlyTypeName == "Domain") 117 | { 118 | A.category = "Network activity"; 119 | A.value = o.Fields.Find(x => x.FieldName == "Domain").Value; 120 | A.type = "domain"; 121 | evt.AddAttribute(A); 122 | } 123 | #endregion 124 | #region IP 125 | else if (o.FriendlyTypeName == "IP Address") 126 | { 127 | A.category = "Network activity"; 128 | A.type = "ip-dst"; //TODO - CORRECTLY ASSIGN DIRECTION BASED ON RELATIONSHIPS 129 | 130 | string ip4 = o.Fields.Find(x => x.FieldName == "IPv4").Value; 131 | string ip6 = o.Fields.Find(x => x.FieldName == "IPv6").Value; 132 | if (!string.IsNullOrEmpty(ip4) && string.IsNullOrEmpty(ip6)) 133 | { 134 | A.value = ip4; 135 | } 136 | else if (string.IsNullOrEmpty(ip4) && !string.IsNullOrEmpty(ip6)) 137 | { 138 | A.value = ip6; 139 | } 140 | else if (!string.IsNullOrEmpty(ip4) && !string.IsNullOrEmpty(ip6)) 141 | { 142 | A.value = ip4; 143 | MISPAttribute A2 = new MISPAttribute(); 144 | A2.comment = A.comment; 145 | A2.timestamp = A.timestamp; 146 | A2.to_ids = A.to_ids; 147 | A2.type = A.type; 148 | A2.category = A.category; 149 | A2.value = ip6; 150 | evt.AddAttribute(A2); 151 | } 152 | evt.AddAttribute(A); 153 | } 154 | #endregion 155 | #region Registry 156 | else if (o.FriendlyTypeName == "Registry") 157 | { 158 | A.category = "Persistence mechanism"; 159 | 160 | string hive = o.Fields.Find(x => x.FieldName == "Hive").Value; 161 | string key = o.Fields.Find(x => x.FieldName == "Key").Value; 162 | string rvalue = o.Fields.Find(x => x.FieldName == "Value").Value; 163 | 164 | 165 | if (!string.IsNullOrEmpty(hive) && !string.IsNullOrEmpty(key) && !string.IsNullOrEmpty(rvalue)) 166 | { 167 | A.type = "regkey|value"; 168 | A.value = hive + "\\" + key + "|" + rvalue; 169 | } 170 | else 171 | { 172 | A.type = "regkey"; 173 | A.value = ""; 174 | if (!string.IsNullOrEmpty(hive)) A.value = hive + "\\"; 175 | A.value += key; 176 | } 177 | evt.AddAttribute(A); 178 | } 179 | #endregion 180 | } 181 | #endregion 182 | 183 | 184 | using (StreamWriter w = new StreamWriter(outputpath)) 185 | { 186 | w.WriteLine("{\"Event\":" + JsonConvert.SerializeObject(evt, Newtonsoft.Json.Formatting.Indented) + "}"); 187 | } 188 | 189 | return; 190 | 191 | } 192 | 193 | public bool ExportSuccessful() 194 | { 195 | if (Errors.Count == 0) return true; 196 | else return false; 197 | } 198 | 199 | public List ReportErrors() 200 | { 201 | 202 | return Errors; 203 | } 204 | } 205 | 206 | class MISPAttribute 207 | { 208 | public string category; 209 | public string comment; 210 | public string uuid; 211 | public string timestamp; 212 | public bool to_ids; 213 | public string value; 214 | public string type; 215 | 216 | public MISPAttribute() 217 | { 218 | uuid = Guid.NewGuid().ToString(); 219 | } 220 | 221 | } 222 | 223 | class MISPTag 224 | { 225 | public string colour; 226 | public bool exportable; 227 | public string name; 228 | } 229 | 230 | class MISPOrgc 231 | { 232 | public string name; 233 | public string uuid; 234 | 235 | public MISPOrgc() 236 | { 237 | uuid = Guid.NewGuid().ToString(); 238 | } 239 | } 240 | 241 | class MISPEvent 242 | { 243 | public string info; 244 | public string publishtimestamp; 245 | public string timestamp; 246 | public string analysis; 247 | public List Attribute; 248 | public List Tag; 249 | public bool published; 250 | public string date; 251 | public MISPOrgc orgc; 252 | public string threat_level_id; 253 | public string uuid; 254 | 255 | public MISPEvent() 256 | { 257 | uuid = Guid.NewGuid().ToString(); 258 | } 259 | 260 | public void AddAttribute(MISPAttribute att) 261 | { 262 | if (Attribute == null) Attribute = new List(); 263 | Attribute.Add(att); 264 | } 265 | 266 | public void AddTag(MISPTag tag) 267 | { 268 | if (Tag == null) Tag = new List(); 269 | Tag.Add(tag); 270 | } 271 | 272 | } 273 | } 274 | -------------------------------------------------------------------------------- /src/Athena/IOCMaker/Plugins/SnortRulesExportPlugin.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using Athena; 7 | using System.Windows.Forms; 8 | using System.IO; 9 | 10 | 11 | namespace SnortRulesExportPlugin 12 | { 13 | public class SnortRulesExportPlugin : AthenaPluginInterfaces.AthenaExportPlugin 14 | { 15 | public ObservableCollection col; 16 | public string outputpath; 17 | public List Errors; 18 | 19 | Form optform; 20 | 21 | public List SupportedProtocols; 22 | public List Rules; 23 | 24 | public string Name { get { return "Export Snort Rules"; } } 25 | public string Version { get { return "V0.01"; } } 26 | public string DisplayName { get { return "Snort Rules..."; } } //The text that is shown in the Export-> Menu 27 | 28 | public string PluginSelected() 29 | { 30 | Errors = new List(); 31 | outputpath = ""; 32 | col = new ObservableCollection(); 33 | 34 | SupportedProtocols = new List(){"TCP", "UDP", "ICMP","IP"}; 35 | 36 | // MessageBox.Show("Hello from the plug in"); 37 | 38 | return "Snort Rules|*.rules"; 39 | 40 | 41 | } 42 | 43 | public void OutputFileSelected(string filepath, ObservableCollection collection) 44 | { 45 | outputpath = filepath; 46 | col = collection; 47 | } 48 | 49 | public void DoPreSaveOptions() 50 | { 51 | Rules = new List(); 52 | 53 | optform = new Form(); 54 | optform.Width = 500; 55 | optform.Height = 500; 56 | Panel optpanel = new Panel(); 57 | optform.Controls.Add(optpanel); 58 | optpanel.Width = 470; 59 | optpanel.Height = 420; 60 | optpanel.AutoScroll = true; 61 | 62 | //Add the explanation label 63 | AthenaPluginFormHelpers.AddLabel("Please select the options below to customise your Snort Rules output:", optpanel, 5, 5); 64 | 65 | int maxtitlelength = 60; 66 | int x = 10; 67 | int y = 30; 68 | int yinc = 20; 69 | int cnt = 0; 70 | Dictionary ID_Form_Mapping = new Dictionary< string,int> (); 71 | foreach(ObservableObject o in col.Observables) 72 | { 73 | 74 | cnt++; 75 | ID_Form_Mapping[o.ID] = cnt; 76 | 77 | string title = o.DisplayTitle.Length < maxtitlelength ? o.DisplayTitle : o.DisplayTitle.Substring(0, maxtitlelength); 78 | 79 | 80 | if (o.Type == ObservableObject.ObservableType.Domain) 81 | { 82 | AthenaPluginFormHelpers.AddCheckbox("Any mention in TCP/UDP packets of " + title, optpanel, x, y, true, "obs_" + cnt); 83 | y += yinc; 84 | } 85 | 86 | if (o.Type == ObservableObject.ObservableType.IPAddress) 87 | { 88 | AthenaPluginFormHelpers.AddCheckbox("Any traffic, in any protocol, to or from " + title, optpanel, x, y, true, "obs_" + cnt); 89 | y += yinc; 90 | } 91 | //if(o.Type == ObservableObject.ObservableType.Registry) 92 | // AthenaPluginFormHelpers.AddCheckbox("Any mention in TCP/UDP packets of the key/value under " + title, optpanel, x, y, true, "obs_" + cnt); 93 | //if (o.Type == ObservableObject.ObservableType.Sample) 94 | // AthenaPluginFormHelpers.AddCheckbox("Any mention in TCP/UDP packets of filename for " + title, optpanel, x, y, true, "obs_" + cnt); 95 | 96 | 97 | } 98 | 99 | Button closebut = new Button(); 100 | closebut.Text = "Save"; 101 | closebut.Click += Closebut_Click; 102 | closebut.Location = new System.Drawing.Point(15, 430); 103 | optform.Controls.Add(closebut); 104 | 105 | optform.ShowDialog(); 106 | 107 | SnortRule r; 108 | foreach (ObservableObject o in col.Observables) 109 | { 110 | if ( (o.Type == ObservableObject.ObservableType.Domain || o.Type == ObservableObject.ObservableType.IPAddress) && ((CheckBox)optpanel.Controls["obs_" + ID_Form_Mapping[o.ID]]).Checked) 111 | { 112 | if (o.Type == ObservableObject.ObservableType.Domain) 113 | { 114 | r = new SnortRule(); 115 | r.id = o.ID; 116 | r.protocol = "TCP"; 117 | r.sourceip = "any"; 118 | r.sourceport = "any"; 119 | r.destip = "any"; 120 | r.destport = "any"; 121 | r.contentstring = o.Fields.First(fld => fld.FieldName == "Domain").Value; 122 | r.msg = "ATHENA KNOWN IOC: Mention of Domain which is present in an IOC Collection"; 123 | 124 | Rules.Add(r); 125 | //Add a rule for UDP, too 126 | r = r.Clone(); 127 | r.protocol = "UDP"; 128 | Rules.Add(r); 129 | } 130 | 131 | if (o.Type == ObservableObject.ObservableType.IPAddress) 132 | { 133 | //Temp list to hold the placeholder rules 134 | List temprules = new List(); 135 | 136 | 137 | //First let add a "TO" rule for [blank] protocol 138 | r = new SnortRule(); 139 | r.id = o.ID; 140 | r.protocol = ""; 141 | r.sourceip = "any"; 142 | r.sourceport = "any"; 143 | r.destip = "any"; 144 | r.destport = "any"; 145 | r.contentstring = ""; 146 | r.msg = "ATHENA KNOWN IOC: [PROTO] Traffic to an IP Address which is present in an IOC Collection"; 147 | //Set the IP Address and Deal with cases where the IPV4 and IPV6 addresses are populated for the same IOC (add two rules, one for each) 148 | if (o.Fields.First(fld => fld.FieldName == "IPv4").Value.Length > 0 && o.Fields.First(fld => fld.FieldName == "IPv6").Value.Length > 0) 149 | { 150 | r.sourceip = o.Fields.First(fld => fld.FieldName == "IPv4").Value; 151 | temprules.Add(r); 152 | r = r.Clone(); 153 | r.sourceip = o.Fields.First(fld => fld.FieldName == "IPv6").Value; 154 | temprules.Add(r); 155 | } 156 | else 157 | { 158 | //r = r.Clone(); 159 | r.sourceip = o.Fields.First(fld => fld.FieldName == "IPv4").Value.Length > 0 ? o.Fields.First(fld => fld.FieldName == "IPv4").Value : o.Fields.First(fld => fld.FieldName == "IPv6").Value; 160 | temprules.Add(r); 161 | } 162 | 163 | //Now we have our "TO" rule(s), lets duplicate it/them to also be "from" rules 164 | SnortRule newrule; 165 | int trc = temprules.Count; 166 | for (int c = 0;c ReportErrors() 237 | { 238 | return Errors; 239 | } 240 | } 241 | 242 | public class SnortRule 243 | { 244 | public string id; 245 | public string protocol; 246 | public string sourceip; 247 | public string sourceport; 248 | public string destip; 249 | public string destport; 250 | public string contentstring; 251 | public string msg; 252 | 253 | public SnortRule() 254 | { 255 | id = ""; 256 | protocol = ""; 257 | sourceip = ""; 258 | sourceport = ""; 259 | destip = ""; 260 | destport = ""; 261 | msg = ""; 262 | contentstring = ""; 263 | } 264 | 265 | public string GetAlert() 266 | { 267 | string al = "Alert " + protocol + " " + sourceip + " " + sourceport + " -> " + destip + " " + destport + " (msg:\"" + msg + "\";"; 268 | if (contentstring != "") al += "content:\"" + contentstring + "\";"; 269 | al += ")"; 270 | return al; 271 | } 272 | 273 | public SnortRule Clone() 274 | { 275 | SnortRule cloned = new SnortRule(); 276 | cloned.id = id; 277 | cloned.protocol = protocol; 278 | cloned.sourceip = sourceip; 279 | cloned.sourceport = sourceport; 280 | cloned.destip = destip; 281 | cloned.destport = destport; 282 | cloned.msg = msg; 283 | cloned.contentstring = contentstring; 284 | 285 | return cloned; 286 | } 287 | } 288 | } 289 | -------------------------------------------------------------------------------- /src/Athena/IOCMaker/Plugins/Stix1ExportPlugin.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using Athena; 7 | using System.Windows.Forms; 8 | using System.IO; 9 | using System.Xml; 10 | using System.Xml.Serialization; 11 | 12 | 13 | namespace Stix1ExportPlugin 14 | { 15 | public class Stix1ExportPlugin : AthenaPluginInterfaces.AthenaExportPlugin 16 | { 17 | public ObservableCollection col; 18 | public string outputpath; 19 | public List Errors; 20 | 21 | public string Name { get { return "Export Stix 1.1.1"; } } 22 | public string Version { get { return "V0.01"; } } 23 | public string DisplayName { get { return "Stix 1.1.1"; } } //The text that is shown in the Export-> Menu 24 | 25 | public string PluginSelected() 26 | { 27 | Errors = new List(); 28 | outputpath = ""; 29 | col = new ObservableCollection(); 30 | 31 | return "Stix XML|*.xml"; 32 | 33 | 34 | } 35 | 36 | public void OutputFileSelected(string filepath, ObservableCollection collection) 37 | { 38 | outputpath = filepath; 39 | col = collection; 40 | } 41 | 42 | public void DoPreSaveOptions() 43 | { 44 | 45 | 46 | } 47 | 48 | public void DoSave() 49 | { 50 | //Before exporting anything, make sure the ID values are correct 51 | col.UpdateIDs(); 52 | 53 | XmlWriterSettings x = new XmlWriterSettings(); 54 | x.Indent = true; 55 | using (XmlWriter writer = XmlWriter.Create(outputpath, x)) 56 | { 57 | writer.WriteStartDocument(); 58 | writer.WriteStartElement("stix", "STIX_Package", "http://stix.mitre.org/stix-1"); 59 | writer.WriteAttributeString("id", col.ID); 60 | 61 | 62 | //Write all the namespaces 63 | #region namespaces 64 | writer.WriteAttributeString("xmlns", "AddressObj", null, "http://cybox.mitre.org/objects#AddressObject-2"); 65 | writer.WriteAttributeString("xmlns", "FileObj", null, "http://cybox.mitre.org/objects#FileObject-2"); 66 | writer.WriteAttributeString("xmlns", "DomainNameObj", null, "http://cybox.mitre.org/objects#DomainNameObject-1"); 67 | writer.WriteAttributeString("xmlns", "WinRegistryKeyObj", null, "http://cybox.mitre.org/objects#WinRegistryKeyObject-2"); 68 | writer.WriteAttributeString("xmlns", "URIObj", null, "http://cybox.mitre.org/objects#URIObject-2"); 69 | writer.WriteAttributeString("xmlns", "cybox", null, "http://cybox.mitre.org/cybox-2"); 70 | writer.WriteAttributeString("xmlns", "cyboxCommon", null, "http://cybox.mitre.org/common-2"); 71 | writer.WriteAttributeString("xmlns", "cyboxVocabs", null, "http://cybox.mitre.org/default_vocabularies-2"); 72 | writer.WriteAttributeString("xmlns", "mwrinfosecurity", null, "http://www.mwrinfosecurity.com"); 73 | writer.WriteAttributeString("xmlns", "incident", null, "http://stix.mitre.org/Incident-1"); 74 | writer.WriteAttributeString("xmlns", "stixCommon", null, "http://stix.mitre.org/common-1"); 75 | writer.WriteAttributeString("xmlns", "stixVocabs", null, "http://stix.mitre.org/default_vocabularies-1"); 76 | writer.WriteAttributeString("xmlns", "stix", null, "http://stix.mitre.org/stix-1"); 77 | writer.WriteAttributeString("xmlns", "xsi", null, "http://www.w3.org/2001/XMLSchema-instance"); 78 | writer.WriteAttributeString("xmlns", "ttp", null, "http://stix.mitre.org/TTP-1"); 79 | //string x = @"http://stix.mitre.org/stix-1 http://stix.mitre.org/XMLSchema/core/1.1.1/stix_core.xsd http://stix.mitre.org/default_vocabularies-1 http://stix.mitre.org/XMLSchema/default_vocabularies/1.1.1/stix_default_vocabularies.xsd http://cybox.mitre.org/cybox-2 http://cybox.mitre.org/XMLSchema/core/2.1/cybox_core.xsd http://cybox.mitre.org/common-2 http://cybox.mitre.org/XMLSchema/common/2.1/cybox_common.xsd http://cybox.mitre.org/default_vocabularies-2 http://cybox.mitre.org/XMLSchema/default_vocabularies/2.1/cybox_default_vocabularies.xsd http://cybox.mitre.org/objects#WinRegistryKeyObject-2 http://cybox.mitre.org/XMLSchema/objects/Win_Registry_Key/2.0/Win_Registry_Key_Object.xsd http://cybox.mitre.org/objects#AddressObject-2 http://cybox.mitre.org/XMLSchema/objects/Address/2.1/Address_Object.xsd http://cybox.mitre.org/objects#DomainNameObject-1 http://cybox.mitre.org/XMLSchema/objects/Domain_Name/1.0/Domain_Name_Object.xsd http://cybox.mitre.org/objects#FileObject-2 http://cybox.mitre.org/XMLSchema/objects/File/2.1/File_Object.xsd http://cybox.mitre.org/XMLSchema/objects/Address/2.1/Address_Object.xsd http://cybox.mitre.org/objects#URIObject-2 http://cybox.mitre.org/XMLSchema/objects/URI/2.1/URI_Object.xsd http://stix.mitre.org/Incident-1 http://stix.mitre.org/XMLSchema/incident/1.1.1/incident.xsd http://stix.mitre.org/TTP-1 http://stix.mitre.org/XMLSchema/ttp/1.1.1/ttp.xsd http://stix.mitre.org/common-1 http://stix.mitre.org/XMLSchema/common/1.1.1/stix_common.xsd http://stix.mitre.org/default_vocabularies-1 http://stix.mitre.org/XMLSchema/default_vocabularies/1.1.1.0/stix_default_vocabularies.xsd "; 80 | // writer.WriteAttributeString("xsi", "schemaLocation", null, "http://stix.mitre.org/stix-1 http://stix.mitre.org/XMLSchema/core/1.1.1/stix_core.xsd http://stix.mitre.org/default_vocabularies-1 http://stix.mitre.org/XMLSchema/default_vocabularies/1.1.1/stix_default_vocabularies.xsd http://cybox.mitre.org/cybox-2 http://cybox.mitre.org/XMLSchema/core/2.1/cybox_core.xsd http://cybox.mitre.org/common-2 http://cybox.mitre.org/XMLSchema/common/2.1/cybox_common.xsd http://cybox.mitre.org/default_vocabularies-2 http://cybox.mitre.org/XMLSchema/default_vocabularies/2.1/cybox_default_vocabularies.xsd http://cybox.mitre.org/objects#WinRegistryKeyObject-2 http://cybox.mitre.org/XMLSchema/objects/Win_Registry_Key/2.0/Win_Registry_Key_Object.xsd http://cybox.mitre.org/objects#AddressObject-2 http://cybox.mitre.org/XMLSchema/objects/Address/2.1/Address_Object.xsd http://cybox.mitre.org/objects#DomainNameObject-1 http://cybox.mitre.org/XMLSchema/objects/Domain_Name/1.0/Domain_Name_Object.xsd http://cybox.mitre.org/objects#FileObject-2 http://cybox.mitre.org/XMLSchema/objects/File/2.1/File_Object.xsd http://cybox.mitre.org/XMLSchema/objects/Address/2.1/Address_Object.xsd http://cybox.mitre.org/objects#URIObject-2 http://cybox.mitre.org/XMLSchema/objects/URI/2.1/URI_Object.xsd http://stix.mitre.org/Incident-1 http://stix.mitre.org/XMLSchema/incident/1.1.1/incident.xsd http://stix.mitre.org/TTP-1 http://stix.mitre.org/XMLSchema/ttp/1.1.1/ttp.xsd http://stix.mitre.org/common-1 http://stix.mitre.org/XMLSchema/common/1.1.1/stix_common.xsd http://stix.mitre.org/default_vocabularies-1 http://stix.mitre.org/XMLSchema/default_vocabularies/1.1.1.0/stix_default_vocabularies.xsd"); 81 | string tmp = ""; 82 | tmp += " " + "http://stix.mitre.org/stix-1"; 83 | tmp += " " + "http://stix.mitre.org/XMLSchema/core/1.1.1/stix_core.xsd"; 84 | tmp += " " + "http://stix.mitre.org/default_vocabularies-1"; 85 | tmp += " " + "http://stix.mitre.org/XMLSchema/default_vocabularies/1.1.1/stix_default_vocabularies.xsd"; 86 | tmp += " " + "http://cybox.mitre.org/cybox-2"; 87 | tmp += " " + "http://cybox.mitre.org/XMLSchema/core/2.1/cybox_core.xsd"; 88 | tmp += " " + "http://cybox.mitre.org/common-2"; 89 | tmp += " " + "http://cybox.mitre.org/XMLSchema/common/2.1/cybox_common.xsd"; 90 | tmp += " " + "http://cybox.mitre.org/default_vocabularies-2"; 91 | tmp += " " + "http://cybox.mitre.org/XMLSchema/default_vocabularies/2.1/cybox_default_vocabularies.xsd"; 92 | tmp += " " + "http://cybox.mitre.org/objects#WinRegistryKeyObject-2"; 93 | tmp += " " + "http://cybox.mitre.org/XMLSchema/objects/Win_Registry_Key/2.0/Win_Registry_Key_Object.xsd"; 94 | tmp += " " + "http://cybox.mitre.org/objects#AddressObject-2"; 95 | tmp += " " + "http://cybox.mitre.org/XMLSchema/objects/Address/2.1/Address_Object.xsd"; 96 | tmp += " " + "http://cybox.mitre.org/objects#DomainNameObject-1"; 97 | tmp += " " + "http://cybox.mitre.org/XMLSchema/objects/Domain_Name/1.0/Domain_Name_Object.xsd"; 98 | tmp += " " + "http://cybox.mitre.org/objects#FileObject-2"; 99 | tmp += " " + "http://cybox.mitre.org/XMLSchema/objects/File/2.1/File_Object.xsd"; 100 | tmp += " " + "http://cybox.mitre.org/XMLSchema/objects/Address/2.1/Address_Object.xsd"; 101 | tmp += " " + "http://cybox.mitre.org/objects#URIObject-2"; 102 | tmp += " " + "http://cybox.mitre.org/XMLSchema/objects/URI/2.1/URI_Object.xsd"; 103 | tmp += " " + "http://stix.mitre.org/Incident-1"; 104 | tmp += " " + "http://stix.mitre.org/XMLSchema/incident/1.1.1/incident.xsd"; 105 | tmp += " " + "http://stix.mitre.org/TTP-1"; 106 | tmp += " " + "http://stix.mitre.org/XMLSchema/ttp/1.1.1/ttp.xsd"; 107 | tmp += " " + "http://stix.mitre.org/common-1"; 108 | tmp += " " + "http://stix.mitre.org/XMLSchema/common/1.1.1/stix_common.xsd"; 109 | tmp += " " + "http://stix.mitre.org/default_vocabularies-1"; 110 | tmp += " " + "http://stix.mitre.org/XMLSchema/default_vocabularies/1.1.1.0/stix_default_vocabularies.xsd"; 111 | writer.WriteAttributeString("xsi", "schemaLocation", null, tmp); 112 | 113 | 114 | 115 | writer.WriteAttributeString("version", "1.1.1"); 116 | #endregion 117 | 118 | 119 | #region Writecol.Observables 120 | if (col.Observables.Count > 0) 121 | { 122 | writer.WriteStartElement("stix", "col.Observables", null); 123 | writer.WriteAttributeString("cybox_major_version", "2"); 124 | writer.WriteAttributeString("cybox_minor_version", "1"); 125 | writer.WriteAttributeString("cybox_update_version", "0"); 126 | } 127 | 128 | foreach (ObservableObject obs in col.Observables) 129 | { 130 | //Write the header for this observable 131 | writer.WriteStartElement("cybox", "Observable", null); 132 | writer.WriteAttributeString("id", obs.ID); 133 | 134 | //Write the title 135 | writer.WriteStartElement("cybox", "Title", null); 136 | writer.WriteValue(obs.Title); 137 | writer.WriteEndElement(); 138 | 139 | //Write the description 140 | if (!string.IsNullOrWhiteSpace(obs.Description)) 141 | { 142 | writer.WriteStartElement("cybox", "Description", null); 143 | writer.WriteValue(obs.Description); 144 | writer.WriteEndElement(); 145 | } 146 | 147 | #region ipaddresses 148 | if (obs.Type == ObservableObject.ObservableType.IPAddress) 149 | { 150 | writer.WriteStartElement("cybox", "Object", null); 151 | writer.WriteAttributeString("id", obs.ID + "_obj"); 152 | foreach (ObservableObjectField f in obs.Fields) 153 | { 154 | //If there is an IPV4, write it 155 | if (f.FieldName == "IPv4" && !string.IsNullOrWhiteSpace(f.Value)) 156 | { 157 | writer.WriteStartElement("cybox", "Properties", null); 158 | writer.WriteAttributeString("xsi", "type", null, "AddressObj:AddressObjectType"); 159 | writer.WriteAttributeString("category", "ipv4-addr"); 160 | 161 | writer.WriteStartElement("AddressObj", "Address_Value", null); 162 | writer.WriteValue(f.Value); 163 | writer.WriteEndElement(); //Value 164 | writer.WriteEndElement(); //Properties 165 | } 166 | //If there is an IPV6, write it 167 | if (f.FieldName == "IPv6" && !string.IsNullOrWhiteSpace(f.Value)) 168 | { 169 | writer.WriteStartElement("cybox", "Properties", null); 170 | writer.WriteAttributeString("xsi", "type", null, "AddressObj:AddressObjectType"); 171 | writer.WriteAttributeString("category", "ipv6-addr"); 172 | 173 | writer.WriteStartElement("AddressObj", "Address_Value", null); 174 | writer.WriteValue(f.Value); 175 | writer.WriteEndElement(); //Value 176 | writer.WriteEndElement(); //Properties 177 | 178 | } 179 | } 180 | 181 | XML_WriteRelatedObjects(writer, obs.ID); 182 | 183 | writer.WriteEndElement(); //Object 184 | } 185 | #endregion 186 | 187 | #region Domain 188 | if (obs.Type == ObservableObject.ObservableType.Domain) 189 | { 190 | foreach (ObservableObjectField f in obs.Fields) 191 | { 192 | //If there is a domain, write it 193 | if (f.FieldName == "Domain" && !string.IsNullOrWhiteSpace(f.Value)) 194 | { 195 | writer.WriteStartElement("cybox", "Object", null); 196 | writer.WriteAttributeString("id", obs.ID + "_obj"); 197 | writer.WriteStartElement("cybox", "Properties", null); 198 | writer.WriteAttributeString("type", "FQDN"); 199 | writer.WriteAttributeString("xsi", "type", null, "DomainNameObj:DomainNameObjectType"); 200 | 201 | writer.WriteStartElement("DomainNameObj", "Value", null); 202 | writer.WriteValue(f.Value); 203 | writer.WriteEndElement(); //Value 204 | 205 | 206 | writer.WriteEndElement();//Properties 207 | 208 | XML_WriteRelatedObjects(writer, obs.ID); 209 | writer.WriteEndElement();//Object 210 | } 211 | } 212 | } 213 | #endregion 214 | 215 | #region Sample 216 | if (obs.Type == ObservableObject.ObservableType.Sample) 217 | { 218 | writer.WriteStartElement("cybox", "Object", null); 219 | writer.WriteAttributeString("id", obs.ID + "_obj"); 220 | writer.WriteStartElement("cybox", "Properties", null); 221 | writer.WriteAttributeString("xsi", "type", null, "FileObj:FileObjectType"); 222 | 223 | //Write the filename, if present 224 | if (obs.Fields.Find(z => z.FieldName == "File_Name").Value != "") 225 | { 226 | writer.WriteStartElement("FileObj", "File_Name", null); 227 | writer.WriteValue(obs.Fields.Find(z => z.FieldName == "File_Name").Value); 228 | writer.WriteEndElement(); 229 | } 230 | //write the filepath if present 231 | if (obs.Fields.Find(z => z.FieldName == "File_Path").Value != "") 232 | { 233 | writer.WriteStartElement("FileObj", "File_Path", null); 234 | writer.WriteValue(obs.Fields.Find(z => z.FieldName == "File_Path").Value); 235 | writer.WriteEndElement(); 236 | } 237 | 238 | //Write the hashes, if we have at least one present 239 | if (obs.Fields.Find(z => z.FieldName == "Hashes.MD5").Value != "" || obs.Fields.Find(z => z.FieldName == "Hashes.SHA1").Value != "") 240 | { 241 | //Write the header for the hashes 242 | writer.WriteStartElement("FileObj", "Hashes", null); 243 | 244 | //Write the MD5 if presnt 245 | if (obs.Fields.Find(z => z.FieldName == "Hashes.MD5").Value != "") 246 | { 247 | writer.WriteStartElement("cyboxCommon", "Hash", null); 248 | writer.WriteStartElement("cyboxCommon", "Type", null); 249 | writer.WriteValue("MD5"); 250 | writer.WriteEndElement();//Type 251 | writer.WriteStartElement("cyboxCommon", "Simple_Hash_Value", null); 252 | writer.WriteValue(obs.Fields.Find(z => z.FieldName == "Hashes.MD5").Value); 253 | writer.WriteEndElement();//Type 254 | writer.WriteEndElement();//Hash 255 | } 256 | //Write the MD5 if presnt 257 | if (obs.Fields.Find(z => z.FieldName == "Hashes.SHA1").Value != "") 258 | { 259 | writer.WriteStartElement("cyboxCommon", "Hash", null); 260 | writer.WriteStartElement("cyboxCommon", "Type", null); 261 | writer.WriteValue("SHA1"); 262 | writer.WriteEndElement();//Type 263 | writer.WriteStartElement("cyboxCommon", "Simple_Hash_Value", null); 264 | writer.WriteValue(obs.Fields.Find(z => z.FieldName == "Hashes.SHA1").Value); 265 | writer.WriteEndElement();//Type 266 | writer.WriteEndElement();//Hash 267 | } 268 | writer.WriteEndElement();//Hashes 269 | } 270 | 271 | 272 | writer.WriteEndElement();//Properties 273 | 274 | XML_WriteRelatedObjects(writer, obs.ID); 275 | writer.WriteEndElement();//Object 276 | }//End IF File sample 277 | #endregion 278 | 279 | #region Registry 280 | if (obs.Type == ObservableObject.ObservableType.Registry) 281 | { 282 | writer.WriteStartElement("cybox", "Object", null); 283 | writer.WriteAttributeString("id", obs.Fields.First().ID); 284 | writer.WriteStartElement("cybox", "Properties", null); 285 | writer.WriteAttributeString("xsi", "type", null, "WinRegistryKeyObj:WindowsRegistryKeyObjectType"); 286 | 287 | writer.WriteStartElement("WinRegistryKeyObj", "Key", null); 288 | writer.WriteValue(obs.Fields.Find(z => z.FieldName == "Key").Value); 289 | writer.WriteEndElement(); 290 | 291 | writer.WriteStartElement("WinRegistryKeyObj", "Hive", null); 292 | writer.WriteValue(obs.Fields.Find(z => z.FieldName == "Hive").Value); 293 | writer.WriteEndElement(); 294 | 295 | writer.WriteStartElement("WinRegistryKeyObj", "Values", null); 296 | writer.WriteStartElement("WinRegistryKeyObj", "Name", null); 297 | writer.WriteValue(obs.Fields.Find(z => z.FieldName == "Value").Value); 298 | writer.WriteEndElement(); 299 | writer.WriteEndElement(); 300 | 301 | writer.WriteEndElement();//Properties 302 | 303 | XML_WriteRelatedObjects(writer, obs.ID); 304 | 305 | writer.WriteEndElement();//Object 306 | } 307 | #endregion 308 | 309 | writer.WriteEndElement();//Observable 310 | } //End foreach observable 311 | 312 | //Write the closing tag for the group of col.Observables if needed 313 | if (col.Observables.Count > 0) writer.WriteEndElement(); 314 | 315 | #endregion 316 | 317 | 318 | #region WriteIncidentDetails 319 | writer.WriteStartElement("stix", "Incidents", null); 320 | writer.WriteStartElement("stix", "Incident", null); 321 | writer.WriteAttributeString("id", col.IncidentID); 322 | if (col.InitialCompromise != null) writer.WriteAttributeString("timestamp", ((DateTime)col.InitialCompromise).ToString("yyyy-MM-ddTHH:mm:ss") + "+00:00"); 323 | writer.WriteAttributeString("xsi", "type", null, "incident:IncidentType"); 324 | 325 | writer.WriteStartElement("incident", "Title", null); 326 | writer.WriteValue(col.IncidentTitle); 327 | writer.WriteEndElement(); 328 | 329 | writer.WriteStartElement("incident", "Time", null); 330 | 331 | if (col.InitialCompromise != null) 332 | { 333 | writer.WriteStartElement("incident", "Initial_Compromise", null); 334 | writer.WriteAttributeString("precision", "second"); 335 | writer.WriteValue(((DateTime)col.InitialCompromise).ToString("yyyy-MM-ddTHH:mm:ss")); 336 | writer.WriteEndElement();//A single time 337 | } 338 | 339 | if (col.IncidentDiscovered != null) 340 | { 341 | writer.WriteStartElement("incident", "Incident_Discovery", null); 342 | writer.WriteAttributeString("precision", "second"); 343 | writer.WriteValue(((DateTime)col.IncidentDiscovered).ToString("yyyy-MM-ddTHH:mm:ss")); 344 | writer.WriteEndElement();//A single time 345 | } 346 | 347 | if (col.IncidentResolved != null) 348 | { 349 | writer.WriteStartElement("incident", "Restoration_Achieved", null); 350 | writer.WriteAttributeString("precision", "second"); 351 | writer.WriteValue(((DateTime)col.IncidentResolved).ToString("yyyy-MM-ddTHH:mm:ss")); 352 | writer.WriteEndElement();//A single time 353 | } 354 | 355 | if (col.IncidentReported != null) 356 | { 357 | writer.WriteStartElement("incident", "Incident_Reported", null); 358 | writer.WriteAttributeString("precision", "second"); 359 | writer.WriteValue(((DateTime)col.IncidentReported).ToString("yyyy-MM-ddTHH:mm:ss")); 360 | writer.WriteEndElement();//A single time 361 | } 362 | 363 | writer.WriteEndElement();//The time group 364 | 365 | writer.WriteStartElement("incident", "Description", null); 366 | writer.WriteValue(col.IncidentDescription); 367 | writer.WriteEndElement(); 368 | 369 | writer.WriteStartElement("incident", "Reporter", null); 370 | writer.WriteStartElement("stixCommon", "Description", null); 371 | writer.WriteValue("The person who reported the incident"); 372 | writer.WriteEndElement();//Description 373 | writer.WriteStartElement("stixCommon", "Identity", null); 374 | writer.WriteAttributeString("id", HelperClass.GenerateID(col.ReportingOrganisation, "x", "Identity")); 375 | writer.WriteStartElement("stixCommon", "Name", null); 376 | writer.WriteValue(col.ReportedBy); 377 | writer.WriteEndElement();//Name 378 | writer.WriteEndElement();//Identity 379 | writer.WriteEndElement();//Reporter 380 | 381 | writer.WriteStartElement("incident", "Responder", null); 382 | writer.WriteStartElement("stixCommon", "Description", null); 383 | writer.WriteValue("The person who responded to the incident"); 384 | writer.WriteEndElement();//Description 385 | writer.WriteStartElement("stixCommon", "Identity", null); 386 | writer.WriteAttributeString("id", HelperClass.GenerateID(col.ReportingOrganisation, "x", "Identity")); 387 | writer.WriteStartElement("stixCommon", "Name", null); 388 | writer.WriteValue(col.Responder); 389 | writer.WriteEndElement();//Name 390 | writer.WriteEndElement();//Identity 391 | writer.WriteEndElement();//Responder 392 | 393 | 394 | writer.WriteStartElement("incident", "Impact_Assessment", null); 395 | writer.WriteStartElement("incident", "Effects", null); 396 | writer.WriteStartElement("incident", "Effect", null); 397 | writer.WriteAttributeString("xsi", "type", null, "stixVocabs:IncidentEffectVocab-1.0"); 398 | writer.WriteValue(col.IncidentEffect); 399 | writer.WriteEndElement();//Effect 400 | writer.WriteEndElement();//Effects 401 | writer.WriteEndElement();//Impact Assessment 402 | 403 | 404 | //If we have col.Observables, link them to the incident here 405 | if (col.Observables.Count > 0) 406 | { 407 | writer.WriteStartElement("incident", "Related_col.Observables", null); 408 | 409 | } 410 | foreach (ObservableObject obs in col.Observables) 411 | { 412 | 413 | writer.WriteStartElement("incident", "Related_Observable", null); 414 | writer.WriteStartElement("stixCommon", "Observable", null); 415 | writer.WriteAttributeString("idref", obs.ID); 416 | writer.WriteEndElement(); //Observable 417 | writer.WriteEndElement(); //RelatedObservable 418 | 419 | } 420 | if (col.Observables.Count > 0) writer.WriteEndElement(); //Relatedcol.Observables 421 | 422 | writer.WriteStartElement("incident", "Confidence", null); 423 | writer.WriteAttributeString("timestamp", DateTime.Now.ToString("yyyy-MM-ddTHH:mm:ss") + ".0000+00:00"); 424 | writer.WriteStartElement("stixCommon", "Value", null); 425 | writer.WriteAttributeString("xsi", "type", null, "stixVocabs:HighMediumLowVocab-1.0"); 426 | writer.WriteValue(col.Confidence); 427 | writer.WriteEndElement();//Value 428 | writer.WriteEndElement();//Confidence 429 | 430 | writer.WriteEndElement();//Incident 431 | writer.WriteEndElement();//Incidents 432 | #endregion 433 | 434 | //End the document 435 | writer.WriteEndElement(); //STIX_Package 436 | writer.WriteEndDocument(); 437 | 438 | }//Close the writer 439 | 440 | 441 | } 442 | 443 | public bool ExportSuccessful() 444 | { 445 | return Errors.Count == 0 ? true : false; 446 | } 447 | 448 | public List ReportErrors() 449 | { 450 | return Errors; 451 | } 452 | 453 | 454 | /// 455 | /// Sub funtion to help with writing the XML 456 | /// 457 | /// The xml writer being used 458 | /// The ID of the object to find related objects for 459 | private void XML_WriteRelatedObjects(XmlWriter writer, string id) 460 | { 461 | bool headerwritten = false; 462 | foreach (ObservableRelationship r in col.Relationships) 463 | { 464 | if (r.From == id) 465 | { 466 | if (!headerwritten) 467 | { 468 | headerwritten = true; 469 | writer.WriteStartElement("cybox", "Related_Objects", null); 470 | } 471 | 472 | writer.WriteStartElement("cybox", "Related_Object", null); 473 | writer.WriteAttributeString("idref", r.To + "_obj"); 474 | writer.WriteStartElement("cybox", "Relationship", null); 475 | writer.WriteAttributeString("xsi", "type", null, "cyboxVocabs:ObjectRelationshipVocab-1.1"); 476 | writer.WriteValue(Enum.GetName(typeof(ObservableRelationshipType), r.RelationshipType)); 477 | writer.WriteEndElement(); //Relationship 478 | writer.WriteEndElement(); //Related_Object 479 | } 480 | } 481 | if (headerwritten) writer.WriteEndElement();//Related_Objects 482 | } 483 | 484 | 485 | } 486 | } 487 | 488 | -------------------------------------------------------------------------------- /src/Athena/IOCMaker/Plugins/YaraRulesExportPlugin.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using Athena; 7 | using System.Windows.Forms; 8 | using System.IO; 9 | 10 | 11 | namespace YaraRulesExportPlugin 12 | { 13 | public class YaraRulesExportPlugin : AthenaPluginInterfaces.AthenaExportPlugin 14 | { 15 | public ObservableCollection col; 16 | public string outputpath; 17 | public List Errors; 18 | 19 | public string Name { get { return "Export Yara Rule"; } } 20 | public string Version { get { return "V0.01"; } } 21 | public string DisplayName { get { return "Yara Rule"; } } //The text that is shown in the Export-> Menu 22 | 23 | public string PluginSelected() 24 | { 25 | Errors = new List(); 26 | outputpath = ""; 27 | col = new ObservableCollection(); 28 | 29 | // MessageBox.Show("Hello from the plug in"); 30 | 31 | return "Yara|*.yar"; 32 | 33 | 34 | } 35 | 36 | public void OutputFileSelected(string filepath, ObservableCollection collection) 37 | { 38 | outputpath = filepath; 39 | col = collection; 40 | } 41 | 42 | public void DoPreSaveOptions() 43 | { 44 | 45 | 46 | } 47 | 48 | public void DoSave() 49 | { 50 | YaraRule yara = new YaraRule(col.IncidentName, col.IncidentTitle); 51 | 52 | List fieldnamestomap = new List { "Domain", "IPv4", "IPv6", "Hashes.MD5", "Hashes.SHA1", "File_Name", "File_Path", "Key", "Hive", "Value" }; 53 | 54 | foreach (ObservableObject o in col.Observables) 55 | { 56 | foreach (ObservableObjectField f in o.Fields) 57 | { 58 | if (fieldnamestomap.Contains(f.FieldName) && f.Value != "") 59 | { 60 | yara.AddString(f.ID.Substring(f.ID.Length - 12), YaraVariableType.String, f.Value); 61 | } 62 | } 63 | } 64 | 65 | try 66 | { 67 | using (StreamWriter w = new StreamWriter(outputpath)) 68 | { 69 | w.WriteLine(yara.GetRuleText()); 70 | } 71 | } 72 | catch 73 | { 74 | Errors.Add("Error writing to file - is it locked, or was the path invalid?"); 75 | } 76 | } 77 | 78 | public bool ExportSuccessful() 79 | { 80 | return Errors.Count == 0 ? true:false; 81 | } 82 | 83 | public List ReportErrors() 84 | { 85 | return Errors; 86 | } 87 | } 88 | 89 | 90 | enum YaraVariableType { String, Hex } 91 | 92 | class YaraRule 93 | { 94 | public string RuleName; 95 | public string RuleReference; 96 | public Dictionary> Strings; 97 | 98 | public YaraRule(string rulename, string rulereference = "") 99 | { 100 | Strings = new Dictionary>(); 101 | RuleName = rulename; 102 | RuleReference = rulereference; 103 | } 104 | 105 | public void AddString(string id, YaraVariableType vartype, string value) 106 | { 107 | Strings[id] = new KeyValuePair(value, vartype); 108 | } 109 | 110 | public string GetRuleText() 111 | { 112 | StringBuilder main_sb = new StringBuilder(); 113 | 114 | main_sb.AppendLine("Rule " + RuleName); 115 | main_sb.AppendLine("{"); 116 | 117 | 118 | main_sb.AppendLine("\tmeta:"); 119 | if (RuleReference != "") main_sb.AppendLine("\t\tref = \"" + RuleReference + "\""); 120 | main_sb.AppendLine("\t\tgenerated = \"" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "\""); 121 | main_sb.AppendLine("\t\tgeneratedby = \"Athena\""); 122 | main_sb.AppendLine(); 123 | 124 | 125 | main_sb.AppendLine("\tstrings:"); 126 | 127 | StringBuilder conditions_sb = new StringBuilder(); 128 | foreach (KeyValuePair> str in Strings) 129 | { 130 | if (str.Value.Value == YaraVariableType.Hex) main_sb.AppendLine("\t\t$" + str.Key + " = {" + str.Value.Key + "}"); 131 | else main_sb.AppendLine("\t\t$" + str.Key + " = \"" + str.Value.Key + "\" nocase"); 132 | 133 | conditions_sb.Append(" or $" + str.Key); 134 | } 135 | 136 | main_sb.AppendLine(""); 137 | main_sb.AppendLine("\tcondition:"); 138 | // main_sb.AppendLine("\t\t"+conditions_sb.ToString().Substring(4)); 139 | main_sb.AppendLine("\t\tany of them"); 140 | main_sb.AppendLine("}"); 141 | return main_sb.ToString(); 142 | 143 | } 144 | 145 | } 146 | } 147 | -------------------------------------------------------------------------------- /src/Athena/IOCMaker/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using System.Windows.Forms; 6 | 7 | namespace Athena 8 | { 9 | static class Program 10 | { 11 | /// 12 | /// The main entry point for the application. 13 | /// 14 | [STAThread] 15 | static void Main() 16 | { 17 | Application.EnableVisualStyles(); 18 | Application.SetCompatibleTextRenderingDefault(false); 19 | Application.Run(new MainWindow()); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/Athena/IOCMaker/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("IOCMaker")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("IOCMaker")] 13 | [assembly: AssemblyCopyright("Copyright © 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("521662fd-ad0c-4d6a-a955-cba53fb442a5")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /src/Athena/IOCMaker/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace Athena.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Athena.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | 63 | /// 64 | /// Looks up a localized resource of type System.Drawing.Bitmap. 65 | /// 66 | internal static System.Drawing.Bitmap Add_251 { 67 | get { 68 | object obj = ResourceManager.GetObject("Add-251", resourceCulture); 69 | return ((System.Drawing.Bitmap)(obj)); 70 | } 71 | } 72 | 73 | /// 74 | /// Looks up a localized resource of type System.Drawing.Bitmap. 75 | /// 76 | internal static System.Drawing.Bitmap CSV_25 { 77 | get { 78 | object obj = ResourceManager.GetObject("CSV-25", resourceCulture); 79 | return ((System.Drawing.Bitmap)(obj)); 80 | } 81 | } 82 | 83 | /// 84 | /// Looks up a localized resource of type System.Drawing.Bitmap. 85 | /// 86 | internal static System.Drawing.Bitmap Delete_25 { 87 | get { 88 | object obj = ResourceManager.GetObject("Delete-25", resourceCulture); 89 | return ((System.Drawing.Bitmap)(obj)); 90 | } 91 | } 92 | 93 | /// 94 | /// Looks up a localized resource of type System.Drawing.Bitmap. 95 | /// 96 | internal static System.Drawing.Bitmap Edit_Property_25 { 97 | get { 98 | object obj = ResourceManager.GetObject("Edit Property-25", resourceCulture); 99 | return ((System.Drawing.Bitmap)(obj)); 100 | } 101 | } 102 | 103 | /// 104 | /// Looks up a localized resource of type System.Drawing.Bitmap. 105 | /// 106 | internal static System.Drawing.Bitmap Link_25 { 107 | get { 108 | object obj = ResourceManager.GetObject("Link-25", resourceCulture); 109 | return ((System.Drawing.Bitmap)(obj)); 110 | } 111 | } 112 | 113 | /// 114 | /// Looks up a localized resource of type System.Drawing.Bitmap. 115 | /// 116 | internal static System.Drawing.Bitmap loading { 117 | get { 118 | object obj = ResourceManager.GetObject("loading", resourceCulture); 119 | return ((System.Drawing.Bitmap)(obj)); 120 | } 121 | } 122 | 123 | /// 124 | /// Looks up a localized resource of type System.Drawing.Bitmap. 125 | /// 126 | internal static System.Drawing.Bitmap Tree_Structure_25 { 127 | get { 128 | object obj = ResourceManager.GetObject("Tree Structure-25", resourceCulture); 129 | return ((System.Drawing.Bitmap)(obj)); 130 | } 131 | } 132 | } 133 | } 134 | -------------------------------------------------------------------------------- /src/Athena/IOCMaker/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 122 | ..\icons\loading.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 123 | 124 | 125 | ..\icons\Edit Property-25.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 126 | 127 | 128 | ..\icons\Add-25.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 129 | 130 | 131 | ..\icons\Link-25.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 132 | 133 | 134 | ..\icons\Delete-25.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 135 | 136 | 137 | ..\icons\CSV-25.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 138 | 139 | 140 | ..\icons\Tree Structure-25.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 141 | 142 | -------------------------------------------------------------------------------- /src/Athena/IOCMaker/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace Athena.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.1.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/Athena/IOCMaker/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/Athena/IOCMaker/RelationshipAddForm.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace Athena 2 | { 3 | partial class RelationshipAddForm 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RelationshipAddForm)); 32 | this.label1 = new System.Windows.Forms.Label(); 33 | this.FromListBox = new System.Windows.Forms.ListBox(); 34 | this.RelationshipTypeDropDown = new System.Windows.Forms.ComboBox(); 35 | this.label2 = new System.Windows.Forms.Label(); 36 | this.label3 = new System.Windows.Forms.Label(); 37 | this.ToListBox = new System.Windows.Forms.ListBox(); 38 | this.SaveButton = new System.Windows.Forms.Button(); 39 | this.SaveandNewButton = new System.Windows.Forms.Button(); 40 | this.label4 = new System.Windows.Forms.Label(); 41 | this.label5 = new System.Windows.Forms.Label(); 42 | this.SuspendLayout(); 43 | // 44 | // label1 45 | // 46 | this.label1.AutoSize = true; 47 | this.label1.Location = new System.Drawing.Point(238, 31); 48 | this.label1.Name = "label1"; 49 | this.label1.Size = new System.Drawing.Size(127, 13); 50 | this.label1.TabIndex = 0; 51 | this.label1.Text = "Does this, or is done unto"; 52 | // 53 | // FromListBox 54 | // 55 | this.FromListBox.FormattingEnabled = true; 56 | this.FromListBox.Location = new System.Drawing.Point(12, 50); 57 | this.FromListBox.Name = "FromListBox"; 58 | this.FromListBox.Size = new System.Drawing.Size(205, 186); 59 | this.FromListBox.TabIndex = 1; 60 | // 61 | // RelationshipTypeDropDown 62 | // 63 | this.RelationshipTypeDropDown.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 64 | this.RelationshipTypeDropDown.FormattingEnabled = true; 65 | this.RelationshipTypeDropDown.Location = new System.Drawing.Point(223, 50); 66 | this.RelationshipTypeDropDown.Name = "RelationshipTypeDropDown"; 67 | this.RelationshipTypeDropDown.Size = new System.Drawing.Size(157, 21); 68 | this.RelationshipTypeDropDown.TabIndex = 2; 69 | // 70 | // label2 71 | // 72 | this.label2.AutoSize = true; 73 | this.label2.Location = new System.Drawing.Point(9, 31); 74 | this.label2.Name = "label2"; 75 | this.label2.Size = new System.Drawing.Size(106, 13); 76 | this.label2.TabIndex = 3; 77 | this.label2.Text = "This/these indicators"; 78 | // 79 | // label3 80 | // 81 | this.label3.AutoSize = true; 82 | this.label3.Location = new System.Drawing.Point(383, 31); 83 | this.label3.Name = "label3"; 84 | this.label3.Size = new System.Drawing.Size(134, 13); 85 | this.label3.TabIndex = 4; 86 | this.label3.Text = "To/by this/these indicators"; 87 | // 88 | // ToListBox 89 | // 90 | this.ToListBox.FormattingEnabled = true; 91 | this.ToListBox.Location = new System.Drawing.Point(386, 50); 92 | this.ToListBox.Name = "ToListBox"; 93 | this.ToListBox.Size = new System.Drawing.Size(205, 186); 94 | this.ToListBox.TabIndex = 5; 95 | // 96 | // SaveButton 97 | // 98 | this.SaveButton.Location = new System.Drawing.Point(467, 259); 99 | this.SaveButton.Name = "SaveButton"; 100 | this.SaveButton.Size = new System.Drawing.Size(124, 23); 101 | this.SaveButton.TabIndex = 6; 102 | this.SaveButton.Text = "Save"; 103 | this.SaveButton.UseVisualStyleBackColor = true; 104 | this.SaveButton.Click += new System.EventHandler(this.SaveButton_Click); 105 | // 106 | // SaveandNewButton 107 | // 108 | this.SaveandNewButton.Location = new System.Drawing.Point(337, 259); 109 | this.SaveandNewButton.Name = "SaveandNewButton"; 110 | this.SaveandNewButton.Size = new System.Drawing.Size(124, 23); 111 | this.SaveandNewButton.TabIndex = 7; 112 | this.SaveandNewButton.Text = "Save and Another"; 113 | this.SaveandNewButton.UseVisualStyleBackColor = true; 114 | this.SaveandNewButton.Click += new System.EventHandler(this.SaveandNewButton_Click); 115 | // 116 | // label4 117 | // 118 | this.label4.AutoSize = true; 119 | this.label4.Location = new System.Drawing.Point(12, 239); 120 | this.label4.Name = "label4"; 121 | this.label4.Size = new System.Drawing.Size(198, 13); 122 | this.label4.TabIndex = 8; 123 | this.label4.Text = "Hold shift or ctrl to select multiple objects"; 124 | // 125 | // label5 126 | // 127 | this.label5.AutoSize = true; 128 | this.label5.Location = new System.Drawing.Point(393, 239); 129 | this.label5.Name = "label5"; 130 | this.label5.Size = new System.Drawing.Size(198, 13); 131 | this.label5.TabIndex = 9; 132 | this.label5.Text = "Hold shift or ctrl to select multiple objects"; 133 | // 134 | // RelationshipAddForm 135 | // 136 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 137 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 138 | this.ClientSize = new System.Drawing.Size(603, 294); 139 | this.Controls.Add(this.label5); 140 | this.Controls.Add(this.label4); 141 | this.Controls.Add(this.SaveandNewButton); 142 | this.Controls.Add(this.SaveButton); 143 | this.Controls.Add(this.ToListBox); 144 | this.Controls.Add(this.label3); 145 | this.Controls.Add(this.label2); 146 | this.Controls.Add(this.RelationshipTypeDropDown); 147 | this.Controls.Add(this.FromListBox); 148 | this.Controls.Add(this.label1); 149 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; 150 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 151 | this.Name = "RelationshipAddForm"; 152 | this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; 153 | this.Text = "Add a Relationship"; 154 | this.ResumeLayout(false); 155 | this.PerformLayout(); 156 | 157 | } 158 | 159 | #endregion 160 | 161 | private System.Windows.Forms.Label label1; 162 | private System.Windows.Forms.ListBox FromListBox; 163 | private System.Windows.Forms.ComboBox RelationshipTypeDropDown; 164 | private System.Windows.Forms.Label label2; 165 | private System.Windows.Forms.Label label3; 166 | private System.Windows.Forms.ListBox ToListBox; 167 | private System.Windows.Forms.Button SaveButton; 168 | private System.Windows.Forms.Button SaveandNewButton; 169 | private System.Windows.Forms.Label label4; 170 | private System.Windows.Forms.Label label5; 171 | } 172 | } -------------------------------------------------------------------------------- /src/Athena/IOCMaker/RelationshipAddForm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | using System.Windows.Forms; 10 | 11 | namespace Athena 12 | { 13 | public partial class RelationshipAddForm : Form 14 | { 15 | public bool openagain; 16 | ObservableCollection collection; 17 | 18 | public RelationshipAddForm(ref ObservableCollection c) 19 | { 20 | collection = c; 21 | InitializeComponent(); 22 | openagain = false; 23 | 24 | foreach(ObservableObject o in collection.Observables) 25 | { 26 | FromListBox.Items.Add(o); 27 | ToListBox.Items.Add(o); 28 | } 29 | ToListBox.DisplayMember = "DisplayTitle"; 30 | FromListBox.DisplayMember = "DisplayTitle"; 31 | 32 | 33 | FromListBox.SelectionMode = SelectionMode.MultiExtended; 34 | ToListBox.SelectionMode = SelectionMode.MultiExtended; 35 | 36 | foreach(string s in Enum.GetNames(typeof(ObservableRelationshipType))) 37 | { 38 | RelationshipTypeDropDown.Items.Add(s); 39 | } 40 | } 41 | 42 | private void saveandclose() 43 | { 44 | if (ToListBox.SelectedItems == null || ToListBox.SelectedItems.Count == 0 || FromListBox.SelectedItems == null || FromListBox.SelectedItems.Count == 0) 45 | { 46 | MessageBox.Show("You didn't select either a to or a from observable to connect via the relationship", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); 47 | return; 48 | } 49 | else if (RelationshipTypeDropDown.SelectedItem == null) 50 | { 51 | MessageBox.Show("Select a relationship type", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); 52 | return; 53 | } 54 | else 55 | { 56 | foreach (ObservableObject to in ToListBox.SelectedItems) 57 | { 58 | foreach (ObservableObject from in FromListBox.SelectedItems) 59 | { 60 | ObservableRelationship r = new ObservableRelationship(to.ID, from.ID, (ObservableRelationshipType)Enum.Parse(typeof(ObservableRelationshipType), RelationshipTypeDropDown.SelectedItem.ToString(), true)); 61 | collection.Relationships.Add(r); 62 | } 63 | } 64 | } 65 | this.DialogResult = DialogResult.OK; 66 | this.Close(); 67 | } 68 | 69 | private void SaveButton_Click(object sender, EventArgs e) 70 | { 71 | saveandclose(); 72 | } 73 | 74 | private void SaveandNewButton_Click(object sender, EventArgs e) 75 | { 76 | openagain = true; 77 | saveandclose(); 78 | } 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /src/Athena/IOCMaker/VisualiseDataForm.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace Athena 2 | { 3 | partial class VisualiseDataForm 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(VisualiseDataForm)); 32 | this.SuspendLayout(); 33 | // 34 | // VisualiseDataForm 35 | // 36 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 37 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 38 | this.ClientSize = new System.Drawing.Size(862, 541); 39 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 40 | this.Name = "VisualiseDataForm"; 41 | this.Text = "Visualise Data"; 42 | this.ResumeLayout(false); 43 | 44 | } 45 | 46 | #endregion 47 | } 48 | } -------------------------------------------------------------------------------- /src/Athena/IOCMaker/VisualiseDataForm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Forms; 3 | using Microsoft.Msagl; 4 | 5 | namespace Athena 6 | { 7 | public partial class VisualiseDataForm : Form 8 | { 9 | public VisualiseDataForm(ref ObservableCollection Collection) 10 | { 11 | InitializeComponent(); 12 | 13 | //create a form 14 | System.Windows.Forms.Form form = this; 15 | //create a viewer object 16 | Microsoft.Msagl.GraphViewerGdi.GViewer viewer = new Microsoft.Msagl.GraphViewerGdi.GViewer(); 17 | //create a graph object 18 | Microsoft.Msagl.Drawing.Graph graph = new Microsoft.Msagl.Drawing.Graph("graph"); 19 | 20 | //Add all the nodes 21 | foreach(ObservableObject o in Collection.Observables) 22 | { 23 | graph.AddNode(o.DisplayTitle); 24 | } 25 | 26 | //create the links 27 | foreach (ObservableRelationship r in Collection.Relationships) 28 | { 29 | Microsoft.Msagl.Drawing.Edge ed = graph.AddEdge(Collection.Observables.Find(x => x.ID == r.From).DisplayTitle, Enum.GetName(typeof(ObservableRelationshipType), r.RelationshipType), Collection.Observables.Find(x => x.ID == r.To).DisplayTitle); 30 | 31 | //Set the link text to grey 32 | Microsoft.Msagl.Drawing.Label l = ed.Label; 33 | l.FontColor = Microsoft.Msagl.Drawing.Color.DarkGray; 34 | } 35 | 36 | //Get rid of GUI controls we dont want the user to have access to 37 | viewer.LayoutAlgorithmSettingsButtonVisible = false; 38 | viewer.EdgeInsertButtonVisible = false; 39 | viewer.SaveAsMsaglEnabled = false; //This disables save and load of the actual graph data. 40 | 41 | //Give some extra space 42 | graph.LayoutAlgorithmSettings.NodeSeparation = 10; 43 | 44 | //bind the graph to the viewer 45 | viewer.Graph = graph; 46 | //associate the viewer with the form 47 | form.SuspendLayout(); 48 | viewer.Dock = System.Windows.Forms.DockStyle.Fill; 49 | form.Controls.Add(viewer); 50 | form.ResumeLayout(); 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/Athena/IOCMaker/icons/Add-25.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/IOCMaker/icons/Add-25.png -------------------------------------------------------------------------------- /src/Athena/IOCMaker/icons/CSV-25.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/IOCMaker/icons/CSV-25.png -------------------------------------------------------------------------------- /src/Athena/IOCMaker/icons/Delete-25.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/IOCMaker/icons/Delete-25.png -------------------------------------------------------------------------------- /src/Athena/IOCMaker/icons/Edit Property-25.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/IOCMaker/icons/Edit Property-25.png -------------------------------------------------------------------------------- /src/Athena/IOCMaker/icons/Link-25.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/IOCMaker/icons/Link-25.png -------------------------------------------------------------------------------- /src/Athena/IOCMaker/icons/ProgramIcon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/IOCMaker/icons/ProgramIcon.ico -------------------------------------------------------------------------------- /src/Athena/IOCMaker/icons/Tree Structure-25.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/IOCMaker/icons/Tree Structure-25.png -------------------------------------------------------------------------------- /src/Athena/IOCMaker/icons/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/IOCMaker/icons/loading.gif -------------------------------------------------------------------------------- /src/Athena/IOCMaker/obj/Debug/Athena.AddIndicatorForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/IOCMaker/obj/Debug/Athena.AddIndicatorForm.resources -------------------------------------------------------------------------------- /src/Athena/IOCMaker/obj/Debug/Athena.ImportCSV.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/IOCMaker/obj/Debug/Athena.ImportCSV.resources -------------------------------------------------------------------------------- /src/Athena/IOCMaker/obj/Debug/Athena.MainWindow.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/IOCMaker/obj/Debug/Athena.MainWindow.resources -------------------------------------------------------------------------------- /src/Athena/IOCMaker/obj/Debug/Athena.Properties.Resources.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/IOCMaker/obj/Debug/Athena.Properties.Resources.resources -------------------------------------------------------------------------------- /src/Athena/IOCMaker/obj/Debug/Athena.RelationshipAddForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/IOCMaker/obj/Debug/Athena.RelationshipAddForm.resources -------------------------------------------------------------------------------- /src/Athena/IOCMaker/obj/Debug/Athena.VisualiseDataForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/IOCMaker/obj/Debug/Athena.VisualiseDataForm.resources -------------------------------------------------------------------------------- /src/Athena/IOCMaker/obj/Debug/Athena.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/IOCMaker/obj/Debug/Athena.exe -------------------------------------------------------------------------------- /src/Athena/IOCMaker/obj/Debug/Athena.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/IOCMaker/obj/Debug/Athena.pdb -------------------------------------------------------------------------------- /src/Athena/IOCMaker/obj/Debug/CoreCompileInputs.cache: -------------------------------------------------------------------------------- 1 | 6ee263ee10fcd0d93a5947e574879f5833352f36 2 | -------------------------------------------------------------------------------- /src/Athena/IOCMaker/obj/Debug/DesignTimeResolveAssemblyReferences.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/IOCMaker/obj/Debug/DesignTimeResolveAssemblyReferences.cache -------------------------------------------------------------------------------- /src/Athena/IOCMaker/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/IOCMaker/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /src/Athena/IOCMaker/obj/Debug/IOCMaker.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | C:\Users\steve\documents\visual studio 2013\Projects\IOCMaker\IOCMaker\obj\Debug\IOCMaker.csprojResolveAssemblyReference.cache 2 | C:\Users\steve\documents\visual studio 2013\Projects\IOCMaker\IOCMaker\obj\Debug\IOCMaker.csproj.GenerateResource.Cache 3 | C:\Users\steve\Documents\Visual Studio 2013\Projects\IOCMaker\IOCMaker\bin\Debug\Newtonsoft.Json.dll 4 | C:\Users\steve\Documents\Visual Studio 2013\Projects\IOCMaker\IOCMaker\bin\Debug\Newtonsoft.Json.xml 5 | C:\Users\steve\Documents\Visual Studio 2013\Projects\IOCMaker\IOCMaker\bin\Debug\GenericParsing.dll 6 | C:\Users\steve\Documents\Visual Studio 2013\Projects\IOCMaker\IOCMaker\bin\Debug\Microsoft.Msagl.dll 7 | C:\Users\steve\Documents\Visual Studio 2013\Projects\IOCMaker\IOCMaker\bin\Debug\Microsoft.Msagl.Drawing.dll 8 | C:\Users\steve\Documents\Visual Studio 2013\Projects\IOCMaker\IOCMaker\bin\Debug\Microsoft.Msagl.GraphViewerGdi.dll 9 | C:\Users\steve\Documents\Visual Studio 2013\Projects\IOCMaker\IOCMaker\bin\Debug\Microsoft.Msagl.xml 10 | C:\Users\steve\Documents\Visual Studio 2013\Projects\IOCMaker\IOCMaker\bin\Debug\Microsoft.Msagl.Drawing.xml 11 | C:\Users\steve\Documents\Visual Studio 2013\Projects\IOCMaker\IOCMaker\bin\Debug\Microsoft.Msagl.GraphViewerGdi.xml 12 | C:\Users\steve\Documents\Visual Studio 2013\Projects\IOCMaker\IOCMaker\obj\Debug\Athena.AddIndicatorForm.resources 13 | C:\Users\steve\Documents\Visual Studio 2013\Projects\IOCMaker\IOCMaker\obj\Debug\Athena.ImportCSV.resources 14 | C:\Users\steve\Documents\Visual Studio 2013\Projects\IOCMaker\IOCMaker\obj\Debug\Athena.MainWindow.resources 15 | C:\Users\steve\Documents\Visual Studio 2013\Projects\IOCMaker\IOCMaker\obj\Debug\Athena.RelationshipAddForm.resources 16 | C:\Users\steve\Documents\Visual Studio 2013\Projects\IOCMaker\IOCMaker\obj\Debug\Athena.VisualiseDataForm.resources 17 | C:\Users\steve\Documents\Visual Studio 2013\Projects\IOCMaker\IOCMaker\bin\Debug\Athena.exe.config 18 | C:\Users\steve\Documents\Visual Studio 2013\Projects\IOCMaker\IOCMaker\bin\Debug\Athena.exe 19 | C:\Users\steve\Documents\Visual Studio 2013\Projects\IOCMaker\IOCMaker\bin\Debug\Athena.pdb 20 | C:\Users\steve\Documents\Visual Studio 2013\Projects\IOCMaker\IOCMaker\obj\Debug\Athena.Properties.Resources.resources 21 | C:\Users\steve\Documents\Visual Studio 2013\Projects\IOCMaker\IOCMaker\obj\Debug\Athena.exe 22 | C:\Users\steve\Documents\Visual Studio 2013\Projects\IOCMaker\IOCMaker\obj\Debug\Athena.pdb 23 | C:\Users\steve\Documents\Visual Studio 2013\Projects\Athena\IOCMaker\obj\Debug\IOCMaker.csprojResolveAssemblyReference.cache 24 | C:\Users\steve\Documents\Visual Studio 2013\Projects\Athena\IOCMaker\obj\Debug\Athena.AddIndicatorForm.resources 25 | C:\Users\steve\Documents\Visual Studio 2013\Projects\Athena\IOCMaker\obj\Debug\Athena.ImportCSV.resources 26 | C:\Users\steve\Documents\Visual Studio 2013\Projects\Athena\IOCMaker\obj\Debug\Athena.MainWindow.resources 27 | C:\Users\steve\Documents\Visual Studio 2013\Projects\Athena\IOCMaker\obj\Debug\Athena.Properties.Resources.resources 28 | C:\Users\steve\Documents\Visual Studio 2013\Projects\Athena\IOCMaker\obj\Debug\Athena.RelationshipAddForm.resources 29 | C:\Users\steve\Documents\Visual Studio 2013\Projects\Athena\IOCMaker\obj\Debug\Athena.VisualiseDataForm.resources 30 | C:\Users\steve\Documents\Visual Studio 2013\Projects\Athena\IOCMaker\obj\Debug\IOCMaker.csproj.GenerateResource.Cache 31 | C:\Users\steve\Documents\Visual Studio 2013\Projects\Athena\IOCMaker\obj\Debug\Athena.exe 32 | C:\Users\steve\Documents\Visual Studio 2013\Projects\Athena\IOCMaker\obj\Debug\Athena.pdb 33 | C:\Users\steve\Documents\Visual Studio 2013\Projects\Athena\IOCMaker\bin\Debug\Athena.exe.config 34 | C:\Users\steve\Documents\Visual Studio 2013\Projects\Athena\IOCMaker\bin\Debug\Athena.exe 35 | C:\Users\steve\Documents\Visual Studio 2013\Projects\Athena\IOCMaker\bin\Debug\Athena.pdb 36 | C:\Users\steve\Documents\Visual Studio 2013\Projects\Athena\IOCMaker\bin\Debug\GenericParsing.dll 37 | C:\Users\steve\Documents\Visual Studio 2013\Projects\Athena\IOCMaker\bin\Debug\Microsoft.Msagl.dll 38 | C:\Users\steve\Documents\Visual Studio 2013\Projects\Athena\IOCMaker\bin\Debug\Microsoft.Msagl.Drawing.dll 39 | C:\Users\steve\Documents\Visual Studio 2013\Projects\Athena\IOCMaker\bin\Debug\Microsoft.Msagl.GraphViewerGdi.dll 40 | C:\Users\steve\Documents\Visual Studio 2013\Projects\Athena\IOCMaker\bin\Debug\Newtonsoft.Json.dll 41 | C:\Users\steve\Documents\Visual Studio 2013\Projects\Athena\IOCMaker\bin\Debug\Microsoft.Msagl.xml 42 | C:\Users\steve\Documents\Visual Studio 2013\Projects\Athena\IOCMaker\bin\Debug\Microsoft.Msagl.Drawing.xml 43 | C:\Users\steve\Documents\Visual Studio 2013\Projects\Athena\IOCMaker\bin\Debug\Microsoft.Msagl.GraphViewerGdi.xml 44 | C:\Users\steve\Documents\Visual Studio 2013\Projects\Athena\IOCMaker\bin\Debug\Newtonsoft.Json.xml 45 | C:\Users\steve\Source\Repos\Athena\src\Athena\IOCMaker\bin\Debug\Athena.exe.config 46 | C:\Users\steve\Source\Repos\Athena\src\Athena\IOCMaker\bin\Debug\Athena.exe 47 | C:\Users\steve\Source\Repos\Athena\src\Athena\IOCMaker\bin\Debug\Athena.pdb 48 | C:\Users\steve\Source\Repos\Athena\src\Athena\IOCMaker\bin\Debug\GenericParsing.dll 49 | C:\Users\steve\Source\Repos\Athena\src\Athena\IOCMaker\bin\Debug\Microsoft.Msagl.dll 50 | C:\Users\steve\Source\Repos\Athena\src\Athena\IOCMaker\bin\Debug\Microsoft.Msagl.Drawing.dll 51 | C:\Users\steve\Source\Repos\Athena\src\Athena\IOCMaker\bin\Debug\Microsoft.Msagl.GraphViewerGdi.dll 52 | C:\Users\steve\Source\Repos\Athena\src\Athena\IOCMaker\bin\Debug\Newtonsoft.Json.dll 53 | C:\Users\steve\Source\Repos\Athena\src\Athena\IOCMaker\bin\Debug\Microsoft.Msagl.xml 54 | C:\Users\steve\Source\Repos\Athena\src\Athena\IOCMaker\bin\Debug\Microsoft.Msagl.Drawing.xml 55 | C:\Users\steve\Source\Repos\Athena\src\Athena\IOCMaker\bin\Debug\Microsoft.Msagl.GraphViewerGdi.xml 56 | C:\Users\steve\Source\Repos\Athena\src\Athena\IOCMaker\bin\Debug\Newtonsoft.Json.xml 57 | C:\Users\steve\Source\Repos\Athena\src\Athena\IOCMaker\obj\Debug\IOCMaker.csprojResolveAssemblyReference.cache 58 | C:\Users\steve\Source\Repos\Athena\src\Athena\IOCMaker\obj\Debug\Athena.AddIndicatorForm.resources 59 | C:\Users\steve\Source\Repos\Athena\src\Athena\IOCMaker\obj\Debug\Athena.ImportCSV.resources 60 | C:\Users\steve\Source\Repos\Athena\src\Athena\IOCMaker\obj\Debug\Athena.MainWindow.resources 61 | C:\Users\steve\Source\Repos\Athena\src\Athena\IOCMaker\obj\Debug\Athena.Properties.Resources.resources 62 | C:\Users\steve\Source\Repos\Athena\src\Athena\IOCMaker\obj\Debug\Athena.RelationshipAddForm.resources 63 | C:\Users\steve\Source\Repos\Athena\src\Athena\IOCMaker\obj\Debug\Athena.VisualiseDataForm.resources 64 | C:\Users\steve\Source\Repos\Athena\src\Athena\IOCMaker\obj\Debug\IOCMaker.csproj.GenerateResource.Cache 65 | C:\Users\steve\Source\Repos\Athena\src\Athena\IOCMaker\obj\Debug\Athena.exe 66 | C:\Users\steve\Source\Repos\Athena\src\Athena\IOCMaker\obj\Debug\Athena.pdb 67 | -------------------------------------------------------------------------------- /src/Athena/IOCMaker/obj/Debug/IOCMaker.csproj.GenerateResource.Cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/IOCMaker/obj/Debug/IOCMaker.csproj.GenerateResource.Cache -------------------------------------------------------------------------------- /src/Athena/IOCMaker/obj/Debug/IOCMaker.csprojResolveAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/IOCMaker/obj/Debug/IOCMaker.csprojResolveAssemblyReference.cache -------------------------------------------------------------------------------- /src/Athena/IOCMaker/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/IOCMaker/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll -------------------------------------------------------------------------------- /src/Athena/IOCMaker/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/IOCMaker/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs -------------------------------------------------------------------------------- /src/Athena/IOCMaker/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/IOCMaker/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs -------------------------------------------------------------------------------- /src/Athena/IOCMaker/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/IOCMaker/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs -------------------------------------------------------------------------------- /src/Athena/IOCMaker/obj/Release/Athena.AddIndicatorForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/IOCMaker/obj/Release/Athena.AddIndicatorForm.resources -------------------------------------------------------------------------------- /src/Athena/IOCMaker/obj/Release/Athena.ImportCSV.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/IOCMaker/obj/Release/Athena.ImportCSV.resources -------------------------------------------------------------------------------- /src/Athena/IOCMaker/obj/Release/Athena.MainWindow.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/IOCMaker/obj/Release/Athena.MainWindow.resources -------------------------------------------------------------------------------- /src/Athena/IOCMaker/obj/Release/Athena.Properties.Resources.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/IOCMaker/obj/Release/Athena.Properties.Resources.resources -------------------------------------------------------------------------------- /src/Athena/IOCMaker/obj/Release/Athena.RelationshipAddForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/IOCMaker/obj/Release/Athena.RelationshipAddForm.resources -------------------------------------------------------------------------------- /src/Athena/IOCMaker/obj/Release/Athena.VisualiseDataForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/IOCMaker/obj/Release/Athena.VisualiseDataForm.resources -------------------------------------------------------------------------------- /src/Athena/IOCMaker/obj/Release/Athena.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/IOCMaker/obj/Release/Athena.exe -------------------------------------------------------------------------------- /src/Athena/IOCMaker/obj/Release/Athena.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/IOCMaker/obj/Release/Athena.pdb -------------------------------------------------------------------------------- /src/Athena/IOCMaker/obj/Release/CoreCompileInputs.cache: -------------------------------------------------------------------------------- 1 | 6ee263ee10fcd0d93a5947e574879f5833352f36 2 | -------------------------------------------------------------------------------- /src/Athena/IOCMaker/obj/Release/DesignTimeResolveAssemblyReferences.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/IOCMaker/obj/Release/DesignTimeResolveAssemblyReferences.cache -------------------------------------------------------------------------------- /src/Athena/IOCMaker/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/IOCMaker/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /src/Athena/IOCMaker/obj/Release/IOCMaker.AddIndicatorForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/IOCMaker/obj/Release/IOCMaker.AddIndicatorForm.resources -------------------------------------------------------------------------------- /src/Athena/IOCMaker/obj/Release/IOCMaker.ImportCSV.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/IOCMaker/obj/Release/IOCMaker.ImportCSV.resources -------------------------------------------------------------------------------- /src/Athena/IOCMaker/obj/Release/IOCMaker.MainWindow.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/IOCMaker/obj/Release/IOCMaker.MainWindow.resources -------------------------------------------------------------------------------- /src/Athena/IOCMaker/obj/Release/IOCMaker.Properties.Resources.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/IOCMaker/obj/Release/IOCMaker.Properties.Resources.resources -------------------------------------------------------------------------------- /src/Athena/IOCMaker/obj/Release/IOCMaker.RelationshipAddForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/IOCMaker/obj/Release/IOCMaker.RelationshipAddForm.resources -------------------------------------------------------------------------------- /src/Athena/IOCMaker/obj/Release/IOCMaker.VisualiseForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/IOCMaker/obj/Release/IOCMaker.VisualiseForm.resources -------------------------------------------------------------------------------- /src/Athena/IOCMaker/obj/Release/IOCMaker.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | C:\Users\steve\documents\visual studio 2013\Projects\IOCMaker\IOCMaker\bin\Release\IOCMaker.exe.config 2 | C:\Users\steve\documents\visual studio 2013\Projects\IOCMaker\IOCMaker\bin\Release\IOCMaker.exe 3 | C:\Users\steve\documents\visual studio 2013\Projects\IOCMaker\IOCMaker\bin\Release\IOCMaker.pdb 4 | C:\Users\steve\documents\visual studio 2013\Projects\IOCMaker\IOCMaker\bin\Release\Newtonsoft.Json.dll 5 | C:\Users\steve\documents\visual studio 2013\Projects\IOCMaker\IOCMaker\bin\Release\Newtonsoft.Json.xml 6 | C:\Users\steve\documents\visual studio 2013\Projects\IOCMaker\IOCMaker\obj\Release\IOCMaker.csprojResolveAssemblyReference.cache 7 | C:\Users\steve\documents\visual studio 2013\Projects\IOCMaker\IOCMaker\obj\Release\IOCMaker.AddIndicatorForm.resources 8 | C:\Users\steve\documents\visual studio 2013\Projects\IOCMaker\IOCMaker\obj\Release\IOCMaker.MainWindow.resources 9 | C:\Users\steve\documents\visual studio 2013\Projects\IOCMaker\IOCMaker\obj\Release\IOCMaker.Properties.Resources.resources 10 | C:\Users\steve\documents\visual studio 2013\Projects\IOCMaker\IOCMaker\obj\Release\IOCMaker.RelationshipAddForm.resources 11 | C:\Users\steve\documents\visual studio 2013\Projects\IOCMaker\IOCMaker\obj\Release\IOCMaker.csproj.GenerateResource.Cache 12 | C:\Users\steve\documents\visual studio 2013\Projects\IOCMaker\IOCMaker\obj\Release\IOCMaker.exe 13 | C:\Users\steve\documents\visual studio 2013\Projects\IOCMaker\IOCMaker\obj\Release\IOCMaker.pdb 14 | C:\Users\steve\documents\visual studio 2013\Projects\IOCMaker\IOCMaker\obj\Release\IOCMaker.ImportCSV.resources 15 | C:\Users\steve\documents\visual studio 2013\Projects\IOCMaker\IOCMaker\bin\Release\GenericParsing.dll 16 | C:\Users\steve\documents\visual studio 2013\Projects\IOCMaker\IOCMaker\obj\Release\IOCMaker.VisualiseForm.resources 17 | C:\Users\steve\Documents\Visual Studio 2013\Projects\Athena\IOCMaker\bin\Release\Athena.exe.config 18 | C:\Users\steve\Documents\Visual Studio 2013\Projects\Athena\IOCMaker\bin\Release\Athena.exe 19 | C:\Users\steve\Documents\Visual Studio 2013\Projects\Athena\IOCMaker\bin\Release\Athena.pdb 20 | C:\Users\steve\Documents\Visual Studio 2013\Projects\Athena\IOCMaker\bin\Release\GenericParsing.dll 21 | C:\Users\steve\Documents\Visual Studio 2013\Projects\Athena\IOCMaker\bin\Release\Microsoft.Msagl.dll 22 | C:\Users\steve\Documents\Visual Studio 2013\Projects\Athena\IOCMaker\bin\Release\Microsoft.Msagl.Drawing.dll 23 | C:\Users\steve\Documents\Visual Studio 2013\Projects\Athena\IOCMaker\bin\Release\Microsoft.Msagl.GraphViewerGdi.dll 24 | C:\Users\steve\Documents\Visual Studio 2013\Projects\Athena\IOCMaker\bin\Release\Newtonsoft.Json.dll 25 | C:\Users\steve\Documents\Visual Studio 2013\Projects\Athena\IOCMaker\bin\Release\Microsoft.Msagl.xml 26 | C:\Users\steve\Documents\Visual Studio 2013\Projects\Athena\IOCMaker\bin\Release\Microsoft.Msagl.Drawing.xml 27 | C:\Users\steve\Documents\Visual Studio 2013\Projects\Athena\IOCMaker\bin\Release\Microsoft.Msagl.GraphViewerGdi.xml 28 | C:\Users\steve\Documents\Visual Studio 2013\Projects\Athena\IOCMaker\bin\Release\Newtonsoft.Json.xml 29 | C:\Users\steve\Documents\Visual Studio 2013\Projects\Athena\IOCMaker\obj\Release\IOCMaker.csprojResolveAssemblyReference.cache 30 | C:\Users\steve\Documents\Visual Studio 2013\Projects\Athena\IOCMaker\obj\Release\Athena.AddIndicatorForm.resources 31 | C:\Users\steve\Documents\Visual Studio 2013\Projects\Athena\IOCMaker\obj\Release\Athena.ImportCSV.resources 32 | C:\Users\steve\Documents\Visual Studio 2013\Projects\Athena\IOCMaker\obj\Release\Athena.MainWindow.resources 33 | C:\Users\steve\Documents\Visual Studio 2013\Projects\Athena\IOCMaker\obj\Release\Athena.Properties.Resources.resources 34 | C:\Users\steve\Documents\Visual Studio 2013\Projects\Athena\IOCMaker\obj\Release\Athena.RelationshipAddForm.resources 35 | C:\Users\steve\Documents\Visual Studio 2013\Projects\Athena\IOCMaker\obj\Release\Athena.VisualiseDataForm.resources 36 | C:\Users\steve\Documents\Visual Studio 2013\Projects\Athena\IOCMaker\obj\Release\IOCMaker.csproj.GenerateResource.Cache 37 | C:\Users\steve\Documents\Visual Studio 2013\Projects\Athena\IOCMaker\obj\Release\Athena.exe 38 | C:\Users\steve\Documents\Visual Studio 2013\Projects\Athena\IOCMaker\obj\Release\Athena.pdb 39 | C:\Users\steve\Source\Repos\Athena\src\Athena\IOCMaker\bin\Release\Athena.exe.config 40 | C:\Users\steve\Source\Repos\Athena\src\Athena\IOCMaker\bin\Release\Athena.exe 41 | C:\Users\steve\Source\Repos\Athena\src\Athena\IOCMaker\bin\Release\Athena.pdb 42 | C:\Users\steve\Source\Repos\Athena\src\Athena\IOCMaker\bin\Release\GenericParsing.dll 43 | C:\Users\steve\Source\Repos\Athena\src\Athena\IOCMaker\bin\Release\Microsoft.Msagl.dll 44 | C:\Users\steve\Source\Repos\Athena\src\Athena\IOCMaker\bin\Release\Microsoft.Msagl.Drawing.dll 45 | C:\Users\steve\Source\Repos\Athena\src\Athena\IOCMaker\bin\Release\Microsoft.Msagl.GraphViewerGdi.dll 46 | C:\Users\steve\Source\Repos\Athena\src\Athena\IOCMaker\bin\Release\Newtonsoft.Json.dll 47 | C:\Users\steve\Source\Repos\Athena\src\Athena\IOCMaker\bin\Release\Microsoft.Msagl.xml 48 | C:\Users\steve\Source\Repos\Athena\src\Athena\IOCMaker\bin\Release\Microsoft.Msagl.Drawing.xml 49 | C:\Users\steve\Source\Repos\Athena\src\Athena\IOCMaker\bin\Release\Microsoft.Msagl.GraphViewerGdi.xml 50 | C:\Users\steve\Source\Repos\Athena\src\Athena\IOCMaker\bin\Release\Newtonsoft.Json.xml 51 | C:\Users\steve\Source\Repos\Athena\src\Athena\IOCMaker\obj\Release\IOCMaker.csprojResolveAssemblyReference.cache 52 | C:\Users\steve\Source\Repos\Athena\src\Athena\IOCMaker\obj\Release\Athena.AddIndicatorForm.resources 53 | C:\Users\steve\Source\Repos\Athena\src\Athena\IOCMaker\obj\Release\Athena.ImportCSV.resources 54 | C:\Users\steve\Source\Repos\Athena\src\Athena\IOCMaker\obj\Release\Athena.MainWindow.resources 55 | C:\Users\steve\Source\Repos\Athena\src\Athena\IOCMaker\obj\Release\Athena.Properties.Resources.resources 56 | C:\Users\steve\Source\Repos\Athena\src\Athena\IOCMaker\obj\Release\Athena.RelationshipAddForm.resources 57 | C:\Users\steve\Source\Repos\Athena\src\Athena\IOCMaker\obj\Release\Athena.VisualiseDataForm.resources 58 | C:\Users\steve\Source\Repos\Athena\src\Athena\IOCMaker\obj\Release\IOCMaker.csproj.GenerateResource.Cache 59 | C:\Users\steve\Source\Repos\Athena\src\Athena\IOCMaker\obj\Release\Athena.exe 60 | C:\Users\steve\Source\Repos\Athena\src\Athena\IOCMaker\obj\Release\Athena.pdb 61 | -------------------------------------------------------------------------------- /src/Athena/IOCMaker/obj/Release/IOCMaker.csproj.GenerateResource.Cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/IOCMaker/obj/Release/IOCMaker.csproj.GenerateResource.Cache -------------------------------------------------------------------------------- /src/Athena/IOCMaker/obj/Release/IOCMaker.csprojResolveAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/IOCMaker/obj/Release/IOCMaker.csprojResolveAssemblyReference.cache -------------------------------------------------------------------------------- /src/Athena/IOCMaker/obj/Release/IOCMaker.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/IOCMaker/obj/Release/IOCMaker.exe -------------------------------------------------------------------------------- /src/Athena/IOCMaker/obj/Release/IOCMaker.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/IOCMaker/obj/Release/IOCMaker.pdb -------------------------------------------------------------------------------- /src/Athena/IOCMaker/obj/Release/TempPE/Properties.Resources.Designer.cs.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/IOCMaker/obj/Release/TempPE/Properties.Resources.Designer.cs.dll -------------------------------------------------------------------------------- /src/Athena/IOCMaker/obj/Release/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/IOCMaker/obj/Release/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs -------------------------------------------------------------------------------- /src/Athena/IOCMaker/obj/Release/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/IOCMaker/obj/Release/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs -------------------------------------------------------------------------------- /src/Athena/IOCMaker/obj/Release/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/IOCMaker/obj/Release/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs -------------------------------------------------------------------------------- /src/Athena/IOCMaker/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/Athena/packages/Microsoft.Msagl.1.0.2/Microsoft.Msagl.1.0.2.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/packages/Microsoft.Msagl.1.0.2/Microsoft.Msagl.1.0.2.nupkg -------------------------------------------------------------------------------- /src/Athena/packages/Microsoft.Msagl.1.0.2/lib/net40/Microsoft.Msagl.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/packages/Microsoft.Msagl.1.0.2/lib/net40/Microsoft.Msagl.dll -------------------------------------------------------------------------------- /src/Athena/packages/Microsoft.Msagl.Drawing.1.0.2/Microsoft.Msagl.Drawing.1.0.2.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/packages/Microsoft.Msagl.Drawing.1.0.2/Microsoft.Msagl.Drawing.1.0.2.nupkg -------------------------------------------------------------------------------- /src/Athena/packages/Microsoft.Msagl.Drawing.1.0.2/lib/net40/Microsoft.Msagl.Drawing.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/packages/Microsoft.Msagl.Drawing.1.0.2/lib/net40/Microsoft.Msagl.Drawing.dll -------------------------------------------------------------------------------- /src/Athena/packages/Microsoft.Msagl.GraphViewerGDI.1.0.2/Microsoft.Msagl.GraphViewerGDI.1.0.2.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/packages/Microsoft.Msagl.GraphViewerGDI.1.0.2/Microsoft.Msagl.GraphViewerGDI.1.0.2.nupkg -------------------------------------------------------------------------------- /src/Athena/packages/Microsoft.Msagl.GraphViewerGDI.1.0.2/lib/net40/Microsoft.Msagl.GraphViewerGdi.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/packages/Microsoft.Msagl.GraphViewerGDI.1.0.2/lib/net40/Microsoft.Msagl.GraphViewerGdi.dll -------------------------------------------------------------------------------- /src/Athena/packages/Newtonsoft.Json.10.0.2/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2007 James Newton-King 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /src/Athena/packages/Newtonsoft.Json.10.0.2/Newtonsoft.Json.10.0.2.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/packages/Newtonsoft.Json.10.0.2/Newtonsoft.Json.10.0.2.nupkg -------------------------------------------------------------------------------- /src/Athena/packages/Newtonsoft.Json.10.0.2/lib/net20/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/packages/Newtonsoft.Json.10.0.2/lib/net20/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /src/Athena/packages/Newtonsoft.Json.10.0.2/lib/net35/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/packages/Newtonsoft.Json.10.0.2/lib/net35/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /src/Athena/packages/Newtonsoft.Json.10.0.2/lib/net40/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/packages/Newtonsoft.Json.10.0.2/lib/net40/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /src/Athena/packages/Newtonsoft.Json.10.0.2/lib/net45/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/packages/Newtonsoft.Json.10.0.2/lib/net45/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /src/Athena/packages/Newtonsoft.Json.10.0.2/lib/netstandard1.0/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/packages/Newtonsoft.Json.10.0.2/lib/netstandard1.0/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /src/Athena/packages/Newtonsoft.Json.10.0.2/lib/netstandard1.3/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/packages/Newtonsoft.Json.10.0.2/lib/netstandard1.3/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /src/Athena/packages/Newtonsoft.Json.10.0.2/lib/portable-net40+sl5+win8+wpa81+wp8/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/packages/Newtonsoft.Json.10.0.2/lib/portable-net40+sl5+win8+wpa81+wp8/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /src/Athena/packages/Newtonsoft.Json.10.0.2/lib/portable-net45+win8+wpa81+wp8/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/packages/Newtonsoft.Json.10.0.2/lib/portable-net45+win8+wpa81+wp8/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /src/Athena/packages/Newtonsoft.Json.10.0.2/tools/install.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | 3 | # open json.net splash page on package install 4 | # don't open if json.net is installed as a dependency 5 | 6 | try 7 | { 8 | $url = "http://www.newtonsoft.com/json/install?version=" + $package.Version 9 | $dte2 = Get-Interface $dte ([EnvDTE80.DTE2]) 10 | 11 | if ($dte2.ActiveWindow.Caption -eq "Package Manager Console") 12 | { 13 | # user is installing from VS NuGet console 14 | # get reference to the window, the console host and the input history 15 | # show webpage if "install-package newtonsoft.json" was last input 16 | 17 | $consoleWindow = $(Get-VSComponentModel).GetService([NuGetConsole.IPowerConsoleWindow]) 18 | 19 | $props = $consoleWindow.GetType().GetProperties([System.Reflection.BindingFlags]::Instance -bor ` 20 | [System.Reflection.BindingFlags]::NonPublic) 21 | 22 | $prop = $props | ? { $_.Name -eq "ActiveHostInfo" } | select -first 1 23 | if ($prop -eq $null) { return } 24 | 25 | $hostInfo = $prop.GetValue($consoleWindow) 26 | if ($hostInfo -eq $null) { return } 27 | 28 | $history = $hostInfo.WpfConsole.InputHistory.History 29 | 30 | $lastCommand = $history | select -last 1 31 | 32 | if ($lastCommand) 33 | { 34 | $lastCommand = $lastCommand.Trim().ToLower() 35 | if ($lastCommand.StartsWith("install-package") -and $lastCommand.Contains("newtonsoft.json")) 36 | { 37 | $dte2.ItemOperations.Navigate($url) | Out-Null 38 | } 39 | } 40 | } 41 | else 42 | { 43 | # user is installing from VS NuGet dialog 44 | # get reference to the window, then smart output console provider 45 | # show webpage if messages in buffered console contains "installing...newtonsoft.json" in last operation 46 | 47 | $instanceField = [NuGet.Dialog.PackageManagerWindow].GetField("CurrentInstance", [System.Reflection.BindingFlags]::Static -bor ` 48 | [System.Reflection.BindingFlags]::NonPublic) 49 | 50 | $consoleField = [NuGet.Dialog.PackageManagerWindow].GetField("_smartOutputConsoleProvider", [System.Reflection.BindingFlags]::Instance -bor ` 51 | [System.Reflection.BindingFlags]::NonPublic) 52 | 53 | if ($instanceField -eq $null -or $consoleField -eq $null) { return } 54 | 55 | $instance = $instanceField.GetValue($null) 56 | 57 | if ($instance -eq $null) { return } 58 | 59 | $consoleProvider = $consoleField.GetValue($instance) 60 | if ($consoleProvider -eq $null) { return } 61 | 62 | $console = $consoleProvider.CreateOutputConsole($false) 63 | 64 | $messagesField = $console.GetType().GetField("_messages", [System.Reflection.BindingFlags]::Instance -bor ` 65 | [System.Reflection.BindingFlags]::NonPublic) 66 | if ($messagesField -eq $null) { return } 67 | 68 | $messages = $messagesField.GetValue($console) 69 | if ($messages -eq $null) { return } 70 | 71 | $operations = $messages -split "==============================" 72 | 73 | $lastOperation = $operations | select -last 1 74 | 75 | if ($lastOperation) 76 | { 77 | $lastOperation = $lastOperation.ToLower() 78 | 79 | $lines = $lastOperation -split "`r`n" 80 | 81 | $installMatch = $lines | ? { $_.StartsWith("------- installing...newtonsoft.json ") } | select -first 1 82 | 83 | if ($installMatch) 84 | { 85 | $dte2.ItemOperations.Navigate($url) | Out-Null 86 | } 87 | } 88 | } 89 | } 90 | catch 91 | { 92 | try 93 | { 94 | $pmPane = $dte2.ToolWindows.OutputWindow.OutputWindowPanes.Item("Package Manager") 95 | 96 | $selection = $pmPane.TextDocument.Selection 97 | $selection.StartOfDocument($false) 98 | $selection.EndOfDocument($true) 99 | 100 | if ($selection.Text.StartsWith("Attempting to gather dependencies information for package 'Newtonsoft.Json." + $package.Version + "'")) 101 | { 102 | # don't show on upgrade 103 | if (!$selection.Text.Contains("Removed package")) 104 | { 105 | $dte2.ItemOperations.Navigate($url) | Out-Null 106 | } 107 | } 108 | } 109 | catch 110 | { 111 | # stop potential errors from bubbling up 112 | # worst case the splash page won't open 113 | } 114 | } 115 | 116 | # still yolo -------------------------------------------------------------------------------- /src/Athena/packages/Resource.Embedder.1.2.2/Mono.Cecil.Mdb.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/packages/Resource.Embedder.1.2.2/Mono.Cecil.Mdb.dll -------------------------------------------------------------------------------- /src/Athena/packages/Resource.Embedder.1.2.2/Mono.Cecil.Pdb.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/packages/Resource.Embedder.1.2.2/Mono.Cecil.Pdb.dll -------------------------------------------------------------------------------- /src/Athena/packages/Resource.Embedder.1.2.2/Mono.Cecil.Rocks.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/packages/Resource.Embedder.1.2.2/Mono.Cecil.Rocks.dll -------------------------------------------------------------------------------- /src/Athena/packages/Resource.Embedder.1.2.2/Mono.Cecil.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/packages/Resource.Embedder.1.2.2/Mono.Cecil.dll -------------------------------------------------------------------------------- /src/Athena/packages/Resource.Embedder.1.2.2/Resource.Embedder.1.2.2.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/packages/Resource.Embedder.1.2.2/Resource.Embedder.1.2.2.nupkg -------------------------------------------------------------------------------- /src/Athena/packages/Resource.Embedder.1.2.2/ResourceEmbedder.Core.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/packages/Resource.Embedder.1.2.2/ResourceEmbedder.Core.dll -------------------------------------------------------------------------------- /src/Athena/packages/Resource.Embedder.1.2.2/ResourceEmbedder.Core.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/packages/Resource.Embedder.1.2.2/ResourceEmbedder.Core.pdb -------------------------------------------------------------------------------- /src/Athena/packages/Resource.Embedder.1.2.2/ResourceEmbedder.MsBuild.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/packages/Resource.Embedder.1.2.2/ResourceEmbedder.MsBuild.dll -------------------------------------------------------------------------------- /src/Athena/packages/Resource.Embedder.1.2.2/ResourceEmbedder.MsBuild.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSecureLABS/Athena/19eaf87d252658fe185fc9c32652d16fecec31d4/src/Athena/packages/Resource.Embedder.1.2.2/ResourceEmbedder.MsBuild.pdb -------------------------------------------------------------------------------- /src/Athena/packages/Resource.Embedder.1.2.2/Tools/install.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | 3 | 4 | # Need to load MSBuild assembly if it's not loaded yet. 5 | Add-Type -AssemblyName 'Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' 6 | 7 | # Grab the loaded MSBuild project for the project 8 | $buildProject = [Microsoft.Build.Evaluation.ProjectCollection]::GlobalProjectCollection.GetLoadedProjects($project.FullName) | Select-Object -First 1 9 | 10 | $embedderPathProperty = $buildProject.GetProperty("EmbedderPath") 11 | 12 | # Dont do a null check since is seems evaluating the value causes powershit to have a conniption 13 | try 14 | { 15 | $buildProject.RemoveProperty($embedderPathProperty); 16 | } 17 | catch{} 18 | 19 | $project.Save() 20 | 21 | -------------------------------------------------------------------------------- /src/Athena/packages/Resource.Embedder.1.2.2/Tools/uninstall.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | -------------------------------------------------------------------------------- /src/Athena/packages/Resource.Embedder.1.2.2/build/Resource.Embedder.targets: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | $(NCrunchOriginalSolutionDir) 7 | 8 | 9 | 10 | 11 | $(SolutionDir) 12 | 13 | 14 | 15 | 16 | $(MSBuildProjectDirectory)..\..\..\ 17 | 18 | 19 | 20 | 21 | 22 | 23 | $(KeyOriginatorFile) 24 | 25 | 26 | 27 | 28 | $(AssemblyOriginatorKeyFile) 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | $(ProjectDir)$(IntermediateOutputPath) 39 | $(SignAssembly) 40 | $(MSBuildThisFileDirectory)..\ 41 | 42 | 43 | 44 | 45 | 46 | 48 | 49 | 50 | 51 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /src/Athena/packages/repositories.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /thirdpartylicenses/License - GenericParsing by Andrew Rissing.txt: -------------------------------------------------------------------------------- 1 | https://github.com/AndrewRissing/GenericParsing 2 | -------------------------------------------------------------------------------- /thirdpartylicenses/License - Icons8.txt: -------------------------------------------------------------------------------- 1 | Icons used in the program from Icons8 2 | 3 | https://icons8.com/ 4 | 5 | https://icons8.com/license -------------------------------------------------------------------------------- /thirdpartylicenses/License - Microsoft Automatic Graph Layout.txt: -------------------------------------------------------------------------------- 1 | Microsoft Automatic Graph Layout 2 | https://github.com/Microsoft/automatic-graph-layout 3 | 4 | Copyright (c) Microsoft Corporation 5 | 6 | All rights reserved. 7 | 8 | MIT License 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining 11 | a copy of this software and associated documentation files (the 12 | ""Software""), to deal in the Software without restriction, including 13 | without limitation the rights to use, copy, modify, merge, publish, 14 | distribute, sublicense, and/or sell copies of the Software, and to 15 | permit persons to whom the Software is furnished to do so, subject to 16 | the following conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 23 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 25 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 26 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 27 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /thirdpartylicenses/License - Newtonsoft.Json.txt: -------------------------------------------------------------------------------- 1 | Newtonsoft.Json 2 | 3 | The MIT License (MIT) 4 | 5 | Copyright (c) 2007 James Newton-King 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 8 | 9 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 10 | 11 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------------------------------------------------------------------------