Cinema: Kung Fu Panda

September 7th, 2008

Kung Fu Panda: un’improbabile storia di un panda obeso che deve diventare un maestro di kung fu per salvare la vallata, tra termini gergali, battute e saggezza.
Molto ben fatto e molto curato, con grande maestria per la fotografia e nello stile dei disegni.
Mi sono detto che bella colonna sonora, ne cerco informazioni, e scopro che e` firmata da Hans Zimmer, autore di grandissime composizioni che accompagnano alcuni tra i film che preferisco.
Un film bellissimo, ricco di citazioni e phatos, e adatto a tutte le eta`.
Citazione: “La leggenda narra di un guerriro leggendario la cui abilita` nel kung fu era materia di leggenda. Viaggiava per il paese in cerca di degni antagonisti”
Citazione: “Era cosi micidiale che i suoi nemici venivano accecati dall’abbaglio di tanta miticita`”
Citazione: “Non c’e` prezzo per la miticita`, neppure per l’attraenza”
Citazione: “Per quanti nemici affrontasse nessuno lo eguagliava in tostaggine”
Citazione: “Spesso ci si imbatte nel proprio destino quando si cerca di evitarlo”
Citazione: “La tua mente e` proprio come questa acqua amico mio, quando viene agitata diventa difficile vedere, ma se le permetti di calmarsi la risposta ti appare chiara”
Citazione: “Non esiste una cosa chiamata livello zero”
Citazione: “Mollare, non mollare. Spaghetti, non spaghetti. Ti preoccupi troppo di cio` che era, e di cio` che sara`. C’e` un detto: ieri e` storia, domani e` un mistero, ma oggi e` un dono,per questo si chiama presente”
Citazione: “Esistono solo le notizie, non sono ne` belle ne` brutte”
Citazione: “Il caso non esiste”
Citazione: “Un vero guerriero non molla mai”
Citazione: “Niente. Non esiste un’ingrediente segreto”

Hot link: cosa sono e perche` evitarli

September 6th, 2008

Inline linking o hot-link è uno stratagemma usato nella creazione di siti web nei quali le pagine fanno riferimento ad oggetti che non appartengono al dominio in cui questi vengono visualizzati o usati.
Ad esempio quando viene inserita in una pagina web un’immagine vista su un sito di terze parti si possono adottare due tecniche: si puo` copiarla sul proprio sito e visualizzarla, oppure visulizzarla direttamente indicando come fonte il sito di terze parti.

Utilizzando il secondo metodo, molto più veloce e sbrigativo, si realizza un’hot-link, rimanderete sempre all’immagine che risiede sul server dove è ospitato il sito dove l’avete trovata.

In particolare, gli hot-link sono usati con immagini di grosse dimensioni provenienti da altri siti web. Tale procedura comporta un forte sfruttamento in termini di banda e risorse del server in cui sono realmente memorizzate e un utilizzo praticamente nullo del server che contiene il sito web visualizzato.

Tale procedura non è molto corretta e neppure gradita da molti siti, infatti l’utilizzo di hot-link viene spesso proibito, perche` ruba della banda, oltre che dello spazio e delle risorse da un server che non appartiene a chi realizza l’hot-link, e questo non è bello né certamente educato.

Vediamo ora con un esempio pratico perche` realizze un hot-link e` una gran brutta idea.

Un po’ di giorni fa vedo nei file di log di questo web server che e` stato realizzato un hot-link ad un’immagine che avevo postato tempo fa senza nemmeno citarmi come fonte. Oggi e` venerdi`, mi sento buono, e non riporto chi ha realizzato l’hot-link.

Non che a me interessi se mi ruba un po’ di banda o qualche ciclo di CPU, per mia fortuna questo server e` abbastanza sovradimensionato, ma vorrei spiegare cosa comporta quel hot-link e cosa poteva accedere, al di la` di qualche megabyte di banda.

  1. Se fossi stato di fretta
    Se volevo risolvere velocemente la questione, rinomivavo o spostavo l’immagine. Il mio sito non avrebbe avuto problemi ma chi avrebbe visualizzato la pagina contentente l’hot-link non avrebbe visualizzato l’immagine, avrebbe ottenuto un errore di immagine mancante, e avrebbe dato la colpa ad un webmaster incompetente.
  2. Se fossi stato professionale
    Se volevo risolvere la questione in modo professionale avrei aggiunto qualche riga per mod_rewrite come queste:

    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?miosito.it [NC]
    RewriteRule \.(jpg|jpeg|png|gif|bmp)$ - [NC,F,L]

    Cosi che tutti i visitatori che richiedessero l’immagine provenendo dal sito con l’hot-link non la visualizzassero. I visitatori avrebbero dato la colpa nuovamente al webmaster.

  3. Se fossi stato vena di scherzi
    Avrei sostituito l’immagine con un altra. L’immagine oggetto del’hot-link e sul mio sito, quindi sotto il mio totale controllo. E posso farci quello che voglio, se fossi stato in vena di scherzi l’avrei sostituita con un immagine pornografico o di insulti verso i navigatori. Immagino che i visitatori del sito in cui viene visualizzata tale immagine non sarebbero molto felici, e se la prenderebbero con il webmaster di tale sito. E questo ne e` un esempio. (V.M. 27).
  4. Se fossi stato cattivo
    Avrei fatto in modo di sostituire l’immagine con un mio script javascript. Questo sarebbe stato eseguito dal browser del visitatore del sito che mi hot-linka.
    A quello script potrei far fare molte cose, ad esempio far apparire come defacciato il sito al visitatore.
  5. Se fossi veramente cattivo
    Avrei fatto in modo di sostituire l’immagine con un mio script javascript. Questo sarebbe stato eseguito dal browser del visitatore del sito che mi hot-linka.
    Tale javascript avrebbe mostrato l’immagine originaria, come nulle fosse, con la differenza che ad esempio richiamava attack-api, rubava le credenziali e dati di ogni visitatore del sito, e me le inviava. Ogni visitatore di quel sito sarebbe stato attaccato, la privacy della maggior parte di loro sarebbe stata violata e dei dati importanti sarebbere stati trafugati. Con un po’ di fortuna avrei rubato anche le credenziali dell’amministratore del sito che mi ha fatto l’hot-link.

Ora, siamo d’accordo che l’hot-link e` cosa brutta?

ASP.NET and input validation against XSS

September 5th, 2008

The today’s topic is XSS under ASP.NET and how validation filters and request filters works and are applied under ASP.NET.

The Microsoft .NET framework comes with a request validation feature, configurable by the ValidateRequest setting. ValidateRequest has been a feature of ASP.NET since version 1.1. This feature consists of a series of filters, designed to prevent classic web input validation attacks such as HTML injection and XSS (Cross-site Scripting).

Procheckup describe how bypass ValidateRequest in a whitepaper.

On the other side, some ASP.NET controls offers by default automatic html encoding, a great resource when you are reviewing your code for possible Cross-Site Scripting (XSS) or double encoding problems is this table that list all ASP.NET control and which property offers html, script or url encoding.

What’s new in the Flash 10 security

September 4th, 2008

The new version of Adobe Flash (actually 10 beta) has a variety of features and enhancements aimed to increase the security.

You can read a detailed article of Trevor McCaulery here: http://www.adobe.com/devnet/flashplayer/articles/fplayer10_security_changes.html

It seems that the Adobe security is based on:

  • require user interaction: to avoid automatic explotation and warn user about flash actions
  • new features that ovverride olds with a more secure implemtation

splmap 0.6 released

September 1st, 2008

My friend inquis today released one of the best SQL injection tools available to the public: sqlmap.
For the ones of you that do not know this tool yet, sqlmap is an automatic SQL injection tool developed in Python. Its goal is to detect and take advantage of SQL injection vulnerabilities on web applications. Once it detects one or more SQL injections on the target host, the user can choose among a variety of options to perform an extensive back-end database management system fingerprint, retrieve DBMS session user and database, enumerate users, password hashes, privileges, databases, dump entire or user’s specific DBMS tables/columns, run his own SQL SELECT statement, read specific files on the file system and much more.

After almost a year of extensive programming I am done with complete code refactoring, many bugs fixes and many new features.
Some of the new features include:

  • Added multithreading support to set the maximum number of concurrent HTTP requests.
  • Implemented SQL shell (–sql-shell) functionality and fixed SQL query (–sql-query, before called -e) to be able to run whatever SELECT statement and get its output in both inband and blind SQL injection attack.
  • Added an option (–privileges) to retrieve DBMS users privileges, it also notifies if the user is a DBMS administrator.
  • Added support (-c) to read options from configuration file, an example of valid INI file is sqlmap.conf and support (–save) to save command line options on a configuration file.
  • Implemented support for HTTPS requests over HTTP(S) proxy.
  • Enhanced logging system: added three more levels of verbosity to show also HTTP sent and received traffic.

Complete list of changes at http://sqlmap.sourceforge.net/doc/ChangeLog.

Cinema: Io vi trovero`

August 31st, 2008

Io vi trovero`: sua figlia va in vacanza in europa, viene rapida da un clan di albanesi per esser schiavizzata avviata alla prostituzione. Ma lui “lavorava per il governo” e fare di tutto per ritrovarla.
Un bel film di azione con un pizzico di spionaggio, un bel film. Luc Besson e` sempre una garanzia.
Citazione: “Se scavi trovi sempre della merda”
Citazione: “Sara` perfetto come hai vecchi tempi. Meglio, nessuno sara` ucciso”
Citazione: “Io non so chi siete, non so che cosa volete, se cercate un riscatto sappiate che non possiedo denaro, pero` io possiedo delle capacita` molto particolari che ho acquisito durante la mia lunga carriera che fanno di me un incubo per gente come voi. Se lasciate andare mia figlia la storia finisce qui, non verro` a cercarvi, non vi daro` la caccia, ma se non lo farete, io vi cerchero`, vi trovero`, e vi uccidero`”
Citazione: “Non avrei lasciato vivere mia figlia con qualcuno se non avessi fatto ricerche su di lui”
Citazione: “Come fai a saperlo? Sono in pensione, non morto.”
Citazione: “Ecco cosa succede se stai dietro una scrivania, non riconosci piu` dal peso se una pistola e` scarica”

Lol: Moca 2008 is Ending by storialoffa

August 27th, 2008

Dal grandissimo autore di IT Security is Burning ecco un’altro capolavoro.

Cinema: Il Risolutore

August 24th, 2008

Il Risolutore - A man apart: Lui e` un poliziotto di una squadra anti droga a cui uccidono la moglie per vendetta. Lui giustamente si arrabbia e ne scaturisce la vendetta all’amarican-poliziesco.
Niente di che, direi che si puo` impegnare il tempo con film migliori.
Citazione: "Eravamo diversi, non eravamo poliziotti, non ci comportavamo come poliziotti. Eravamo diversi perche` eravamo cresciuti per strada"
Citazione: "Soltanto Dio potra` perdonarti adesso, io no"
Citazione: "Stai combattendo contro un organizzazione criminale che frutta milioni e milioni di dollari. Stai cercando di abbattere un mostro, per un poliziotte e` impossibile, anche tu devi trasformarti in un mostro"
Citazione: "So che la tua anima e` sempre con me, ma mi manchi lo stesso"

A browser as web hacking platform

August 19th, 2008

A list of Firefox plugins to turn your browser in an hacking platform. This is an improved list based on "Turning Firefox to an ethical hacking platform" from Security-Database.com

Information gathering

  • Whois and geo-location
    • ShowIP
      : Show the IP address of the current page in the status bar. It also
      allows querying custom services by IP (right mouse button) and Hostname
      (left mouse button), like whois, netcraft.
    • Shazou
      : The product called Shazou (pronounced Shazoo it is Japanese for
      mapping) enables the user with one-click to map and geo-locate any
      website they are currently viewing.
    • HostIP.info Geolocation : Displays Geolocation information for a website using hostip.info data. Works with all versions of Firefox.
    • Active Whois : Starting Active Whois to get details about any Web site owner and its host server.
    • Bibirmer Toolbar
      : An all-in-one extension. But auditors need to play with the toolbox.
      It includes ( WhoIs, DNS Report, Geolocation , Traceroute , Ping ).
      Very useful for information gathering phase
  • Enumeration / fingerprinting
    • Header Spy: Shows HTTP headers on statusbar
    • Header Monitor
      : This is Firefox extension for display on statusbar panel any HTTP
      response header of top level document returned by a web server.
      Example: Server (by default), Content-Encoding, Content-Type,
      X-Powered-By and others.
  • Social engineering
    • People Search and Public Record:
      This Firefox extension is a handy menu tool for investigators,
      reporters, legal professionals, real estate agents, online researchers
      and anyone interested in doing their own basic people searches and
      public record lookups as well as background research.
  • Googling and spidering
    • Advanced dork
      : Gives quick access to Google’s Advanced Operators directly from the
      context menu. This could be used to scan for hidden files or narrow
      in a target anonymously (via the scroogle.org option) 
    • SpiderZilla : Spiderzilla is an easy-to-use website mirror utility, based on Httrack from www.httrack.com.
    • View Dependencies
      : View Dependencies adds a tab to the "page info" window, in which it
      lists all the files which were loaded to show the current page. (useful
      for a spidering technique)

Security Assessment / Code auditing

  • Editors
    • JSView
      : The ’view page source’ menu item now opens files based on the
      behavior you choose in the jsview options. This allows you to open the
      source code of any web page in a new tab or in an external editor.
    • Cert Viewer Plus
      : Adds two options to the certificate viewer in Firefox or Thunderbird:
      an X.509 certificate can either be displayed in PEM format (Base64/RFC
      1421, opens in a new window) or saved to a file (in PEM or DER format -
      and PKCS#7 provided that the respective patch has been applied - cf.
    • Firebug
      : Firebug integrates with Firefox to put a wealth of development tools
      at your fingertips while you browse. You can edit, debug, and monitor
      CSS, HTML, and JavaScript live in any web page
    • XML Developer Toolbar:allows XML Developer’s use of standard tools all from your browser.
    • Web developer : Adds a menu and a toolbar with various web developer tools.
  • Headers manipulation
    • HeaderMonitor
      : This is Firefox extension for display on statusbar panel any HTTP
      response header of top level document returned by a web server.
      Example: Server (by default), Content-Encoding, Content-Type,
      X-Powered-By and others.
    • RefControl : Control what gets sent as the HTTP Referer on a per-site basis.
    • User Agent Switcher :Adds a menu and a toolbar button to switch the user agent of the browser
  • Cookies manipulation
    • Add N Edit Cookies : Cookie Editor that allows you add and edit "session" and saved cookies.
    • CookieSwap
      : CookieSwap is an extension that enables you to maintain numerous sets
      or "profiles" of cookies that you can quickly swap between while
      browsing
    • httpOnly : Adds httpOnly cookie support to Firefox by encrypting cookies marked as httpOnly on the browser side
    • Allcookies : Dumps ALL cookies (including session cookies) to Firefox standard cookies.txt file
  • Security auditing
    • HackBar
      : This toolbar will help you in testing sql injections, XSS holes and
      site security. It is NOT a tool for executing standard exploits and it
      will NOT learn you how to hack a site. Its main purpose is to help a
      developer do security audits on his code.
    • Tamper Data : Use tamperdata to view and modify HTTP/HTTPS headers and post
      parameters.
    • Chickenfoot
      : Chickenfoot is a Firefox extension that puts a programming
      environment in the browser’s sidebar so you can write scripts to
      manipulate web pages and automate web browsing. In Chickenfoot, scripts
      are written in a superset of Javascript that includes special functions
      specific to web tasks.

Proxy/web utilities

  • FoxyProxy
    : FoxyProxy is an advanced proxy management tool that completely
    replaces Firefox’s proxy configuration. It offers more features than
    SwitchProxy, ProxyButton, QuickProxy, xyzproxy, ProxyTex, etc
  • SwitchProxy:
    SwitchProxy lets you manage and switch between multiple proxy
    configurations quickly and easily. You can also use it as an anonymizer
    to protect your computer from prying eyes
  • POW (Plain Old WebServer)
    : The Plain Old Webserver uses Server-side Javascript (SJS) to run a
    server inside your browser. Use it to distribute files from your
    browser. It supports Server-side JS, GET, POST, uploads, Cookies,
    SQLite and AJAX. It has security features to password-protect your
    site. Users have created a wiki, chat room and search engine using SJS.
  • Torbutton : Torbutton provides a button to securely and easily enable or disable
    the browser’s use of Tor. It is currently the only addon that will
    safely manage your Tor browsing to prevent IP address leakage, cookie
    leakage, and general privacy attacks.

Misc

  • Hacks for fun
    • Greasemonkey : Allows you to customize the way a webpage displays using small bits of JavaScript (scripts could be download here)
  • Encryption
    • Fire Encrypter
      : FireEncrypter is an Firefox extension which gives you
      encryption/decryption and hashing functionalities right from your
      Firefox browser, mostly useful for developers or for education &
      fun.
  • Anti Spoof
    • refspoof
      : Easy to pretend to origin from a site by overriding the url referrer
      (in a http request). — it incorporates this feature by using the
      pseudo-protocol spoof:// .. thus it’s possible to store the information
      in a "hyperlink" - that can be used in any context .. like html pages
      or bookmarks

Cinema: Wanted

August 17th, 2008

Wanted - Scegli il tuo destino: La storia di un impiegato sfigato, che non sa chi e` ne come gestire la sua vita. Non e` nessuno e non si sente nessuno. Cerca freneticamente il suo nome su Google ma ottiene sempre e solo zero risultati, e` talmente timido da chiedere sempre scusa per tutto. Finche` non scopre di essere diverso dagli altri.
Un gran bel film, ovviamente sproporzionato e esagitato come il cinema americano, ma pieno di citazioni e di phatos.
Citazione: "Ultimamente non mi interessava di niente, l’unica cosa che mi interessava era che non mi interessava di niente"
Citazione: "A uccidere un lupo mandi delle pecore?"
Citazione: "Sapete ci sono persone, belle persone, che dovrebbero vederti in un ambito diverso, non dove sei e come sei diventato"
Citazione: "Sapete qual’e` la cosa piu` bella di una giornata che finisce? Che il giorno dopo ricomincera` tutto da capo"
Citazione: "Mi scusi?" "Tu ti scusi troppo"
Citazione: "Un mucchio di cose erano impossibili per te prima di oggi"
Citazione: "Pazzia e` vivere come una nullita` quando hai il sangue di un assassino nelle vene"
Citazione: "Piacere, io sono il riparatore" "E cosa ripari?" "Un’intera vita di brutte abitudini"
Citazione: "Ecco cosa devi sapere phuto. I coltelli si nascondono facilmente, non si inceppano mai e non finiscono mai i colpi. sono molto utili quando fai un lavoretto a distanza ravvicinata."
Citazione: "Se tu non sapessi che le pallottole viaggiano in linea retta, e io ti dicessi colpisci il bersaglio, tu cosa faresti? Lascia che sia l’istinto a guidarti"
Citazione: "Ora so perche` non mi era mai importato di niente prima. Non vivevo la mia vita. Finalmente ho l’occasione di seguire le orme di mio padre, di tirare fuori le palle, di vivere la vita per cui sono nato. L’ho buttata nel cesso come fosse un cazzo di rapporto sul fatturato. Devo addestrarmi meglio e diventare bravo come mio padre"
Citazione: "Noi non sappiamo quali effetti possono avere le nostre decisioni, ne uccidi uno, e magari ne puoi salvare mille. Questo e` il codice della confraternita, e` in questo che crediamo, ed e` per questo che lo facciamo"
Citazione: "Mi avevano insegnato a uccidere, a non provare dolore. E la cosa piu` importante: che per ogni lavoro esiste l’arma perfetta. bhe, sono io l’arma perfetta. E dovrei rinunciare a fare il mio lavoro? C’e` in gioco tutta la mia vita, quindi io dico no, io dico uccidili tutti e lascia che il fato rimetta ordine nel caos"
Citazione: "I lupi governano, non le pecore"
Citazione: "Sei settimane fa ero un patetico tipo qualunque, proprio come voi. Ma chi sono adesso? Un contabile? Un giustiziere? O semplicemente uno strumento usato per uccidere suo padre? Sono tutto questo e niente di questo. Chi sono adesso?"
Citazione: "Questo non sono io che realizzo il mio destino. Questo non sono io che seguo le orme di mio padre. E decisamente questo non sono io che salvo il mondo. Questo non sono io… e` soltanto un’esca del cazzo! Questo sono io! Che riprendo il controllo, da Soun, dalla confraternita, da Jenis, dai rapporti sul fatturato, dalle tastiere ergonomiche, dalle fidanzate che mi cornificano, dai migliori amici di merda, questo sono io che riprendo il controllo della mia vita! E voi cosa avete fatto ultimamente?"