VirtualBox: two network interfaces (NAT eth0 and host-only eth1 ones)







allow-hotplug eth1
iface eth1 inet dhcp


The second line instructs the interface to obtain an IP via DHCP. However, doing it would only wor 
after I've called ifup eth1. So I added the first line, which would load the interface at boot tim

EDIT: full /etc/network/interfaces:

=======================


# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp

allow-hotplug eth1
iface eth1 inet dhcp


===========================


تابع القراءة ←

analysing a Blue Screen issue


Most Blue Screens are caused by drivers or other kernel mode software attempting to access protected memory. The tools for analyzing the crash dump created during a Blue Screen are not very friendly. Follow these steps to determine the cause of the Blue Screen.
  • Download WinDbg.
    Firstly down load the Standalone Debugging Tools for Windows (WinDbg) from:
    https://msdn.microsoft.com/en-us/windows/hardware/hh852365.aspx
  • Install WinDbg
    Run the installer
    Select Install the Windows Software Development Kit for Windows to this computer.
    Accept the CEIP and License agreement.
    Select Debugging Tools for Windows.
  • Configure WinDbg
    Run WinDbg
    Click File
    Click Symbol File Path
    Add the following line
    srv*c:\mss*http://msdl.microsoft.com/download/symbols
  • Analyse Crash Dump
    Click File
    Click Open Crash Dump
    Locate your Crash Dump. These are found at:
    C:\Windows\Minidump
    In the command bar at the bottom type:
    !analyze -v
    Press Enter.
  • Understanding the results
    Under the second Bugcheck Analysis will be the action that triggered the Blue Screen. More often than you not you will have to google this issue looking for driver updates or Microsoft hotfixes. In the below example the clues to search for are the following:
    BugCheck 50
    Probably caused by : win32k.sys
    PAGE_FAULT_IN_NONPAGED_AREA
This led to the following Microsoft hotfix which resolved the issue:
https://support.microsoft.com/en-us/kb/2781406


ref: http://blog.buktenica.com/beginners-guide-to-analysing-a-blue-screen/
تابع القراءة ←

LFI: beyond /proc/self/environ

