Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-20-2012, 10:34 AM   #16
Registered: Nov 2011
Location: Germany, Bavaria, Nueremberg area
Distribution: openSUSE, Debian, LFS
Posts: 205

Rep: Reputation: 43

Originally Posted by mr.cracker View Post
I had already installed cygwin. but in windows there is no kernel. Then how it is possible?? Is the shellcode is mainly focus on Unix like system?
Linux got a kernel.
Windows got a kernel.
Mac OS got a kernel.

A kernel is just a word for the very innermost tasks a Operating System. These are managing the memory, detecting and serving all hardware pieces and take care about the rights.

These tasks have to be done no matter how the resulting system is called.

If you write "shellcode" in windows, you can execute this code on a Linuxbox.
If, and only if this code is written for a linux shell.
Linux has a load of different shells. "bash" "dash" "ksh" "tsh" just to name a few.

If yxou are writing "shellcode" for the "powershell" you can run this code in windows as "powershell" is a windows shell. It won't run on a linux box.

If you install "cygwin" in windows, you are able to run real Linux shellscripts.
If you install "wine" on a Linux box, you are able to run Powershell scripts on Linux.
But in this two cases they run in a kind of simulation of the other operating system.

So again: You can write "shellcode" with every editor on every operating system.
But the written code is only executable on the corresponding platform.
Old 05-21-2012, 11:50 AM   #17
Registered: May 2012
Posts: 58

Original Poster
Rep: Reputation: Disabled

Originally Posted by catkin View Post
As Nylex asked (and you did not answer), what do you mean by "shell-code"? Maybe shellcode or shell script.

Shellcode may be written in any language. Shell script is written in the language of the shell it is designed for. Windows has the CMD shell (when running cmd.exe). Linux has many shells; bash is popular.

According to Wikipedia the GUI may also be called a shell. In that case it's the Windows GUI and on Linux it is the desktop GUI and there are several to choose from: Gnome, KDE, Xfce etc.

Both Linux and Windows have a kernel.

There are many places online and many books about programming command line shells such as CMD and bash.
Thanks for the information. But i have some more doubts.
You said that shellcode may be written in any language.That is,can i write the shellcode in c,c++,jave etc.??
And, Does an OS has more than one shell?
And you said that "Windows has the CMD shell (when running cmd.exe)."
Does there is no shell without running CMD in windows?
Old 05-21-2012, 12:04 PM   #18
LQ 5k Club
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware & Slackware64 15.0
Posts: 8,235
Blog Entries: 61

Rep: Reputation: Disabled
Again, read the Wikipedia article about shellcode.
Then read this LQ rule:
Posts containing information about cracking, piracy, warez, fraud or any topic that could be damaging to either or any third party will be immediately removed.
That means asking questions on those subjects, too.
Old 05-21-2012, 12:50 PM   #19
Registered: Mar 2012
Location: New Jersey
Distribution: Gentoo
Posts: 291

Rep: Reputation: Disabled
Give this on smashing the stack a read Mr. Cracker. I don't know if its up to date. This article came out a while ago. It's written by Aleph one and hosted by

I think the stack has a precaution enabled called randomization built in now. Your code would need an nop sled/padding added to work correctly or if your testing your own code you could disable stack randomization. To disable the SR-->
cat/proc/sys/kernel/randomize_va_space echo 0 > /proc/sys/kernel/randomize_va_space cat /proc/sys/kernel/randomize_va_space
You would need the basics of assembly at the very least. It can become quite complicated! Interesting topic though!

Last edited by Tinkster; 05-22-2012 at 02:32 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Assembly Language ashish anand Programming 9 10-18-2011 11:53 PM
assembly language ramorous24 Programming 4 08-22-2011 12:31 AM
assembly language! please help me! thanks in advance! topheraholic Programming 6 03-21-2011 03:35 PM
Is Assembly Language considered a Structured Language? theKbStockpiler Programming 4 01-30-2011 10:09 AM
SPARC assembly language jclark00001 Programming 3 02-26-2003 09:52 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:15 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration