Skip to content

Commit 71741b4

Browse files
authoredJul 22, 2020
Merge pull request #6 from swimlane/version_2_branch
Version 2 branch
2 parents 6fa0b51 + c4a6038 commit 71741b4

File tree

104 files changed

+6315
-3016
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+6315
-3016
lines changed
 

‎.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ __pycache__/
33
*.py[cod]
44
*$py.class
55

6+
.DS_Store
67
# C extensions
78
*.so
89

‎README.md

+68-68
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,37 @@ soc-faker is used to generate fake data for use by Security Operation Centers, I
88

99
At the time of writing this document, `soc-faker` has the ability to fake data for the following main categories. You can find specific details for each category by selecting the links below:
1010

11+
* [Agent](docs/source/faker/agent.md)
1112
* [Alert](docs/source/faker/alert.md)
12-
* [Computer](docs/source/faker/computer.md)
1313
* [Application](docs/source/faker/application.md)
14+
* [Cloud](docs/source/faker/cloud.md)
15+
* [Computer](docs/source/faker/computer.md)
16+
* [Container](docs/source/faker/container.md)
17+
* [DNS](docs/source/faker/dns.md)
1418
* [Employee](docs/source/faker/employee.md)
1519
* [File](docs/source/faker/file.md)
20+
* [HTTP](docs/source/faker/http.md)
21+
* [Location](docs/source/faker/location.md)
1622
* [Logs](docs/source/faker/logs.md)
23+
* [SysMon](docs/source/faker/sysmon.md)
24+
* [Windows Event Logs](docs/source/faker/eventlog.md)
1725
* [Network](docs/source/faker/network.md)
26+
* [Operating System](docs/source/faker/operating_system.md)
1827
* [Organization](docs/source/faker/organization.md)
28+
* [PCAP](docs/source/faker/pcap.md)
29+
* [Process](docs/source/faker/process.md)
1930
* Products
2031
* [Azure](docs/source/faker/azure.md)
2132
* [Elastic](docs/source/faker/elastic.md)
2233
* [QualysGuard](docs/source/faker/qualysguard.md)
2334
* [ServiceNow](docs/source/faker/servicenow.md)
24-
* [User Agent](docs/source/faker/useragent.md)
25-
* [Vulnerability](docs/source/faker/vulnerability)
2635
* [Registry](docs/source/faker/registry.md)
2736
* [Timestamp](docs/source/faker/timestamp.md)
37+
* [TLS](docs/source/faker/tls.md)
38+
* [User Agent](docs/source/faker/useragent.md)
39+
* [Vulnerability](docs/source/faker/vulnerability)
40+
* [Words](docs/source/faker/words.md)
41+
2842

2943
### Installing soc-faker
3044

@@ -35,7 +49,7 @@ pip install soc-faker --user
3549
### Installing from source
3650

3751
```bash
38-
git clone git@github.com:swimlane/soc-faker.git
52+
git clone https://github.com/swimlane/soc-faker.git
3953
cd soc-faker
4054
python setup.py install
4155
```
@@ -45,31 +59,66 @@ python setup.py install
4559
The following libraries are required and installed by soc-faker
4660

4761
```
48-
requests
49-
pendulum
50-
ipaddress
51-
Pillow
52-
networkx
53-
matplotlib
54-
PyGithub
55-
PyYAML
56-
Faker
62+
requests==2.23.0
63+
pendulum==1.2.5
64+
ipaddress==1.0.23
65+
networkx==2.4
66+
matplotlib==3.3.0rc1
67+
Faker==4.1.1
68+
bs4==0.0.1
69+
lxml==4.5.1
70+
xmltodict==0.12.0
71+
netaddr==0.7.20
72+
fire==0.3.1
5773
```
5874

59-
### GitHub PAT
75+
## Usage
6076

61-
In addition, you must provide a GitHub Personal Access Token to utilize specific features that rely on data from public github repositories.
77+
`soc-faker` is a Python package that can be imported or be used via the command line utility to generate fake data related to security tools, products, and general data related to security.
6278

63-
Please follow this guide to get a personal access token [https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line)
79+
### Importing soc-faker
6480

65-
Once you have a PAT you can provide this token during initialization of the the `SocFaker` object:
81+
After you have installed `soc-faker` from source or using `pip` you can import and instantiate it by doing the following:
6682

67-
```
83+
```python
6884
from socfaker import SocFaker
6985

70-
sf = SocFaker(github_token='YOUR PERSONAL ACCESS TOKEN')
86+
sc = SocFaker()
87+
```
88+
89+
Once you have instantiated an instance of `soc-faker` you can then access any of the [different properties and methods](docs/source/index.md) avaialble based on your needs. If you would like to see soc-faker in action, then please see the [bin/test.py](bin/test.py) script in the repository under the `bin` folder for an example of all avaialble properties and methods.
90+
91+
Additionally, please read the [documentation](docs/source/index.md) for more details about each avaialble property and method.
92+
93+
### Command-Line Usage
94+
95+
When `soc-faker` is installed, it automatically creates a command-line utility for your use. This utility can be accessed by simply typing `soc-faker` in your shell of choice.
96+
97+
To see `soc-faker` help type:
98+
99+
```bash
100+
soc-faker
101+
# or
102+
soc-faker --help
103+
```
104+
105+
You can access each property just like you can from the library, the only difference is you replace a `.` between properties with a space. For example, if you wanted to get some randomly generated `hashes` quickly you can run:
106+
107+
```bash
108+
soc-faker file hashes
109+
```
110+
111+
This will return the following to your shell:
112+
113+
114+
```output
115+
md5: aa3150ac34ee6a5911e61ab6a5052a6d
116+
sha1: de5c15f64d979ed84bac340c334a63d94401059d
117+
sha256: 118a9f9de8f3dd6471ef113959485ecbaf66368dea16758eab4e22da182d0e9f
71118
```
72119

120+
If you run into any issues, just type what you think is correct and the built-in help will guide you through all available groups, commands, etc. for each data point within `soc-faker`.
121+
73122
### Development
74123

75124
You can use the provided [Dockerfile](Dockerfile) to get a development and testing environment up and running for `soc-faker`.
@@ -129,52 +178,3 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE.md) f
129178
## Acknowledgments
130179

131180
* This project utilizes data from the OSSEM project by [hunters-forge](https://github.com/hunters-forge/OSSEM)
132-
133-
```eval_rst
134-
.. toctree::
135-
:maxdepth: 2
136-
:caption: Contents:
137-
138-
docs/source/faker/application
139-
docs/source/faker/azure
140-
docs/source/faker/computer
141-
docs/source/faker/elastic
142-
docs/source/faker/employee
143-
docs/source/faker/file
144-
docs/source/faker/logs
145-
docs/source/faker/network
146-
docs/source/faker/organization
147-
docs/source/faker/qualysguard
148-
docs/source/faker/servicenow
149-
docs/source/faker/useragent
150-
docs/source/faker/vulnerability
151-
```
152-
153-
154-
## TODO
155-
156-
### Employee
157-
158-
- [ ] Manager (Employee Object)
159-
160-
### Date
161-
- [ ] Date Between
162-
- [ ] Date X periods back (date after 1/1/2018)
163-
- [ ] Date X per. Forward (date after 1/1/2018)
164-
- [ ] Duration/Span
165-
166-
### Address
167-
- [ ] Physical Address?
168-
169-
### Network
170-
- [ ] URL
171-
172-
173-
### File Info
174-
- [ ] fuzzy?
175-
- [ ] File Path
176-
- [ ] File Reputation?
177-
178-
### PCAP
179-
180-
- [ ] Generate Fake PCAP files

0 commit comments

Comments
 (0)
Please sign in to comment.