Let’s suppose that we have a simple php application. The web app has a login form and a small news system based on txt files.
So a user can simple log into the system
1
And access the company’s internal board:
2
After looping through all the pages, one can guess that the web app is loading the content for each section from a plain text file.
3
Reviewing the code clarifies the question.
4
So at this point, an evil user could perform some local file inclusion and read files in the remote system.
5
We all know how to exploit that via the “/proc/self/environ” way and if we don’t, our friend google can help for sure.
So in thist post we’ll see some other ways to inject php code inside various files in the servers remote system.
If the remote system has the apache access.log accesible via web a hacker can inject php code inside.
6
Php code can be injected via netcat. By trying to browse and invalid page, the GET request will be stored inside the apache log file:
7
Then the attacker can call the log file and enjoy the remote code execution.
8
Various pieces of code can be executed.
9
If the remote box has ssh auth.log accesible, malicious code can be injected via SSH
10
By trying to log into the system using an invalid username, the name used will be stored inside auth.log. So the hacker can inject code that way.
11
Other scenario is presented when the remote and LFI vulnerable web application stores – not sanitized –  data inside a session file. Let’s think about some piece of code like the following:
if($user==’admin’ and $password==’admin1234′){
$_SESSION[“auth”] = 1;
foreach ($_POST as $key => $value) {
if ( substr($key, 0, 4) == ‘cms_’ ) {
$_SESSION[$key] = $value;
}
}
At this point, all post variables starting with cms_ will be included inside the session file, so an attacker can use that to inject evil code.
An attacker can use some proxy like PAROS to alter http traffic on the fly:
12
13
By altering the traffic, an attacker will be able to inject a third post variable:
14
So the attacker can include a variable called cms_whatever and inject php code inside:
15
Using PAROS, the attacker can look for the session ID.
16
And now he’s able to exploit the LFI and call the php session file
17
In a real life scenario, the attacker will include an evil file like a backdoor and gain control of the server.
A shell can be obtained using a php, perl, python or whatever reverseshell like this
18
Files can be transfered to the remote server via an HTTP server and the wget command used along with the shell_exec php function.
19
Using shell_exec in php will allow us to run system commands on the remote server.
wget
And after running the perl /tmp/ps.pl command, access is gained on the server
shell
be good!
تابع القراءة ←

SQL INJECTION INTRODUCTION


SQL INJECTION INTRODUCTION

SQL INJECTION INTRODUCTION--

  • SQL Injection is the most common vulnerability on the internet.
  • It is mainly flaw in the web application & not a Database or web server issue.
  • most programmer are still not aware of this threat.
What is SQL Injection ????
  • Sql injection is a technique used to take advantage of non-validate Input vulnerabilities to pass SQL commands through a web Application for execution by back-end Database.
  • In Other words,Sql injection is a basic techniques /attack used to either gain unauthorised access to a database or to retrieve information directly from the Database.
SQL Injection Attacks ----
  1.  Authentication Bypass --- Using this attacks, an attacker logs on to an application without providing valid username & password & gain the administrative privileges.
  2. Information Disclosure --- Using this attacks, an attacker obtain the sensitive Information that is stored in the database. 
  3. Compromised Data Integrity --- An attacker uses this attack to deface a webpage ,insert malicious content into webpages , or alter the content of database. 
  4. Compromised Availability of Data --- An attacker use this attack to delete the database information logs or audit information that is contained in database. 
  5. Remote code Execution --- It allows an attacker to compromise the Host O.S.
How web Application Works ----

  • The above fig. shows how the initial request is triggered by the user through the browser over the Internet to the web application server. 
  • The web application accesses the databases servers to perform the requested task updating and retrieving the information lying within the database. 
  • The web application then presents the information to the user through the browser.
Web Security Issue ----



  • web applications do raise a number of security concerns stemming from improper coding. Serious weaknesses or vulnerabilities, allow hackers to gain direct and public access to databases in order to sensitive data.
  • Many of these databases contain valuable information (e.g., personal and financial details) making them a frequent target of hackers
  • Websites and related web applications must be available 24 hours a day, 7 days a week, to provide the required service to customers, employees, suppliers and other stakeholders.
  • Firewalls and SSL provide no protection against web application hacking, simply because access to the website has to be made public – All modern database systems (e.g. Microsoft SQL Server, Oracle and MySQL) may be accessed through specific ports (e.g., port 80 and 443) and anyone can attempt direct connections to the databases effectively bypassing the security mechanisms used by the operating system. These ports remain open to allow communication with legitimate traffic and therefore constitute a major vulnerability.
  • Web applications often have direct access to back-end data such as customer databases and, hence, control valuable data and are much more difficult to secure. Those that do not have access will have some form of script that allows data capture and transmission. If a hacker becomes aware of weaknesses in such a script, he may easily reroute unwitting traffic to another location and illegitimately hive off personal details.
  • Most web applications are custom-made and, therefore, involve a lesser degree of testing than off-the-shelf software. Consequently, custom applications are more susceptible to attack.
Types  of SQL Injection ---
There are mainly TWO types of SQL injection ----
1. Simple SQL Injection 
  • Union SQL Injection
  • Error Based SQL Injection.

2.Blind SQL Injection
تابع القراءة ←

How to Create a Bootable Windows 7



How to Create a Bootable Windows 7 


Run Command Prompt as an administrator. To open a command prompt, go to the Start menu and search for CMD. Right-click on it and select Run as Administrator to use it with admin rights.

Using the Diskpart utility find the drive number of your flash drive. To do so, type in the following command in the command prompt: DISKPART
  • Running DISKPART will display the version of DISKPART you are running and the name of your PC.
  • Type “list disk” to see a display of all your connected disk drives. Make a note of the number assigned to your Flash drive.
# Format the drive. Execute the following list of commands one-by-one. Make sure you replace Disk 1 with the proper Disk number from DISKPART.

> list disk 

> select disk 1
> clean
> create partition primary
> select partition 1
> active
> format fs=NTFS QUICK
> assign
> exit


# Make the flash drive bootable. Use the bootsect utility that is shipped with Windows 7/Vista. To do so:
  • Insert the Windows 7/Vista DVD and note down the drive letter of the DVD drive. For this guide, the DVD drive is D: and the USB drive is G:.
  • Navigate to the directory where bootsect is found.

    D:
    cd d:\boot
  • Use the bootsect to make the USB Drive bootable. This updates the drive with BOOTMGR compatible code and prepares it to boot Windows 7/Vista.

    BOOTSECT.EXE/NT60 G:
  • Close the Command Prompt windows.

# Last step : go to the file where windows file exist and copy all the files to USB drive 

تابع القراءة ←
;