Search This Blog

Thursday, October 18, 2012

Shellcode Quote Notes(1)

The following are some intuitive experiment to help understanding how the quote system works in shell code.

Asterisk (*)

* means "for any"

1. Create 3 file with filename : *testing *testing* testing* test*ing

$touch *testing
$touch "*testing*"
// won't work without the quote because of the starting with a meta-character " *"
$touch testing*
$touch test*ing
2. Test with "ls"

Case 1: 

Type:
$ls *

Meaning:
list anything

Result: 
*testing *testing* testing* test*ing

Case 2: 

Type:
$ls *\*

Meaning:
list anything that ends with a *

Result: 
*testing* testing* 

Case 3: 

Type:
$ls *\**

Meaning:
list anything (including nothing) that follows with a * and then follows by anything (including nothing)

Result: 
*testing *testing* testing* test*ing

Case 4: 

Type:
$ls \**

Meaning:
list something that starts with a * and then follow by anything (including nothing)

Result: 
*testing *testing*


No comments:

Post a Comment