Posts

Some malware analysis sandboxes

REMnux: A Linux Toolkit for Reverse-Engineering and Analyzing Malware https://remnux.org/ SANS Investigative Forensic Toolkit (SIFT) Workstation Version 3 http://digital-forensics.sans.org/community/downloads Drakvuf - DRAKVUF is a virtualization based agentless black-box binary analysis system. DRAKVUF allows for in-depth execution tracing of arbitrary binaries (including operating systems), all without having to install any special software within the virtual machine used for analysis. SANS Investigative Forensic Toolkit (SIFT) Workstation Version 3 https://github.com/appcoreopc/drakvuf https://drakvuf.com/ Caine http://www.caine-live.net/page5/page5.html DEFT Linux http://www.deftlinux.net/ PlainSight http://www.plainsight.info/download.html Helix3 http://www.e-fense.com/products.php Paladin Forensic Suite (commercial) https://sumuri.com/software/paladin/

Some malware analysis sandboxes

REMnux: A Linux Toolkit for Reverse-Engineering and Analyzing Malware https://remnux.org/ SANS Investigative Forensic Toolkit (SIFT) Workstation Version 3 http://digital-forensics.sans.org/community/downloads Drakvuf - DRAKVUF is a virtualization based agentless black-box binary analysis system. DRAKVUF allows for in-depth execution tracing of arbitrary binaries (including operating systems), all without having to install any special software within the virtual machine used for analysis. SANS Investigative Forensic Toolkit (SIFT) Workstation Version 3 https://github.com/appcoreopc/drakvuf Caine http://www.caine-live.net/page5/page5.html DEFT Linux http://www.deftlinux.net/ PlainSight http://www.plainsight.info/download.html Helix3 http://www.e-fense.com/products.php Paladin Forensic Suite (commercial) https://sumuri.com/software/paladin/

Some malware analysis sandboxes

REMnux: A Linux Toolkit for Reverse-Engineering and Analyzing Malware https://remnux.org/ SANS Investigative Forensic Toolkit (SIFT) Workstation Version 3 http://digital-forensics.sans.org/community/downloads Caine http://www.caine-live.net/page5/page5.html DEFT Linux http://www.deftlinux.net/ PlainSight http://www.plainsight.info/download.html Helix3 http://www.e-fense.com/products.php Paladin Forensic Suite (commercial) https://sumuri.com/software/paladin/

Some malware analysis sandboxes

REMnux: A Linux Toolkit for Reverse-Engineering and Analyzing Malware https://remnux.org/ SANS Investigative Forensic Toolkit (SIFT) Workstation Version 3 http://digital-forensics.sans.org/community/downloads Caine http://www.caine-live.net/page5/page5.html DEFT Linux http://www.deftlinux.net/ PlainSight http://www.plainsight.info/download.html Paladin Forensic Suite (commercial) https://sumuri.com/software/paladin/

How do you get the Linux version you're working on?

Believe it or not, this does the trick. It's that easy. :) cat /etc/*release

Resource interpreted as Stylesheet but transferred with MIME type text/plain

Image
Getting this error "Resource interpreted as Stylesheet but transferred with MIME type text/plain". Solution : Ensure you IIS is enabled to load "Static Content" - Go to Turn Windows Features on or off and look for static content as show in diagram below :- Once you have installed it, you're ready to go.

MSSQL - Recovering user account when you accidentally delete relevant login account

I had the good experience of removing local domain account (windows authenticated user) from my mssql database and you guess it, i was not able to login at all using windows authenticated users. Instead  of reinstall my database, here's what i did :- a) stop "Sql Server (MSSQL Server service) b) net start mssqlserver /m c) fire up SQL Management studio and login using Windows Authentication. d) Perform recovery process whereby you add relevant users accounts here. e) Restart your MSSQL server service and login. That's it.

R - getting list of libraries installed

to get a list of installed packages in your R, just use the following command :- installed.packages() You can also list core libraries by using the following command installed.packages(priority = "base") "base"  must be lower case. 

Reading css specification

Image
As long as I can remember, i don't really read html / css specifications. Maybe I should get into that habit. Think today is a good start, as i have the know-how to read css specification. was trying to figure out if min-width is applicable to table. Found the answer here. Hopefully no more TLDR thingie ! :)

OpenCover code coverage for .Net Core

Image
I know there are many post out there getting code coverage for .dotnetcore. I'm using opencover to address this needs. In case, you do no want to use opencover and wanted to stick with vs2015 code coverage, you can try to copy  Microsoft.VisualStudio.CodeCoverage.Shim.dll  from  C:\Program Files (x86)\Microsoft Visual Studio 14.0\Team Tools\Dynamic Code Coverage Tools\coreclr\  and drop it into your project " bin\Debug\netcoreapp1.0" folder.  Please note : you need to be on VS2015 Enterprise to do this.  To get started, I guess we need to add OpenCover and ReportGenerator for our test projects, as shown in diagram below :- When nuget packge gets restored, we will have some binaries downloaded to our machine and we going to use this to generate some statistics. I think the biggest issue is to getting those command lines work. In dotnetcore, we run test project using "dotnet test" (assuming you are in the test project folder - if not please go t...

Build - the parameter is incorrect

It has been quite sometime since i last blogged. Been really busy trying to get my head around R, data analysis and some of the fun it brings. If you have an issue with Visual Studio 2015 - with the following error message - The input parameter is not correct - it just happened without you doing anything, well - the solution is simply Restart your Visual Studio and then re-load the projects. I think i had this issue because i kept on switching my branch in SourceTree. (i think - reason remains unknown :)) All rite, till next time.

msqlserver : Cannot open user default database

Image
When you face this issue, some googling will land you on this page . To fix this, all you really need to do is change your default database to master. In your Sql management studio -> connect -> connection properties -> change Connect to database = "master" or some database you have in your local machine and hit connect. It might look something like this. No need to use sqlcmd  to do the dirty job.

Virtualbox adding extra drive to your vm when your storage is getting less

If your virtual vm storage is getting less and you need extra storage space, you need to the the following :- a) power down your virtual machine b) add a new virtual disk (vdi) and store it at a specific folder in your host machine c) power on your virtual machine. d) goto disk management and you will see a prompt asking you to acknowledge the new disk partition e) assigned a drive to it and proceed format that drive. That's all you need to do to add a little extra space to your virtualbox. 

Crappy random issue : The trust relationship between this workstation and the primary domain failed

When your password expired on your virtual box and you get locked out of the network, then you need to go through this process to resolve the issue , Phew! thankfully it only come to haunt you when every 3 months. :) or essentially if it says you already have your machine added to the domain, what you need to do are 1. change your computer to a random workgroup. 2. without restarting, change it to your VALID domain. You will be prompted to key in name and password. 3. restart

dotnetcore serilog using rolling file

serilog is a logging component for .net. To serilog into your project and configure logging from your project configuration file, here's what you need to do. First, you need to install the following packages :- Install-Package Serilog.Extensions.Logging -DependencyVersion Highest Install-Package Serilog.Sinks.RollingFile Install-Package Serilog.Settings.Configuration In your start up,  you need to configure serilog using the following code. Next, just add it in your log factory, Next, see how our configuration file looks like. Here are we telling serilog to log to a folder in c:\temp. Well, that's all you need to do to add serilog into your project.

working with windows certs x.509 and private keys

Image
I guess this is something i don't work with alot and i need to get it in my head. Hence this post. Assumption : in this post i am using dotnetcore to encrypt and decrypt a jwt token. (using jose jwt library). By design x.509 certificates contains only public key. private key are not stored in x.509. By design, public key are stored because it is presented to other external parties. Public key normally comes with extension ".cer", while private keys file ends with ".pfx" (private keys). For a developer, it is essential understand the followings :- a) where you store or getting certificates from - you could be installing your certs to your local certificate repository - that is accessible to you only, local machine - accessible to more users or service account. You can goto mmc-> Add/remove snap-in -> Certificates -> Two steps installation process. first we install our public x.509 cer and then private keys. For info, please click here...

retrieve file async over webapi in .dotnet core

WebApi in .Netcore makes it really easy to  retrieve / download file asynchronously. There are 2 different ways to go about this (could be more) but here's my approach a) ActionResult b) FileStreamResult c) CustomActionResult Check out the following codes (a and b - ain't that much of a difference) FileStreamResult is async operation. You will get read chunk by chunk, asynchronously and delivered to client. What about ActionResult? Tricky part would be (c) creating your custom ActionResult to read and send to client. A huge differences to note is that, traditionally we use HttpMessageResponse. But this introduce conversion challenges and with dotnet core, we gonna have a huge incompatibilities issues too. But WebAPI approach to solve this is pretty easy. Take a look at code below :- As you can see, instead of creating you HttpMessageResponse manually, you can just leverage on existing ones. :)

.net core configuration

.net core configuration has changed. there will be no more System.Configuration, instead we're gonna be using Microsoft.Framework.Configuration. :) To summarize how it is different :- a) Read all configuration (file - json, ini and also environment variables) on Startup (Owin's start up) b) Also in startup, save settings of your model using ConfigureServices. You model needs to have exact attribute name c) Expose it in your Controller's constructor via IOptions. So it takes abit of reading to understand what is going on. Lets say i have config.json which contains the following contents : I will create my model to read in these properties as shown here. Finally in my controller, i have my controller and constructor which looks as follows :- That's it! :)

.Net core Owin namespace does not exist

If you run into this, issue after installing nuget packages like install-package Microsoft.Owin.Security.Jwt install-package "Microsoft.Owin.SelfHost" please check if you're looking at version "3.0.1". If it is, then Core5 is not compatible with these libraries. Solution : Stick with dnx451. Just remove the dnx5 in your project.json and it should just look like the following :- "frameworks": {     "dnx451": {       "frameworkAssemblies": {         "System.IdentityModel": "4.0.0.0"       }     }   } That's it! :)

Deep dive Angular2

Just how many directive you know in Angular2? @NgModule @NgModule({ imports: [ BrowserModule ], declarations: [ MyComponent ], bootstrap: [ MyComponent ] }) @Component Control component @Injectable Service as we know it. @Directive Use  this for creating Angular2 directive. What is the differences between directive and component? Directive you can use it along with existing HTML mark up. Component stands by itself. @Pipe