Skip to content

Instantly share code, notes, and snippets.

@philipz
Forked from regit/ssh-analysis-kibana
Last active August 29, 2015 14:15
Show Gist options
  • Save philipz/16f7c3d7f670990b4e9c to your computer and use it in GitHub Desktop.
Save philipz/16f7c3d7f670990b4e9c to your computer and use it in GitHub Desktop.
{
"title": "SSH analysis",
"services": {
"query": {
"list": {
"0": {
"query": "message:\"Invalid user\" AND sshd",
"alias": "Failed login",
"color": "#BF1B00",
"id": 0,
"pin": true,
"type": "lucene",
"enable": true
},
"1": {
"id": 1,
"color": "#7EB26D",
"alias": "Successful login",
"pin": true,
"type": "lucene",
"enable": true,
"query": "\"Accepted\" AND sshd"
},
"2": {
"id": 2,
"color": "#6ED0E0",
"alias": "Suricata SSH",
"pin": true,
"type": "lucene",
"enable": true,
"query": "event_type:ssh"
},
"3": {
"id": 3,
"color": "#EF843C",
"alias": "Pshitt",
"pin": true,
"type": "lucene",
"enable": true,
"query": "password:*"
},
"4": {
"id": 4,
"color": "#D683CE",
"alias": "libssh",
"pin": true,
"type": "lucene",
"enable": true,
"query": "ssh.client.software_version:libssh"
},
"5": {
"id": 5,
"color": "#EAB839",
"alias": "libssh2",
"pin": true,
"type": "lucene",
"enable": true,
"query": "ssh.client.software_version:libssh2*"
},
"6": {
"id": 6,
"color": "#0A437C",
"alias": "Non standard clients",
"pin": true,
"type": "lucene",
"enable": true,
"query": "NOT ssh.client.software_version:libssh2* AND NOT ssh.client.software_version:libssh AND NOT sss.client.software_version:OpenSSH* AND event_type:ssh"
},
"7": {
"id": 7,
"color": "#508642",
"alias": "OpenSSH",
"pin": true,
"type": "lucene",
"enable": true,
"query": "ssh.client.software_version:OpenSSH*"
}
},
"ids": [
0,
1,
2,
3,
4,
5,
6,
7
]
},
"filter": {
"list": {
"0": {
"type": "time",
"field": "@timestamp",
"from": "now-24h",
"to": "now",
"mandate": "must",
"active": true,
"alias": "",
"id": 0
}
},
"ids": [
0
]
}
},
"rows": [
{
"title": "Time Filter",
"height": "100px",
"editable": true,
"collapse": false,
"collapsable": true,
"panels": [
{
"span": 12,
"editable": true,
"type": "histogram",
"loadingEditor": false,
"mode": "count",
"time_field": "@timestamp",
"value_field": null,
"x-axis": true,
"y-axis": true,
"scale": 1,
"y_format": "none",
"grid": {
"max": null,
"min": 0
},
"queries": {
"mode": "selected",
"ids": [
0,
1,
2,
3,
7
]
},
"annotate": {
"enable": false,
"query": "*",
"size": 20,
"field": "_type",
"sort": [
"_score",
"desc"
]
},
"auto_int": true,
"resolution": 100,
"interval": "10m",
"intervals": [
"auto",
"1s",
"1m",
"5m",
"10m",
"30m",
"1h",
"3h",
"12h",
"1d",
"1w",
"1y"
],
"lines": true,
"fill": 4,
"linewidth": 1,
"points": false,
"pointradius": 5,
"bars": false,
"stack": false,
"spyable": true,
"zoomlinks": true,
"options": true,
"legend": true,
"show_query": true,
"interactive": true,
"legend_counts": true,
"timezone": "browser",
"percentage": false,
"zerofill": true,
"derivative": false,
"tooltip": {
"value_type": "cumulative",
"query_as_alias": true
},
"title": "Timeline"
}
],
"notice": false
},
{
"title": "Stats",
"height": "200px",
"editable": true,
"collapse": false,
"collapsable": true,
"panels": [
{
"error": false,
"span": 4,
"editable": true,
"type": "terms",
"loadingEditor": false,
"field": "src_ip",
"exclude": [],
"missing": false,
"other": true,
"size": 10,
"order": "count",
"style": {
"font-size": "10pt"
},
"donut": false,
"tilt": false,
"labels": true,
"arrangement": "horizontal",
"chart": "bar",
"counter_pos": "above",
"spyable": true,
"queries": {
"mode": "selected",
"ids": [
0,
3
]
},
"tmode": "terms",
"tstat": "total",
"valuefield": "",
"title": "Offenders"
},
{
"error": false,
"span": 4,
"editable": true,
"type": "map",
"loadingEditor": false,
"map": "world",
"colors": [
"#A0E2E2",
"#265656"
],
"size": 100,
"exclude": [],
"spyable": true,
"queries": {
"mode": "selected",
"ids": [
0,
3
]
},
"field": "geoip.country_code2",
"title": "SSH Failures Country"
},
{
"error": false,
"span": 4,
"editable": true,
"type": "map",
"loadingEditor": false,
"map": "world",
"colors": [
"#A0E2E2",
"#265656"
],
"size": 100,
"exclude": [],
"spyable": true,
"queries": {
"mode": "selected",
"ids": [
1
]
},
"title": "SSH Login",
"field": "geoip.country_code2"
}
],
"notice": false
},
{
"title": "Graph",
"height": "250px",
"editable": true,
"collapse": false,
"collapsable": true,
"panels": [
{
"error": false,
"span": 2,
"editable": true,
"type": "terms",
"loadingEditor": false,
"field": "username",
"exclude": [],
"missing": false,
"other": true,
"size": 10,
"order": "count",
"style": {
"font-size": "10pt"
},
"donut": false,
"tilt": false,
"labels": true,
"arrangement": "horizontal",
"chart": "table",
"counter_pos": "above",
"spyable": true,
"queries": {
"mode": "selected",
"ids": [
1
]
},
"title": "SSH Username",
"tmode": "terms",
"tstat": "total",
"valuefield": ""
},
{
"error": false,
"span": 2,
"editable": true,
"type": "terms",
"loadingEditor": false,
"field": "username.raw",
"exclude": [],
"missing": false,
"other": true,
"size": 10,
"order": "count",
"style": {
"font-size": "10pt"
},
"donut": false,
"tilt": false,
"labels": true,
"arrangement": "horizontal",
"chart": "table",
"counter_pos": "above",
"spyable": true,
"queries": {
"mode": "selected",
"ids": [
0,
3
]
},
"title": "Bruteforce Username",
"tmode": "terms",
"tstat": "total",
"valuefield": ""
},
{
"span": 3,
"editable": true,
"type": "histogram",
"loadingEditor": false,
"mode": "count",
"time_field": "@timestamp",
"value_field": null,
"x-axis": true,
"y-axis": true,
"scale": 1,
"y_format": "none",
"grid": {
"max": null,
"min": 0
},
"queries": {
"mode": "selected",
"ids": [
0
]
},
"annotate": {
"enable": false,
"query": "*",
"size": 20,
"field": "_type",
"sort": [
"_score",
"desc"
]
},
"auto_int": true,
"resolution": 100,
"interval": "10m",
"intervals": [
"auto",
"1s",
"1m",
"5m",
"10m",
"30m",
"1h",
"3h",
"12h",
"1d",
"1w",
"1y"
],
"lines": false,
"fill": 0,
"linewidth": 3,
"points": false,
"pointradius": 5,
"bars": true,
"stack": true,
"spyable": true,
"zoomlinks": true,
"options": true,
"legend": true,
"show_query": true,
"interactive": true,
"legend_counts": true,
"timezone": "browser",
"percentage": false,
"zerofill": true,
"derivative": false,
"tooltip": {
"value_type": "cumulative",
"query_as_alias": true
},
"title": "Users"
},
{
"error": false,
"span": 4,
"editable": true,
"type": "bettermap",
"loadingEditor": false,
"field": "geoip.coordinates",
"size": 1000,
"spyable": true,
"tooltip": "_id",
"queries": {
"mode": "selected",
"ids": [
0,
2,
3
]
},
"title": "Attempts Localisation"
}
],
"notice": false
},
{
"title": "Suricata Analysis",
"height": "300px",
"editable": true,
"collapse": false,
"collapsable": true,
"panels": [
{
"error": false,
"span": 2,
"editable": true,
"type": "terms",
"loadingEditor": false,
"field": "password.raw",
"exclude": [],
"missing": false,
"other": true,
"size": 10,
"order": "count",
"style": {
"font-size": "10pt"
},
"donut": false,
"tilt": false,
"labels": true,
"arrangement": "horizontal",
"chart": "table",
"counter_pos": "above",
"spyable": true,
"queries": {
"mode": "selected",
"ids": [
3
]
},
"tmode": "terms",
"tstat": "total",
"valuefield": "",
"title": "Passwords"
},
{
"error": false,
"span": 2,
"editable": true,
"type": "terms",
"loadingEditor": false,
"field": "password",
"exclude": [],
"missing": false,
"other": true,
"size": 10,
"order": "reverse_count",
"style": {
"font-size": "10pt"
},
"donut": false,
"tilt": false,
"labels": true,
"arrangement": "horizontal",
"chart": "table",
"counter_pos": "above",
"spyable": true,
"queries": {
"mode": "selected",
"ids": [
3
]
},
"tmode": "terms",
"tstat": "total",
"valuefield": "",
"title": "Less used passwords"
},
{
"span": 4,
"editable": true,
"type": "histogram",
"loadingEditor": false,
"mode": "count",
"time_field": "@timestamp",
"value_field": null,
"x-axis": true,
"y-axis": true,
"scale": 1,
"y_format": "none",
"grid": {
"max": null,
"min": 0
},
"queries": {
"mode": "selected",
"ids": [
4,
5,
6,
7
]
},
"annotate": {
"enable": false,
"query": "*",
"size": 20,
"field": "_type",
"sort": [
"_score",
"desc"
]
},
"auto_int": true,
"resolution": 100,
"interval": "10m",
"intervals": [
"auto",
"1s",
"1m",
"5m",
"10m",
"30m",
"1h",
"3h",
"12h",
"1d",
"1w",
"1y"
],
"lines": true,
"fill": 1,
"linewidth": 1,
"points": false,
"pointradius": 5,
"bars": false,
"stack": false,
"spyable": true,
"zoomlinks": true,
"options": true,
"legend": true,
"show_query": true,
"interactive": true,
"legend_counts": true,
"timezone": "browser",
"percentage": false,
"zerofill": true,
"derivative": false,
"tooltip": {
"value_type": "cumulative",
"query_as_alias": true
},
"title": "SSH Client Timeline"
},
{
"error": false,
"span": 4,
"editable": true,
"type": "terms",
"loadingEditor": false,
"field": "ssh.client.software_version.raw",
"exclude": [],
"missing": false,
"other": true,
"size": 10,
"order": "count",
"style": {
"font-size": "10pt"
},
"donut": false,
"tilt": false,
"labels": true,
"arrangement": "horizontal",
"chart": "pie",
"counter_pos": "above",
"spyable": true,
"queries": {
"mode": "selected",
"ids": [
2
]
},
"tmode": "terms",
"tstat": "total",
"valuefield": "",
"title": "SSH Client"
}
],
"notice": false
},
{
"title": "Trends",
"height": "150px",
"editable": true,
"collapse": false,
"collapsable": true,
"panels": [
{
"error": false,
"span": 12,
"editable": true,
"group": [
"default"
],
"type": "table",
"size": 100,
"pages": 5,
"offset": 0,
"sort": [
"@timestamp",
"desc"
],
"style": {
"font-size": "9pt"
},
"overflow": "min-height",
"fields": [
"@timestamp",
"src_ip",
"username",
"password",
"ssh.client.software_version",
"geoip.city_name",
"geoip.country_name",
"src_port"
],
"highlight": [],
"sortable": true,
"header": true,
"paging": true,
"spyable": true,
"queries": {
"mode": "selected",
"ids": [
0,
1,
2,
3
]
},
"field_list": false,
"status": "Stable",
"trimFactor": 300,
"normTimes": true,
"title": "Documents",
"all_fields": false,
"localTime": false,
"timeField": "@timestamp"
}
],
"notice": false
}
],
"editable": true,
"index": {
"interval": "day",
"pattern": "[logstash-]YYYY.MM.DD",
"default": "_all",
"warm_fields": true
},
"style": "light",
"failover": false,
"panel_hints": true,
"loader": {
"save_gist": false,
"save_elasticsearch": true,
"save_local": true,
"save_default": true,
"save_temp": true,
"save_temp_ttl_enable": true,
"save_temp_ttl": "30d",
"load_gist": true,
"load_elasticsearch": true,
"load_elasticsearch_size": 20,
"load_local": true,
"hide": false
},
"pulldowns": [
{
"type": "query",
"collapse": true,
"notice": false,
"query": "*",
"pinned": true,
"history": [
"ssh.client.software_version:libssh2*",
"ssh.client.software_version:libssh-*",
"password:*",
"event_type:ssh",
"\"Accepted\" AND sshd",
"message:\"Invalid user\" AND sshd",
"\"Accepted\" AND sshd AND username:gitolite",
"\"Accepted\" AND sshd AND NOT username:gitolite",
"\"Accepted\" AND sshd AND src_ip:*",
"src_ip:* AND message:DROP"
],
"remember": 10,
"enable": true
},
{
"type": "filtering",
"collapse": true,
"notice": false,
"enable": true
}
],
"nav": [
{
"type": "timepicker",
"collapse": false,
"notice": false,
"status": "Stable",
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
],
"refresh_intervals": [
"5s",
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"1d"
],
"timefield": "@timestamp",
"enable": true,
"now": true,
"filter_id": 0
}
],
"refresh": "1m"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment