Saturday, 16 March 2013

What do the Twitter backups downloadable files look like

After about a minute from sending the request shown at the end of Feature request: Tweet backups to Git/GitHub ,  I received an email with:

Feature request: Tweet backups to Git/GitHub

Here is a feature that would help to make the most of the amazing knowledge that is daily shared on twitter.

The idea is to have tweet data stored in a git repository which would contain:
  • Tweets (all available info for each tweet, which is a LOT more than what is currently exposed on the multiple tweet client apps)
  • Followers
  • Following
  • Connects (when others reference the account)
Ideally there should be a commit for each item , but a daily commit should also work.

Loading OWASP ESAPI jar and its dependencies from C# (using jni4net)

Here is a pretty cool PoC where I was able to load an jar file and its dependencies into an 'Jni4Net created' JVM

Invoking Java BeanShell from .Net CLR

Here is a very rough PoC of how I was able to execute a JavaBean shell script from inside the O2 Platform (with the java code executed under a JVM)

Executing "return 2+2;" as a java beanshell comand (see result on the bottom right Output pane)

Invoking an OWASP AppSensor Java method from .NET C# REPL (using Jni4Net)

On the topic of AppSensor, you might find the code snippet below interesting. 

Inside an O2 Platform C# REPL editor (which is running in .Net's CLR), I was able to:

  • load the AppSensor jar in a new class loader, 
  • access/view its classes in a GUI 
  • create an instance of org.owasp.appsensor.trendmonitoring.TrendEvent 
  • execute the getTime method). 

Note that the AppSensor code is running on the Java's JVM (loaded in the same process as the .Net's CLR)

The code is still in very rough status, but it works :)

Where to have AppSec Q&A threads (what about Reddit?)

Note: I wrote this a while back but somehow was stuck on my 'Drafts' folder (but the question is still relevant in March 2013)


So it looks like StackExchange Security is not going to work for WebAppSec and OWASP (since this question is exactly the type of question we should would like to see there How to implement url encryption on .xsl page using OWASP ESAPI?  and that has been closed)) . That said, there are a couple good Q&A on the OWASP tag: http://security.stackexchange.com/questions/tagged/owasp

Friday, 15 March 2013

Putting O2 content on Google Code's wiki (just like ZAP)

I really like what Simon is doing with Zap at https://code.google.com/p/zaproxy/wiki/Introduction?tm=6 and I think we should do the same with O2 (I would like to have used the main OWASP wiki, but it's to messy, heavy and lacks the ability to create a side navigation)

It will be at https://code.google.com/p/o2platform/wiki

The idea is that the O2 related blogs entries are used for how-to articles, and the wiki pages contain consolidated content and references links (to those blog entries)

This would give O2 users good kickstarters on particular topics, for example https://code.google.com/p/o2platform/wiki/Browser_Automation :)

If you want to help editing these pages, send me your google account id and i'll make you an editor

Writing an IE Automation script to login into UK’s Wifi (using O2 Platform’s WatiN ExtensionMethods)

Here is an example of how to write an O2 Platform IE Automation script that will login a user into a wifi connection that needs a username and password.

Open the IE Script tool which you can get from this stand-alone version (see Packaging an O2 Platform Script as a stand alone tool (in this case the WatiN based ‘IE Script’ tool) )

Packaging an O2 Platform Script as a stand alone tool (in this case the WatiN based ‘IE Script’ tool)

If you grab the latest version of the O2 Platform and try to run the IE Script tool

image

Thursday, 14 March 2013

Creating a new TeamMentor test site using TeamCity, GitHub and Azure

Serge just asked me to create a new TeamMentor (TM) website for him using a particular TM library, so here are the steps I took (note: some of this will be automated in the next TM release)

Prob with (older version of) NGit where it was failing to create Git repositories in Azure/TeamCity

Using an NGit version from a couple months ago.

What happens when Asp.Net not installed on Windows 8 server

If you get an error like this:

image

Manually adding a code complete reference to the FLuentSharp C# REPL editor (using a 'Script the Script' editor)

Let’s say that you are in the C# REPL editor and you want to manually add a dll to be taken into account by the code complete engine (useful in the 5.1 version of the O2 Platform which had a bug that prevents some references from loading)

For example, let say you added the O2_FluentSharp_NGit.dll reference:

Setting up a apache (httpd) based git server (using an O2 Platform script)

Following from the instructions on this blog post Hosting a Git server under Apache on Windows and after installing git and apache locally

I wrote this O2 script:

Really nasty bug created by different behavior of WCF Security Principal in Azure (vs Locally in IIS or Cassini)

A couple days ago, I spent most of one day 'bashing my head against a brick wall'  due to an authorization bug that only happened in Azure!

Here are the rough screenshots I took when I was debugging it (the extra logging entries where added to help me understand what was going on (in Azure and locally))

Catching an Exception in RazorSharp

Here is a cshtml RazorSharp page that shows how to catch an exception (note the multiple mixes of code and HTML)

Tuesday, 12 March 2013

The Email RegEx that (could had) DOSed a site

While I was writing the UnitTests for TeamMentor's NewUser validator (see Validating a POCO DataContract using .NET's DataAnnotations Validator ), I had a weird result in one of the tests.

I basically got a 'never ending execution' scenario on this UnitTest:

Validating a POCO DataContract using .NET's DataAnnotations Validator

In order to make sure that the TeamMentor server only creates users with valid data, here is how I implemented data validation into the NewUser class using .NET's DataContract annotations.

The first step was to add the annotations to the NewUser object, which originally looked like this:

Saturday, 9 March 2013

Adding an Id field to an HTML element using jQuery (to help UnitTesting)

Michael just asked me to add an Html ID attribute to help him with the UnitTesting of teamMentor:

Is this a safe way to do a .NET Server Redirects? (and deal with A10: Unvalidated Redirects and Forwards)

The objective is to prevent A10: Unvalidated Redirects and Forwards in TeamMentor (version 3.3 had an issue with it)

Here is the code that does the redirection from user import (LoginReferer parameter):

Friday, 8 March 2013

Why we use Cassini instead of IIS Express

Following the IIS vs Cassini different behaviors on ASP.NET Server.Transfer  post, Barry commented on Twitter that I should use IIS Express instead:

image

so I decided to try it (which you can read bellow)

Thursday, 7 March 2013

GitHub.com needs to improve their the 'Normal' status definition and error reporting dashboard

At the moment (i.e. when I wrote this post), all should be 'Normal' with GitHub, since according to their status, their world looks like this: