Notice: This post does not endorse piracy. It's purpose is merely educational. Decompiling and cracking software is illegal in most cases.

OS X native software is written in Objective-C, a superset of C which is not very hard to hack away. In this post I will try to demonstrate the basics of reverse engineering in said platform.

The goal

Sublime Pop Up

Our goal will be to stop the annoying Sublime Text pop-up from reminding you to buy a license each now and then (but you totally should if you are going to use it). I will be using Sublime Text latest build

Read More

Logging Cowrie logs to the ELK stack

dashboard

This entry will cover the basics of setting up the Cowrie SSH honeypot and Filebeat to export Cowrie's logs to Elasticsearch, so we can use Kibana to visualize them in charts.

Goal

We will have 2 servers with private networking between them. One will host the ELK stack and the other one Cowrie + Filebeat.

The ELK server will receive and store the logs in ElasticSearch, so we can easily search and visualize them using Kibana, the ElasticSearch front-end.

The honeypot will just give it service and ship logs to the ELK server.

Prerequisites

  • A working ELK installation. Which you can

Read More

If you want to have a look of what's been downloaded in my honeypot over these months you can now.
In this period of time over 15.000 files have been downloaded, the majority of them being empty files due to bad redirects or malware servers being down. After cleaning up the empty files I'm left with 215, which are available for download here.
The site is password protected but if you want in you can contact me using the contact form found in my landing page or drop a comment below.

I am not responsible for whatever you may

Read More

The Ruby on Rails framework provides a pretty good built-in filter for SQL injection if you use ActiveRecord methods such as find or find_by.
But that does not mean you can carelessly throw parameters to an ActiveRecord method as the methods that take an SQL fragment are still vulnerable to SQLi by default.

For example, I came across these lines in a production environment:

def some_controller_method
  MyModel.all.order("#{sort_column} #{sort_direction}")
end

private

def sort_column
  params[:sort] ? params[:sort] : 'created_at'
end

As you can see the sort parameter is being interpolated

Read More

Ruby has 3 methods for testing equality: ==, eql? and equal? that are implemented on the Object class. You would think that they are just aliases for doing the same as in Ruby and the Ruby on Rails framework method aliases are common. So, are they?

Checking the doc for Ruby's Object class throws this:

obj == other → true or false

equal?(other) → true or false

eql?(other) → true or false

Equality — At the Object level, == returns true only if obj and other are the same object. Typically, this method is overridden in descendant classes to provide class-specific meaning.

Unlike ==, the equal?

Read More