LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   shellcode=assembly language??? (https://www.linuxquestions.org/questions/linux-newbie-8/shellcode%3Dassembly-language-945951/)

mr.cracker 05-19-2012 11:10 PM

shellcode=assembly language???
 
Is shell-code is written in assembly language??

pixellany 05-19-2012 11:27 PM

To me, "assembly language" is a user-friendly way of describing the basic "machine language" that interfaces directly with the processor. SW that interacts at hardware level can ALSO be written in higher level languages, but assembly is usually faster and more efficient.

The shell is typically the iinteface to the kernel, and not directly to the hardware. Thus, would not be written in assembler.

You can get the source code for all of the common Linux shells and utilities---my guess is that most are written in C or a similar compiled language.

es0teric 05-20-2012 12:06 AM

No.

uhelp 05-20-2012 12:54 AM

Just to complicate things a bit more..

Kernel and most of basic tools are written in C
Some C source codes of the kernel use inline assembler too, not only C

Desktop Environments are usually written in C++
but some parts in C

mr.cracker 05-20-2012 01:14 AM

Quote:

Originally Posted by pixellany (Post 4682965)
To me, "assembly language" is a user-friendly way of describing the basic "machine language" that interfaces directly with the processor. SW that interacts at hardware level can ALSO be written in higher level languages, but assembly is usually faster and more efficient.

The shell is typically the iinteface to the kernel, and not directly to the hardware. Thus, would not be written in assembler.

You can get the source code for all of the common Linux shells and utilities---my guess is that most are written in C or a similar compiled language.

From u i got that shellcode has its own language??isn't it?
Can i write shellcode for windows,because my doubt is that the kernal exist in linux. And the shell also exist in linux. So does a shellcode is possible to write in windows???? how it is possible.from Where i can study it?

uhelp 05-20-2012 01:22 AM

Yes, you can write shell code in Windows.
Like in every language you can write it with your favorite editor.
There is nothing special.
Except you have to watch out for line endings.
Windows uses \r\n
Linux just \n
But this is easily done, as some tools are provided by each and every distro.


If you install "cygwin" on youre Windows box you can run shell scripts on your Windowsbox.
Cygwin is a kind of Linux on a Windows machine.

Nylex 05-20-2012 03:06 AM

Quote:

Originally Posted by mr.cracker (Post 4683006)
From u i got that shellcode has its own language??isn't it?
Can i write shellcode for windows,because my doubt is that the kernal exist in linux. And the shell also exist in linux. So does a shellcode is possible to write in windows???? how it is possible.from Where i can study it?

I think you're possibly using the wrong terminology. It isn't clear to me from your questions what you're asking about. What exactly do you mean by "shellcode"?

Also, please write your words out in full (i.e. "you", not "u") as per the LQ rules. There are also some typos in your post (e.g. "kernel", not "kernal").

mr.cracker 05-20-2012 03:54 AM

Quote:

Originally Posted by Nylex (Post 4683042)
I think you're possibly using the wrong terminology. It isn't clear to me from your questions what you're asking about. What exactly do you mean by "shellcode"?

Also, please write your words out in full (i.e. "you", not "u") as per the LQ rules. There are also some typos in your post (e.g. "kernel", not "kernal").

My question is that ,what is the language for build shellcode. If you know please tell me a site to study shellcode deeply.

mr.cracker 05-20-2012 03:56 AM

Quote:

Originally Posted by uhelp (Post 4683009)
Yes, you can write shell code in Windows.
Like in every language you can write it with your favorite editor.
There is nothing special.
Except you have to watch out for line endings.
Windows uses \r\n
Linux just \n
But this is easily done, as some tools are provided by each and every distro.


If you install "cygwin" on youre Windows box you can run shell scripts on your Windowsbox.
Cygwin is a kind of Linux on a Windows machine.

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?

Nylex 05-20-2012 04:02 AM

Quote:

Originally Posted by mr.cracker (Post 4683053)
My question is that ,what is the language for build shellcode. If you know please tell me a site to study shellcode deeply.

But what do you mean by "shellcode"?

catkin 05-20-2012 04:13 AM

Quote:

Originally Posted by mr.cracker (Post 4682959)
Is shell-code is written in assembly language??

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.

unSpawn 05-20-2012 05:29 AM

He's asking for the kind of Shellcode help a simple query like http://www.google.com/search?q=linux...al&btnG=Search would show. Note shellcode itself is a given so asking about it in general is no violation of the LQ Rules but asking for help with writing shellcode or help with delivering payloads would be. (Practically speaking this and this question is OK. This one is borderline and IMO this should never have been allowed to exist.)

pixellany 05-20-2012 07:26 AM

considering unSpawn's notes above, I think the OP needs to tell us exactly he is trying to do.....

brianL 05-20-2012 07:37 AM

Quote:

Originally Posted by pixellany (Post 4683104)
I think the OP needs to tell us exactly he is trying to do.....

Doesn't his username provide a clue?

pixellany 05-20-2012 07:52 AM

Quote:

Originally Posted by brianL (Post 4683109)
Doesn't his username provide a clue?

Indeed---also his posting history.....


All times are GMT -5. The time now is 05:51 PM.