click to edit master title style - sans.org · click to edit master title style 42 yara “yara is...

52
1 By: Wyatt Roersma

Upload: others

Post on 18-Sep-2019

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Click to edit Master title style - sans.org · Click to edit Master title style 42 Yara “YARA is a tool aimed at (but not limited to) helping malware researchers to identify and

Click to edit Master title style

�1By: Wyatt Roersma

Page 2: Click to edit Master title style - sans.org · Click to edit Master title style 42 Yara “YARA is a tool aimed at (but not limited to) helping malware researchers to identify and

Click to edit Master title style

�2By: Wyatt Roersma

Page 3: Click to edit Master title style - sans.org · Click to edit Master title style 42 Yara “YARA is a tool aimed at (but not limited to) helping malware researchers to identify and

Click to edit Master title style

�3

Who Am I?Wyatt Roersma

@WyattRoersma github.com/wroersma

wyattroersma.com twitch.tv/vtriple

aucr.io

Page 4: Click to edit Master title style - sans.org · Click to edit Master title style 42 Yara “YARA is a tool aimed at (but not limited to) helping malware researchers to identify and

Click to edit Master title style

�4By: Wyatt Roersma

Page 5: Click to edit Master title style - sans.org · Click to edit Master title style 42 Yara “YARA is a tool aimed at (but not limited to) helping malware researchers to identify and

Click to edit Master title style

�5

Who Am I?Open Source Projects Volatility Cuckoo mmbot aucr

Page 6: Click to edit Master title style - sans.org · Click to edit Master title style 42 Yara “YARA is a tool aimed at (but not limited to) helping malware researchers to identify and

Click to edit Master title style

�6By: Wyatt Roersma

Page 7: Click to edit Master title style - sans.org · Click to edit Master title style 42 Yara “YARA is a tool aimed at (but not limited to) helping malware researchers to identify and

Click to edit Master title style

�7

Outline•Why? •What is AUCR? •Who would use AUCR? •Architecture •Plugins •Main •Auth •Error

3

•Horatio(Case mgmt) •Yara_Plugin • IDS_Plugin •Unum •Cuckoo •mmbot •Summary

Page 8: Click to edit Master title style - sans.org · Click to edit Master title style 42 Yara “YARA is a tool aimed at (but not limited to) helping malware researchers to identify and

Click to edit Master title style

�8By: Wyatt Roersma

Page 9: Click to edit Master title style - sans.org · Click to edit Master title style 42 Yara “YARA is a tool aimed at (but not limited to) helping malware researchers to identify and

Click to edit Master title style

�9

Why?•OS Security software and security •Portal hell •Personal Use Case(CTF’s) •AWS/GCP/Azure like platform for analysts

7

Page 10: Click to edit Master title style - sans.org · Click to edit Master title style 42 Yara “YARA is a tool aimed at (but not limited to) helping malware researchers to identify and

Click to edit Master title style

�105

Page 11: Click to edit Master title style - sans.org · Click to edit Master title style 42 Yara “YARA is a tool aimed at (but not limited to) helping malware researchers to identify and

Click to edit Master title style

�115

Page 12: Click to edit Master title style - sans.org · Click to edit Master title style 42 Yara “YARA is a tool aimed at (but not limited to) helping malware researchers to identify and

Click to edit Master title style

�126

Page 13: Click to edit Master title style - sans.org · Click to edit Master title style 42 Yara “YARA is a tool aimed at (but not limited to) helping malware researchers to identify and

Click to edit Master title style

�135

Page 14: Click to edit Master title style - sans.org · Click to edit Master title style 42 Yara “YARA is a tool aimed at (but not limited to) helping malware researchers to identify and

Click to edit Master title style

�145

Page 15: Click to edit Master title style - sans.org · Click to edit Master title style 42 Yara “YARA is a tool aimed at (but not limited to) helping malware researchers to identify and

Click to edit Master title style

�15

Page 16: Click to edit Master title style - sans.org · Click to edit Master title style 42 Yara “YARA is a tool aimed at (but not limited to) helping malware researchers to identify and

Click to edit Master title style

�16

Page 17: Click to edit Master title style - sans.org · Click to edit Master title style 42 Yara “YARA is a tool aimed at (but not limited to) helping malware researchers to identify and

Click to edit Master title style

�17

Page 18: Click to edit Master title style - sans.org · Click to edit Master title style 42 Yara “YARA is a tool aimed at (but not limited to) helping malware researchers to identify and

Click to edit Master title style

�18

• https://testing.googleblog.com/2014/07/measuring-coverage-at-google.html

C++ Java Go JavaScript Python

56.6% 61.2% 63.0% 76.9% 84.2%

Code Coverage

Page 19: Click to edit Master title style - sans.org · Click to edit Master title style 42 Yara “YARA is a tool aimed at (but not limited to) helping malware researchers to identify and

Click to edit Master title style

�19

• https://testing.googleblog.com/2014/07/measuring-coverage-at-google.html

Page 20: Click to edit Master title style - sans.org · Click to edit Master title style 42 Yara “YARA is a tool aimed at (but not limited to) helping malware researchers to identify and

Click to edit Master title style

�20

Why?•OS Security software and security •Portal hell •Personal Use Case(CTF’s) •AWS/GCP/Azure like platform for analysts

7

Page 21: Click to edit Master title style - sans.org · Click to edit Master title style 42 Yara “YARA is a tool aimed at (but not limited to) helping malware researchers to identify and

Click to edit Master title style

�217

Page 22: Click to edit Master title style - sans.org · Click to edit Master title style 42 Yara “YARA is a tool aimed at (but not limited to) helping malware researchers to identify and

Click to edit Master title style

�22

Why?•OS Security software and security •Portal hell •Personal Use Case(CTF’s) •AWS/GCP/Azure like platform for analysts

7

Page 23: Click to edit Master title style - sans.org · Click to edit Master title style 42 Yara “YARA is a tool aimed at (but not limited to) helping malware researchers to identify and

Click to edit Master title style

�23

What is AUCR?

9

•A Micro Service Web Framework •Python 3 •Flask •Modern Design •Object Storage •Message Queue

•Modular •https://github.com/aucr/aucr

Page 24: Click to edit Master title style - sans.org · Click to edit Master title style 42 Yara “YARA is a tool aimed at (but not limited to) helping malware researchers to identify and

Click to edit Master title style

�248

Page 25: Click to edit Master title style - sans.org · Click to edit Master title style 42 Yara “YARA is a tool aimed at (but not limited to) helping malware researchers to identify and

Click to edit Master title style

�259

Page 26: Click to edit Master title style - sans.org · Click to edit Master title style 42 Yara “YARA is a tool aimed at (but not limited to) helping malware researchers to identify and

Click to edit Master title style

�26

Feature’s•User/Group Permissions •API Oauth token management •2fa •Password reset via email link •Navbar rendering •Current Auth support •LDAP •Local Database

10

Page 27: Click to edit Master title style - sans.org · Click to edit Master title style 42 Yara “YARA is a tool aimed at (but not limited to) helping malware researchers to identify and

Click to edit Master title style

�27

Feature’s Continued•Database Support •Mysql •Sqllite •Postgres •ElasticSearch(Full Text Search)

•Message Pipeline •Auto Plugin Loading •Multi-Language Support

11

Page 28: Click to edit Master title style - sans.org · Click to edit Master title style 42 Yara “YARA is a tool aimed at (but not limited to) helping malware researchers to identify and

Click to edit Master title style

�28

Feature’s Continued

11

•Registration Email Whitelisting •Error Notification Reporting •MDL CSS •Kubernetes •Privacy Policy Rendering •Mobile Page Rendering

Page 29: Click to edit Master title style - sans.org · Click to edit Master title style 42 Yara “YARA is a tool aimed at (but not limited to) helping malware researchers to identify and

Click to edit Master title style

�2912

Page 30: Click to edit Master title style - sans.org · Click to edit Master title style 42 Yara “YARA is a tool aimed at (but not limited to) helping malware researchers to identify and

Click to edit Master title style

�3012

Page 31: Click to edit Master title style - sans.org · Click to edit Master title style 42 Yara “YARA is a tool aimed at (but not limited to) helping malware researchers to identify and

Click to edit Master title style

�31

Current Plugin Features•Message Queue Pipeline •Yaml config files

•Navbar rendering based on Groups •Auto Import •Optional ES Indexing •API handling •Page Templates

13

Page 32: Click to edit Master title style - sans.org · Click to edit Master title style 42 Yara “YARA is a tool aimed at (but not limited to) helping malware researchers to identify and

Click to edit Master title style

�32

UNUM•File Management •https://github.com/AUCR/unum •File Upload/Download •Group Permission Based •API

13

Page 33: Click to edit Master title style - sans.org · Click to edit Master title style 42 Yara “YARA is a tool aimed at (but not limited to) helping malware researchers to identify and

Click to edit Master title style

�33

ES Indexing

13

class UNUM(SearchableMixin, PaginatedAPIMixin, db.Model): """Upload File data default table for aucr."""

__searchable__ = ['id', 'description', 'classification', 'created_by', 'md5_hash', ‘file_name', 'created_time_stamp'] __tablename__ = 'unum' id = db.Column(db.Integer, primary_key=True) description = db.Column(db.String(256), index=True) created_time_stamp = db.Column(db.DateTime, index=True, default=udatetime.utcnow) modify_time_stamp = db.Column(db.DateTime, index=True, default=udatetime.utcnow) classification = db.Column(db.Integer, db.ForeignKey('classification.id')) file_name = db.Column(db.String(512)) created_by = db.Column(db.Integer, db.ForeignKey('user.id')) group_access = db.Column(db.Integer, db.ForeignKey('groups.id')) md5_hash = db.Column(db.String(128), db.ForeignKey('uploaded_file_table.md5_hash'))

def __repr__(self): return '<unum {}>'.format(self.md5_hash)

Page 34: Click to edit Master title style - sans.org · Click to edit Master title style 42 Yara “YARA is a tool aimed at (but not limited to) helping malware researchers to identify and

Click to edit Master title style

�34

main: user: [ link : [ page: 'auth.users', icon: 'face', title: 'People' ] ] admin: [ link: [ page: 'auth.groups', icon: 'group', title: 'Groups' ] ]

13

Page 35: Click to edit Master title style - sans.org · Click to edit Master title style 42 Yara “YARA is a tool aimed at (but not limited to) helping malware researchers to identify and

Click to edit Master title style

�35

mmbot MQ example

reports: files: ["mmbot"]

Page 36: Click to edit Master title style - sans.org · Click to edit Master title style 42 Yara “YARA is a tool aimed at (but not limited to) helping malware researchers to identify and

Click to edit Master title style

�3611

Page 37: Click to edit Master title style - sans.org · Click to edit Master title style 42 Yara “YARA is a tool aimed at (but not limited to) helping malware researchers to identify and

Click to edit Master title style

�37

Page 38: Click to edit Master title style - sans.org · Click to edit Master title style 42 Yara “YARA is a tool aimed at (but not limited to) helping malware researchers to identify and

Click to edit Master title style

�3811

Page 39: Click to edit Master title style - sans.org · Click to edit Master title style 42 Yara “YARA is a tool aimed at (but not limited to) helping malware researchers to identify and

Click to edit Master title style

�3911

Page 40: Click to edit Master title style - sans.org · Click to edit Master title style 42 Yara “YARA is a tool aimed at (but not limited to) helping malware researchers to identify and

Click to edit Master title style

�4011

import ujsonimport requestsAPI_URL = 'http://0.0.0.0:5000'API_KEY = 'CRyPP50DBJUlMCxNrcNmGAv8i3cZkQU+799KmojUdtBpKVpml3DBZRy4ql=='file_name = “some_mal_file"headers = {'Authorization': 'Bearer ' + API_KEY}with open(file_name, 'rb') as file_object: file_data = file_object.read()payload = {'filename': str(file_name), 'group_access': 2, 'description': "bad", 'classification': 1}response = requests.post('{}/api/unum_file_upload/'.format( API_URL), headers=headers, data=file_data, params=payload)test = ujson.loads(response.text)print(ujson.dumps(test, indent=4, sort_keys=True))

Unum API example

Page 41: Click to edit Master title style - sans.org · Click to edit Master title style 42 Yara “YARA is a tool aimed at (but not limited to) helping malware researchers to identify and

Click to edit Master title style

�4111

{ "file_id": 22, “md5”: "12e8f6658618e9169958802fa261ef42" }

JSON Results

Page 42: Click to edit Master title style - sans.org · Click to edit Master title style 42 Yara “YARA is a tool aimed at (but not limited to) helping malware researchers to identify and

Click to edit Master title style

�42

Yara“YARA is a tool aimed at (but not limited to) helping malware researchers to identify and classify malware samples. With YARA you can create descriptions of malware families (or whatever you want to describe) based on textual or binary patterns. Each description, a.k.a rule, consists of a set of strings and a boolean expression which determine its logic. “

https://virustotal.github.io/yara/

13

Page 43: Click to edit Master title style - sans.org · Click to edit Master title style 42 Yara “YARA is a tool aimed at (but not limited to) helping malware researchers to identify and

Click to edit Master title style

�43

Yara Plugin•Yara Rule Management •https://github.com/AUCR/yara_plugin •API push/pull rules/results •Cuckoo report usage • https://virustotal.github.io/yara/

13

Page 44: Click to edit Master title style - sans.org · Click to edit Master title style 42 Yara “YARA is a tool aimed at (but not limited to) helping malware researchers to identify and

Click to edit Master title style

�4411

Page 45: Click to edit Master title style - sans.org · Click to edit Master title style 42 Yara “YARA is a tool aimed at (but not limited to) helping malware researchers to identify and

Click to edit Master title style

�4511

Page 46: Click to edit Master title style - sans.org · Click to edit Master title style 42 Yara “YARA is a tool aimed at (but not limited to) helping malware researchers to identify and

Click to edit Master title style

�46

Cuckoo Plugin•Cuckoo Processing Management •https://github.com/AUCR/cuckoo_plugin •Cuckoo report UI •Python3 + ES 7.0.2 Support •Docker-Cuckoo coming soon!

13

Page 47: Click to edit Master title style - sans.org · Click to edit Master title style 42 Yara “YARA is a tool aimed at (but not limited to) helping malware researchers to identify and

Click to edit Master title style

�4711

Page 48: Click to edit Master title style - sans.org · Click to edit Master title style 42 Yara “YARA is a tool aimed at (but not limited to) helping malware researchers to identify and

Click to edit Master title style

�48

Page 49: Click to edit Master title style - sans.org · Click to edit Master title style 42 Yara “YARA is a tool aimed at (but not limited to) helping malware researchers to identify and

Click to edit Master title style

�49By: Wyatt Roersma

Page 50: Click to edit Master title style - sans.org · Click to edit Master title style 42 Yara “YARA is a tool aimed at (but not limited to) helping malware researchers to identify and

Click to edit Master title style

�50

Moving Forward•SAML Auth • IAM •MD CSS plugin && MDL CSS plugin •Vault Support •UI Improvements •Respectable code coverage >= 90% •BigQuery

Page 51: Click to edit Master title style - sans.org · Click to edit Master title style 42 Yara “YARA is a tool aimed at (but not limited to) helping malware researchers to identify and

Click to edit Master title style

�51By: Wyatt Roersma

Page 52: Click to edit Master title style - sans.org · Click to edit Master title style 42 Yara “YARA is a tool aimed at (but not limited to) helping malware researchers to identify and

Click to edit Master title style

�52

Conclusion•Online DFIR CTF Friday June 7th $500 - BrrCON •AUCR for next project? •Beta @ https://aucr.io •Dev - https://www.youtube.com/watch?v=5Qr3jy7N3Ig