Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Sep 14th, 2009, 7:18 AM   #1
(adovvl
Newbie
 
Join Date: Sep 2009
Posts: 6
Rep Power: 0 (adovvl is on a distinguished road
One promem...

I found one bash script. Can you tell me, what does it mean?

#!/bin/sh

DIR=$(mktemp -d)
mkdir -p ${DIR} 2>&1 > /dev/null
cat $0 |tail -n +11 |tar xz -C ${DIR}
cd ${DIR}/worm*
sh ./wormux.sh
cd -
rm -Rf ${DIR}
exit 0
(adovvl is offline   Reply With Quote
Old Sep 14th, 2009, 7:23 AM   #2
(adovvl
Newbie
 
Join Date: Sep 2009
Posts: 6
Rep Power: 0 (adovvl is on a distinguished road
Correction:

Especially this string:

cat $0 |tail -n +11 |tar xz -C ${DIR}
(adovvl is offline   Reply With Quote
Old Sep 29th, 2009, 8:11 PM   #3
mcnuggetz
Newbie
 
Join Date: Sep 2009
Posts: 3
Rep Power: 0 mcnuggetz is on a distinguished road
Re: One promem...

DIR=$(mktemp -d) -----------------> Setting the shell value for DIR to make a temp folder of unknown naming convention

mkdir -p ${DIR} 2>&1 > /dev/null -----------------> creates the temp folder while output is being sent to shell and nowhere

cat $0 |tail -n +11 |tar xz -C ${DIR} -----------------> input is being read 11 lines at a time while a tarball is being extracted into the folder created earlier for progress reading.

cd ${DIR}/worm* -----------------> temp subfolder traversed into worm* (probably wormux)

sh ./wormux.sh -----------------> the shell script "wormux.sh" is being executed.

cd - -----------------> attacker is moving up a directory in the filesystem
rm -Rf ${DIR} -----------------> attacker is deleting all temp files created
exit 0 -----------------> Indicates successful deletion of all temp files
mcnuggetz is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 10:56 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC