Skip to content

Instantly share code, notes, and snippets.

@RolphH
Created February 16, 2021 16:28
Show Gist options
  • Save RolphH/1235bf6ef246207c740b70d5c4d53666 to your computer and use it in GitHub Desktop.
Save RolphH/1235bf6ef246207c740b70d5c4d53666 to your computer and use it in GitHub Desktop.
Additional logstash config for T-Pot Logstash service
if [type] == "ConPot" and [dest_port] and [event_type] == "NEW_CONNECTION" and [src_ip] != "${MY_INTIP}" {
http {
url => "http://${HTTP_LOGIP}"
http_method => "post"
mapping => {
"type" => "%{type}"
"protocol" => "Elastic"
"source" => "%{src_ip}"
"dest_port" => "%{dest_port}"
"geoip" => "%{geoip}"
}
}
}
if [type] == "Ciscoasa" and [src_ip] != "${MY_INTIP}" {
http {
url => "http://${HTTP_LOGIP}"
http_method => "post"
mapping => {
"type" => "%{type}"
"protocol" => "Ciscoasa"
"source" => "%{src_ip}"
"geoip" => "%{geoip}"
}
}
}
if [type] == "Mailoney" and [dest_port] and [src_ip] != "${MY_INTIP}" {
http {
url => "http://${HTTP_LOGIP}"
http_method => "post"
mapping => {
"type" => "%{type}"
"protocol" => "Mail"
"source" => "%{src_ip}"
"dest_port" => "%{dest_port}"
"geoip" => "%{geoip}"
}
}
}
if [type] == "ElasticPot" and [dest_port] and [src_ip] != "${MY_INTIP}" {
http {
url => "http://${HTTP_LOGIP}"
http_method => "post"
mapping => {
"type" => "%{type}"
"protocol" => "Elastic"
"source" => "%{src_ip}"
"dest_port" => "%{dest_port}"
"geoip" => "%{geoip}"
}
}
}
if [type] == "Adbhoney" and [dest_port] and [src_ip] != "${MY_INTIP}" {
http {
url => "http://${HTTP_LOGIP}"
http_method => "post"
mapping => {
"type" => "%{type}"
"protocol" => "ADB"
"source" => "%{src_ip}"
"dest_port" => "%{dest_port}"
"geoip" => "%{geoip}"
}
}
}
if [type] == "Dionaea" and [dest_port] and [src_ip] != "${MY_INTIP}" {
http {
url => "http://${HTTP_LOGIP}"
http_method => "post"
mapping => {
"type" => "%{type}"
"protocol" => "%{[connection][transport]}"
"service" => "%{[connection][protocol]}"
"source" => "%{src_ip}"
"dest_port" => "%{dest_port}"
"geoip" => "%{geoip}"
}
}
}
if [type] == "Fatt" and [protocol] != "ssh" and [src_ip] != "${MY_INTIP}" {
http {
url => "http://${HTTP_LOGIP}"
http_method => "post"
mapping => {
"type" => "%{type}"
"protocol" => "%{protocol}"
"source" => "%{src_ip}"
"dest_port" => "%{dest_port}"
"geoip" => "%{geoip}"
}
}
}
if [type] == "Cowrie" and [dest_port] and [protocol] and [src_ip] != "${MY_INTIP}" {
http {
url => "http://${HTTP_LOGIP}"
http_method => "post"
mapping => {
"type" => "%{type}"
"protocol" => "%{protocol}"
"source" => "%{src_ip}"
"dest_port" => "%{dest_port}"
"geoip" => "%{geoip}"
}
}
}
if [type] == "HoneyTrap" and [dest_port] and [src_ip] != "${MY_INTIP}" {
http {
url => "http://${HTTP_LOGIP}"
http_method => "post"
mapping => {
"type" => "%{type}"
"protocol" => "%{[attack_connection][protocol]}"
"source" => "%{src_ip}"
"dest_port" => "%{dest_port}"
"geoip" => "%{geoip}"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment