Showing posts with label hacking. Show all posts
Showing posts with label hacking. Show all posts

Saturday, 7 May 2016

SSH - Black Magic


Remote port forwarding - Public connections to my laptop on any network:
------------------------------------------------------------------------
ssh -R ${remote}:${local} remote

Initiated by the remote machine.
Example:
1.) Run this on your Mac
ssh -R *:2020:localhost:22  -i awskey.pem ec2-user@ec2-xx-xx-xxx-xxx.us-west-2.compute.amazonaws.com

2.) Then on AWS machine to access your Mac:
ssh macuser@localhost -p 2020


Local port forwarding:
-------------------------------------------------
ssh -L ${local}:${remote} remote

Initiated by the local machine.

3.) Dynamic port forwarding, SOCKS 5 proxy using '-D' flag


Original link:
https://vimeo.com/54505525

Saturday, 7 September 2013

Using wget to download an ASP site

You can download an ASPX site, which asks for username/password for log in as follows:

First provide the username/password to the login page and save the cookie file.

wget --mirror -r \
--user-agent="" \
--keep-session-cookies --save-cookies cookies.txt \
--post-data '__VIEWSTATE=%2FwEPDwULLTE3MDc5MjQzOTdkZIP%2Fxc105yfz2jGFj4Nd3tPvrEeNara43fIRI5oAW%2Bwv&__EVENTVALIDATION=%2FwEWBAKisoyCAwLB2tiHDgK1qbSRCwL2k8O9DUQa5owMFDWzFnBoIDusNkznjB65a6zRyNETOEZfBM1o&txtUser=admin&txtPassword=admin&login_btn=Sign+In' \
-E -k -p http://www.xyz.com/Login.aspx

Then you can access other pages in the next step using the above generated cookie files.

wget --mirror -r \
--user-agent="" \
--keep-session-cookies --load-cookies cookies.txt \
-E -k -p http://www.xyz.com/Index.aspx

For details of the options, refer to the WGET manual i.e "man wget" :)

Saturday, 31 March 2012

Nice hacking lessons

The site security overrides is a good place to start learning about security exploits. the best part is it explains the exploits and gives you an arena to practice your skills as well  :)
Check this out:
http://securityoverride.net/challenges/index.php

Here is another one for practicing your SQL injection skills:
http://progzoo.net/hack/
http://sqlzoo.net/hack/12access.htm