Snort On Multiple NICs

snort 2012. 11. 9. 11:37 |

스노트 서버에 두개이상의 NIC를 모니터링해야 할때 리눅스의 bonding기능을 사용하여  하나의 sensor로 관리할 수 있다.


@@ eth1, eth2 를 묶는 상황


==master ifcfg추가

#vi /etc/sysconfig/network-scripts/ifcfg-bond0

DEVICE=bond0

ONBOOT=yes

USERCTL=no

#mac정보 등록하지말것


==slave가 될 ifcfg수정

#vi /etc/sysconfig/network-scripts/ifcfg-eth1

DEVICE=eth1

HWADDR=11:11:11:11:11:11

ONBOOT=yes

USERCTL=no

MASTER=bond0

SLAVE=yes

DHCP_HOSTNAME=localhost

TYPE=Ethernet


#vi /etc/sysconfig/network-scripts/ifcfg-eth2

DEVICE=eth2

HWADDR=11:11:11:11:11:12

ONBOOT=yes

USERCTL=no

MASTER=bond0

SLAVE=yes

DHCP_HOSTNAME=localhost

TYPE=Ethernet


==modprobe.conf 수정

#vi /etc/modprobe.conf

#아래추가

alias bond0 bonding

options bond0 mode=3 miimon=100


==모듈적재

#modprobe bonding


==모듈확인

#lsmod |grep bonding



네트워크 재시작

#service network restart


확인해보자

#ifconfig


bond0     Link encap:Ethernet  HWaddr ===

          UP BROADCAST RUNNING PROMISC MASTER MULTICAST  MTU:1500  Metric:1

          RX packets:3356331948 errors:0 dropped:1237 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:1833559479666 (1.6 TiB)  TX bytes:0 (0.0 b)


eth0      Link encap:Ethernet  HWaddr ===

          inet addr:192.168.25.238  Bcast:192.168.25.255  Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:109870 errors:0 dropped:0 overruns:0 frame:0

          TX packets:57559 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:10922558 (10.4 MiB)  TX bytes:46141080 (44.0 MiB)

          Interrupt:162 Memory:f4000000-f4012800


eth1      Link encap:Ethernet  HWaddr ===

          UP BROADCAST RUNNING PROMISC SLAVE MULTICAST  MTU:1500  Metric:1

          RX packets:2905684886 errors:0 dropped:1221 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:1732421175495 (1.5 TiB)  TX bytes:0 (0.0 b)

          Interrupt:170 Memory:f2000000-f2012800


eth2      Link encap:Ethernet  HWaddr ===

          UP BROADCAST RUNNING PROMISC SLAVE MULTICAST  MTU:1500  Metric:1

          RX packets:450647062 errors:0 dropped:16 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:101138304171 (94.1 GiB)  TX bytes:0 (0.0 b)

          Interrupt:178 Memory:f8000000-f8012800



##snort 시작옵션

snort -i bond0 ....

'snort' 카테고리의 다른 글

이벤트별 DB분류 저장  (0) 2013.01.12
Managing Snort Alerts  (0) 2013.01.11
snort 퍼포먼스 모니터링  (0) 2012.09.11
snort-sms연동(bash)  (0) 2012.04.19
snort 룰설정  (0) 2012.03.21
Posted by applicationlayer
:

hwp & javascript

vulnerability 2012. 10. 16. 00:56 |

출처: 한컴 공식 개발문서

스크립트 관련 설정:

1. 도구 -> 환경설정 -> 기타 -> 스크립트 실행 확인

2. 도구 -> 매크로 -> 스크립트 매크로 보안 설정

웹에서 hwp호출예제

<html>
 <script language="jscript">
  var App = new ActiveXObject("HWPFrame.HwpObject.1");  
  function OnChangeCharShape() {
   App.HAction.Run("SelectAll");
   App.HAction.GetDefault("CharShape"
     , App.HParameterSet.HCharShape.HSet);
   App.HParameterSet.HCharShape.FaceNameHangul = "궁서체";
   App.HParameterSet.HCharShape.FaceNameLatin = "궁서체";
   App.HParameterSet.HCharShape.FaceNameHanja = "궁서체";
   App.HParameterSet.HCharShape.FaceNameJapanese = "궁서체";
   App.HParameterSet.HCharShape.FaceNameOther = "궁서체";
   App.HParameterSet.HCharShape.FaceNameSymbol = "궁서체";
   App.HParameterSet.HCharShape.FaceNameUser = "궁서체";
   App.HParameterSet.HCharShape.Height = 4000;
   App.HParameterSet.HCharShape.TextColor = 16737792;
   App.HParameterSet.HCharShape.UnderlineType = 1;
   App.HParameterSet.HCharShape.ShadowType = 1;
   App.HAction.Execute("CharShape"
     , App.HParameterSet.HCharShape.HSet);
   App.HAction.Run("Cancel"); 
  }
 </script language="jscript">
 <body>
  <button onclick="OnChangeCharShape()">  글자 모양 변경 </button>
 </body>
</html>

 

'vulnerability' 카테고리의 다른 글

00410041 exploit  (0) 2013.05.09
web browser bug hunting  (0) 2013.02.27
GOM Player 2.1.33.5071 exploit  (0) 2011.12.09
CVE ID 받기  (0) 2011.03.31
LNK 파일 생성기(Windows LNK Vulnerability)  (1) 2010.07.27
Posted by applicationlayer
:

snort 퍼포먼스 모니터링

snort 2012. 9. 11. 19:21 |

#####스노트 perfmon 옵션실행#####################################

vim /etc/snort/snort.conf

주석제거

preprocessor perfmonitor: time 30 file /var/snort/snort.stats pktcnt 10000

디렉터리 생성

mkdir /var/snort/

스노트 재시작

###################################################################


#####munin설치 & 설정######################################################

rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm

yum -y install munin

yum -y install munin-node


vim /etc/munin/munin-node.conf

내용수정

  st_name snort;snort01          <-- 이름을 지정

  allow ^AAA\.AAA\.AAA\.AAA$  <-- 모니터링용 서버의 IP주소(AAA.AAA.AAA.AAA)


vim /etc/munin/munin.conf

내용추가

  [snort;snort01]

   address BBB.BBB.BBB.BBB   <-- 감시할 서버의 IP주소

    use_node_name yes


#########snort 관련 플러그인 등록 ###################################

ln -s /usr/share/munin/plugins/snort_* /etc/munin/plugins/


서비스 재시작

service httpd restart

service munin-node restart




'snort' 카테고리의 다른 글

Managing Snort Alerts  (0) 2013.01.11
Snort On Multiple NICs  (0) 2012.11.09
snort-sms연동(bash)  (0) 2012.04.19
snort 룰설정  (0) 2012.03.21
sguil 관련  (0) 2012.02.16
Posted by applicationlayer
:

AD환경에서 pc명 변경

windows 2012. 5. 19. 09:56 |

사용자 스스로 변경하는것 보다는 요청을 받으시면 

Netdom .exe 을 사용해서 원격에서 변경을 하는 것이

좋을 듯 합니다.

 

netdom renamecomputer 변경할 컴퓨터명 /newname:바뀔컴퓨터명

/userd:mydomain\administrator /passwordd:*

/usero:mydomain\administrator /passwordo:* /reboot:60

 

/reboot:60 : 60초후 자동으로 리부팅시킵니다.

 

usero,passwordo: 대상컴퓨터관리계정id,password 입력

userd,passwordd: 도메인관리자계정id,password 입력



'windows' 카테고리의 다른 글

ms access2013 암호화 알고리즘  (0) 2016.05.20
sccm관련  (0) 2013.09.05
윈도우 정품인증  (2) 2012.03.29
윈도 스크립트 자동실행  (0) 2012.01.10
"ActiveDirectory 사용자 및 컴퓨터"-dsa.msc 실행이 안될때 win2008  (0) 2012.01.03
Posted by applicationlayer
:

snort-sms연동(bash)

snort 2012. 4. 19. 11:17 |

crontab에 등록하여 1분에 한번씩 실행. 일반적인경우 이벤트 발생시 문자가 2번오게 되있지만 이벤트 개수나 시스템환경에 따라 스크립트 실행시간이 길어질경우를 고려해 조건을 느슨하게 설정하였다.

이벤트당 쿼리가 최대 8개가 들어감;; 생각 좀 더해보면 많이 줄일 수 있을거 같다.

#!/bin/bash 

for ( alert대상 sid범위)

do

sql0="select sig_name from signature where sig_sid='${sig_sid}';" sid조회하여 패턴명 추출

sig_name=`/mysql/bin/mysql -usnort snort -N -e "${sql0}"`

if [ -n "${sig_name}" ]

then

sql1="select sig_id from signature where sig_sid='${sig_sid}';" sig_id추출

sig_id=`/mysql/bin/mysql -usnort snort -N -e "${sql1}"`

sql2="select timestamp from event where signature='${sig_id}' order by cid desc limit 1;" 최신 이벤트발생 시간 추출

last_timestamp=`/mysql/bin/mysql -usnort snort -N -e "${sql2}"`

if [ -n "${last_timestamp}" ]

then

sql3="select floor(unix_timestamp(current_timestamp)-unix_timestamp('${last_timestamp}'));" 현재시간과 비교

time_range=`/mysql/bin/mysql -usnort snort -N -e "${sql3}"`

if [ ${time_range} -lt 90 ] 90초 이내 일경우 

then 문자메시지 내용을 만들자

echo "detected!" 

sql4="select cid from event where signature='${sig_id}' order by cid desc limit 1;"

cid=`/mysql/bin/mysql -usnort snort -N -e "${sql4}"`

sql5="select ip_src from iphdr where cid='${cid}';"

ip_src=`/mysql/bin/mysql -usnort snort -N -e "${sql5}"`

sql6="select ip_dst from iphdr where cid='${cid}';"

ip_dst=`/mysql/bin/mysql -usnort snort -N -e "${sql6}"`

sql7="select concat(inet_ntoa('${ip_src}'),'->',inet_ntoa('${ip_dst}'));"

msg_string=`/mysql/bin/mysql -usnort snort -N -e "${sql7}"`

echo " ${sig_name} : ${msg_string}"

SMS전송API "[SNORT][$sig_name]$msg_string"

fi

fi

fi

done

'snort' 카테고리의 다른 글

Snort On Multiple NICs  (0) 2012.11.09
snort 퍼포먼스 모니터링  (0) 2012.09.11
snort 룰설정  (0) 2012.03.21
sguil 관련  (0) 2012.02.16
snorby 설치  (0) 2012.02.14
Posted by applicationlayer
:

'programming > mysql' 카테고리의 다른 글

시작/종료  (0) 2012.04.10
mysql원격접근  (0) 2012.01.27
root비번을 잊어버렸을때..  (0) 2011.10.09
Posted by applicationlayer
:

시작/종료

programming/mysql 2012. 4. 10. 21:03 |

내꺼

루트에서

/mysql/bin/mysql_safe &

종료

/mysql/bin/mysqladmin shutdown -p


'programming > mysql' 카테고리의 다른 글

mysql table size 변경  (0) 2012.04.18
mysql원격접근  (0) 2012.01.27
root비번을 잊어버렸을때..  (0) 2011.10.09
Posted by applicationlayer
:

윈도우 정품인증

windows 2012. 3. 29. 18:47 |

허용

activation.sls.microsoft.com 443

65.52.98.231


go.microsoft.com 80

64.4.11.160



'windows' 카테고리의 다른 글

sccm관련  (0) 2013.09.05
AD환경에서 pc명 변경  (0) 2012.05.19
윈도 스크립트 자동실행  (0) 2012.01.10
"ActiveDirectory 사용자 및 컴퓨터"-dsa.msc 실행이 안될때 win2008  (0) 2012.01.03
자동실행 레지스트리 경로  (0) 2011.12.11
Posted by applicationlayer
:

snort 룰설정

snort 2012. 3. 21. 18:28 |

'snort' 카테고리의 다른 글

snort 퍼포먼스 모니터링  (0) 2012.09.11
snort-sms연동(bash)  (0) 2012.04.19
sguil 관련  (0) 2012.02.16
snorby 설치  (0) 2012.02.14
barnyard2 설치  (0) 2012.02.08
Posted by applicationlayer
:

sguil 관련

snort 2012. 2. 16. 10:00 |



mysql세팅
 mysql -u root -p -e "CREATE DATABASE sguildb"
 mysql -u root -p -D sguildb < /home/[user]/Desktop/sguild-0.7.0/server/sql_scripts/create_sguildb.sql
 mysql -u root -p -e "GRANT ALL PRIVILEGES ON sguildb.* TO sguil; FLUSH PRIVILEGES;


tcl설치
cd unix
./configure --disable-threads
 make
 sudo make install
 sudo rm /usr/bin/tclsh
 sudo rm /usr/bin/tclsh8.5
 sudo cp /usr/local/bin/tclsh8.5 /usr/bin/tclsh8.5
 sudo ln -s /usr/bin/tclsh8.5 /usr/bin/tclsh
 sudo ln -s /usr/bin/tclsh8.5 /usr/bin/tclsh-defaul

mysqltcl설치
./configure
make && make install

tls설치
./configure
make && make install

tclx설치
./configure
make && make install

tcllib설치
./configure
make && make install


sguil설치

sudo mkdir /etc/sguild
 sudo cp sguild.users sguild.conf sguild.queries sguild.access autocat.conf /etc/sguild
 sudo mkdir /etc/sguild/certs
 sudo rm ./sguild.conf
 sudo openssl req -new -x509 -nodes -out /etc/sguild/certs/sguild.pem -keyout /etc/sguild/certs/
sguild.pem -days 365
Country Name (2 letter code) [AU]:US
  State or Province Name (full name) [Some-State]:WV  
  Locality Name (eg, city) []:HUNTINGTON
  Organization Name (eg, company) [Internet Widgits Pty Ltd]:MU
  Organizational Unit Name (eg, section) []:CS       
Jacob!Bills! November!11,!2010!K!v1.0! P a  g  e !|!4  Common Name (eg, YOUR name) []:SRSLYNRDY
  Email Address []:NA
 sudo ln -s /etc/sguild/certs/sguild.pem /etc/sguild/certs/sguild.key
 sudo ./sguild -adduser sguil

 barnyard설치
 ./configure --with-mysql --with-tcl=/usr/local/lib
--with-tcl = tclConfig.sh가 있는 위치

실행시 lib를 찾을 수 없다는 메시지가 나오면 복사해서 넣어라

barnyard conf에서 접속 포트는 sguil이 아니라  snort_agent.tcl임 default : 7735
 http://www.grepler.com/articles/index/3243/mailing.unix.snort

'snort' 카테고리의 다른 글

snort-sms연동(bash)  (0) 2012.04.19
snort 룰설정  (0) 2012.03.21
snorby 설치  (0) 2012.02.14
barnyard2 설치  (0) 2012.02.08
Installing Sagan on CentOS  (0) 2012.02.01
Posted by applicationlayer
:

snorby 설치

snort 2012. 2. 14. 15:20 |
CentOS 5.5 기준
※설치 후 sensor가 올바르게 등록되려면 barnyard를 통해서 이벤트가 쌓여야 한다.

 

'snort' 카테고리의 다른 글

snort 룰설정  (0) 2012.03.21
sguil 관련  (0) 2012.02.16
barnyard2 설치  (0) 2012.02.08
Installing Sagan on CentOS  (0) 2012.02.01
snort 성능  (0) 2012.01.26
Posted by applicationlayer
:

barnyard2 설치

snort 2012. 2. 8. 15:03 |
#####snort.conf 설정변경##########################
두줄추가 (output부분)
#unified
output unified2: filename snort.log, limit 128

########barnyard2 설치(64bit기준)########################################
cd /root/
barnyard2.tar.gz복사
tar zxvf barnyard2-1.8.tar.gz
cd barnyard2-1.8
./configure --with-mysql-libraries=/usr/lib64/mysql/
make
make install
cp etc/barnyard2.conf /etc/snort/
mkdir /var/log/barnyard2
chmod 666 /var/log/barnyard2
touch /var/log/snort/barnyard2.waldo
chown snort:snort /var/log/snort/barnyard2.waldo

########barnyard2 수정#########################################
vi /etc/snort/barnyard2.conf
주석해제
config hostname:        locahost
config interface:       eth0
output database: log, mysql, user=snort password=ahslxj1234 dbname=snort host=localhost

########sid-msg.map최신화######################################
barnyard의 output은 이벤트명을 포함하지 않기 때문에 매칭파일을 사용해야한다.
안그러면 DB에 이벤트명이 제대로 박히지 않는다.

매핑파일 위치: /etc/snort/sid-msg.map

create-sidmap.pl 스크립트를 이용하면 최신룰로 매칭할 수 있다.(검색ㄱㄱ)


########실행#########################################
/usr/local/bin/barnyard2 -c /etc/snort/barnyard2.conf -d /var/log/snort -f snort.log -w /var/log/snort/barnyard2.waldo -D

참고:
http://gsxbinary.blogspot.com/2010/07/snort-barnyard2-mysql-base-intro.html
http://blog.nielshorn.net/2010/09/snort-barnyard2-base-complete-installation/

 

barnyard2 실행 전후 퍼포먼스 측정

 

 초당 로그기록량 증가

드롭률 감소


로그량이 많을땐 barnyard가 진리다

'snort' 카테고리의 다른 글

sguil 관련  (0) 2012.02.16
snorby 설치  (0) 2012.02.14
Installing Sagan on CentOS  (0) 2012.02.01
snort 성능  (0) 2012.01.26
Snort for Mac OS X  (0) 2011.01.02
Posted by applicationlayer
:

Installing Sagan on CentOS

snort 2012. 2. 1. 19:27 |
언제 짤릴지모르니까 퍼왔음
https://wiki.quadrantsec.com/bin/view/Main/SaganHOWTO 

 You need to add repositories for the libesmtp packages if needed. You can follow the tutorial to add the RPMForge and other repositories for YUM:

http://wiki.centos.org/AdditionalResources/Repositories/RPMForge?action=show&redirect=Repositories%2FRPMForge

Install the packages:
# yum install gcc gnutls-devel mysql mysql-devel mysql-client pcre pcre-devel libesmtp libesmtp-devel
[Note: The gnutls-devel are needed to compile libprelude if you want support for it during Sagan's install, if not you don't need them.]
In order not to confront a problem when building Sagan about mysqlclientl_r (Centos devel packages do not contain the headers necessary) You will need to download from MySQL site a mysql-shared-compat close to your database install version: http://downloads.mysql.com/archives/mysql-5.0/ or http://downloads.mysql.com/archives/mysql-5.1/
# yum info mysql     #  This will show your installed version
Example for MySQL-shared-compat-5.0.91-1.rhel5.i386.rpm :
# cd /tmp
# wget http://downloads.mysql.com/archives/mysql-5.0/MySQL-shared-compat-5.0.91-1.rhel5.i386.rpm
# yum localinstall MySQL-shared-compat-5.0.91-1.rhel5.i386.rpm
Now you can proceed to install libprelude if needed.

The libprelude from Atomic Corp repository libprelude-0.9.21.2-1.el5.art.i386.rpm will not satisfied Sagan's configuration buildup. You will need to download and build libprelude 1.0.0 from their site:
# cd /tmp
# wget http://www.prelude-technologies.com/download/releases/libprelude/libprelude-1.0.0.tar.gz
# tar xvfz libprelude-1.0.0.tar.gz
# cd /libprelude-1.0.0
# ./configure & make && make install
Now install Sagan as per documentation. [ SaganHOWTO ] 

[Note: Remember to use: ./configure --disable-postgresql to install Sagan if you don't need support for PostgreSQL or you will need to install it.]
-- ChampClark - 2010-11-18

'snort' 카테고리의 다른 글

snorby 설치  (0) 2012.02.14
barnyard2 설치  (0) 2012.02.08
snort 성능  (0) 2012.01.26
Snort for Mac OS X  (0) 2011.01.02
간단하게 이벤트 확인  (0) 2010.05.25
Posted by applicationlayer
:

mysql원격접근

programming/mysql 2012. 1. 27. 17:57 |

'programming > mysql' 카테고리의 다른 글

mysql table size 변경  (0) 2012.04.18
시작/종료  (0) 2012.04.10
root비번을 잊어버렸을때..  (0) 2011.10.09
Posted by applicationlayer
:

snort 성능

snort 2012. 1. 26. 20:52 |
유료 드라이버 
http://www.ntop.org/solutions/idsips-acceleration-snort-suricata-bro/  

PF_RING를 이용한 inline테스트
http://www.snort.org/assets/186/PF_RING_Snort_Inline_Instructions.pdf  

드라이버별 성능치 비교
http://mikelococo.com/files/2011/2011_01_25-snort_performance.pdf

snort vs Suricata
suricata멀티코어 지원, 단일코어시 snort대비 1/4성능, snort so룰 지원X
http://mikelococo.com/2011/08/snort-capacity-planning/  

'snort' 카테고리의 다른 글

barnyard2 설치  (0) 2012.02.08
Installing Sagan on CentOS  (0) 2012.02.01
Snort for Mac OS X  (0) 2011.01.02
간단하게 이벤트 확인  (0) 2010.05.25
스노트 구축  (0) 2010.03.14
Posted by applicationlayer
:
Windows 2000 및 XP에서 그룹 정책 스크립트 배포를위한 두 가지 옵션을 포함합니다 : 
Scripts (Startup/Shutdown): 스크립트 (시작 / 종료) : 
In the Group policy console (gpedit.msc) under 'Computer Configuration\Windows Settings', you can specify scripts that are to run when the computer starts up or shuts down. '컴퓨터 구성 \ Windows 설정'아래의 그룹 정책 콘솔 (gpedit.msc를)에서는 컴퓨터가 시작하거나 종료할 때 실행할 수있는 스크립트를 지정할 수 있습니다. Note: These scripts under Local System account. 참고 : 로컬 시스템 계정에서 이러한 스크립트. 

Scripts (Logon/Logoff): 스크립트 (로그온 / 로그오프) : 
In the Group policy console (gpedit.msc) under 'User Configuration\Windows Settings', you can specify scripts that are to run when the user logs on or logs off the computer. '사용자 구성 \ Windows 설정'아래의 그룹 정책 콘솔 (gpedit.msc를)에서는 사용자가 로그온하거나 컴퓨터 로그오프할 때 실행할 수있는 스크립트를 지정할 수 있습니다. These scripts run as User, not as Administrator. 이러한 스크립트는되지 관리자로, 사용자로 실행합니다. 


출처:
http://translate.google.co.kr/translate?hl=ko&langpair=en%7Cko&u=http://techsupt.winbatch.com/ts/T000001048F90.html
 

'windows' 카테고리의 다른 글

AD환경에서 pc명 변경  (0) 2012.05.19
윈도우 정품인증  (2) 2012.03.29
"ActiveDirectory 사용자 및 컴퓨터"-dsa.msc 실행이 안될때 win2008  (0) 2012.01.03
자동실행 레지스트리 경로  (0) 2011.12.11
IMAGE_THUNK_DATA32  (0) 2010.05.24
Posted by applicationlayer
:
<?eval($_REQUEST[c])?> 

최근에 발견하는 웹쉘은 거의 다 한줄짜리고 사용하는 함수는 eval뿐이다. 한동안 웹쉘이 종합선물세트마냥 많은 기능을 포함했다면 요즘엔 그런 기능들을 클라이언트에서 처리하는듯하다.
장단점이 있을거다 전자는 ids에서 탐지하기 어렵고 후자는 서버진단시에 발견하기 어렵다
당장에 eval함수를 제한하면 이런 방식의 웹쉘에서 안전할 수 있다. 그런데 eval을 대신할 수 있는 함수는 많다. 

'webhxxx > webshell' 카테고리의 다른 글

w3af asp webshell[수정]  (0) 2010.01.21
Posted by applicationlayer
:

윈도우를 재부팅한다-_-


'windows' 카테고리의 다른 글

윈도우 정품인증  (2) 2012.03.29
윈도 스크립트 자동실행  (0) 2012.01.10
자동실행 레지스트리 경로  (0) 2011.12.11
IMAGE_THUNK_DATA32  (0) 2010.05.24
Windows Data Types  (0) 2010.05.24
Posted by applicationlayer
:

이 멍청이들

카테고리 없음 2011. 12. 27. 18:52 |
;
Posted by applicationlayer
:
HKLM\Software\Microsoft\Windows\CurrentVersion\Run
HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce
HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnceEx
HKLM\Software\Microsoft\Windows\CurrentVersion\RunServices
HKLM\Software\Microsoft\Windows\CurrentVersion\RunServicesOnce
HKLM\Software\Microsoft\Windows\CurrentVersion\Windows\Load
HKLM\Software\Microsoft\Windows\CurrentVersion\Windows\Run
HKLM\Software\Microsoft\Windows\CurrentVersion\Winlogon\Userinit
HKCU\Software\Microsoft\Windows\CurrentVersion\Run
HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce
HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnceEx
HKCU\Software\Microsoft\Windows\CurrentVersion\RunServicesOnce

'windows' 카테고리의 다른 글

윈도 스크립트 자동실행  (0) 2012.01.10
"ActiveDirectory 사용자 및 컴퓨터"-dsa.msc 실행이 안될때 win2008  (0) 2012.01.03
IMAGE_THUNK_DATA32  (0) 2010.05.24
Windows Data Types  (0) 2010.05.24
PIMAGE_IMPORT_DESCRIPTOR  (0) 2010.05.24
Posted by applicationlayer
:
오랫만에 익스플로잇 분석을 해보려는데 exploit-db에 공개된 코드는 한글윈도우에서 실행되지 않는다. 익스플로잇이 실행되려면 메모리에 D9005700이 정확하게 박혀야한다. (eip의 값이되므로)
 
한글판에서는 이데이터가 메모리에 박힐때 변형된다. D9005700->3F00 이였던걸로 기억한다. 데이터가 문자의 범위가 아니어서 그런듯. 변형안되는걸로 바꿔보려고 0x00XX00XX 주소의 데이터중 FFD5(call ebp)를 찾아봤는데 없ㅋ엉ㅋ (하나 더 있긴한데 그것도 변형됨) 포기 ㅡ_ㅜ 한글판에서 먹히는 익스플로잇이 없다면 국내 영향은 많지 않겠네

'vulnerability' 카테고리의 다른 글

web browser bug hunting  (0) 2013.02.27
hwp & javascript  (0) 2012.10.16
CVE ID 받기  (0) 2011.03.31
LNK 파일 생성기(Windows LNK Vulnerability)  (1) 2010.07.27
html file upload form  (0) 2010.06.24
Posted by applicationlayer
:


 남은것 룰백업, 롤백기능 

'webhxxx > 연구과제' 카테고리의 다른 글

111121_진행상황  (0) 2011.11.21
input 자동완성 방지  (0) 2011.11.21
111117_진행상황 (webknight console)  (0) 2011.11.18
111106_진행상황 (webknight console)  (0) 2011.11.06
111102bugfix  (0) 2011.11.02
Posted by applicationlayer
:
summary메뉴 추가할 것들

total event - table chart의 bar로 표현

system event 또는 log
date/time - level - description
 

'webhxxx > 연구과제' 카테고리의 다른 글

111125_진행상황 (WebKnight Console)  (2) 2011.11.25
input 자동완성 방지  (0) 2011.11.21
111117_진행상황 (webknight console)  (0) 2011.11.18
111106_진행상황 (webknight console)  (0) 2011.11.06
111102bugfix  (0) 2011.11.02
Posted by applicationlayer
:
이거  안쓰면 짜증난다.
<form autocomplete="off">

'webhxxx > 연구과제' 카테고리의 다른 글

111125_진행상황 (WebKnight Console)  (2) 2011.11.25
111121_진행상황  (0) 2011.11.21
111117_진행상황 (webknight console)  (0) 2011.11.18
111106_진행상황 (webknight console)  (0) 2011.11.06
111102bugfix  (0) 2011.11.02
Posted by applicationlayer
:
서버에 webknight로그가 쌓이면 자동으로 메일일 뿌려주는 에이전트 개발
-> 모니터링 중이 아니더라도 메일을 통해 이벤트확인이 가능

주요함수 
FindFirstChangeNotification
FindNextChangeNotification
WaitForMultipleObjects



 // agent.cpp : Defines the entry point for the console application.
//

#include <windows.h>
#include <stdlib.h>
#include <stdio.h>
#include <tchar.h>
#include <Wininet.h>

int _tmain(int argc, _TCHAR* argv[])
{
HANDLE dwChangeHandles[1];
DWORD dwWaitStatus; 
HINTERNET hInternet;
HINTERNET hURL;
HINTERNET hRequest;
BOOL bRet;

dwChangeHandles[0] = FindFirstChangeNotification(L"C:\\Program Files\\AQTRONIX Webknight\\LogFiles",TRUE,FILE_NOTIFY_CHANGE_SIZE);

if(dwChangeHandles[0] == INVALID_HANDLE_VALUE)
{
printf("\nerror: unexpected null from findfirstchangenotification.\n");
ExitProcess(GetLastError());
}
if(dwChangeHandles[0] == NULL)
{
 printf("\n ERROR: Unexpected NULL from FindFirstChangeNotification.\n");
 ExitProcess(GetLastError());
}
while(TRUE)
{
printf("\nWaiting for notification...\n");
dwWaitStatus = WaitForMultipleObjects(1,dwChangeHandles,FALSE,INFINITE); 
    switch (dwWaitStatus)
    {
      case WAIT_OBJECT_0:
            printf("\nchange log size\n");

hInternet = InternetOpen(L"WebKnightConsoleAgent",INTERNET_OPEN_TYPE_DIRECT,NULL,NULL,0);
hURL = InternetConnect(hInternet,L"192.168.230.130",80,L"",L"",INTERNET_SERVICE_HTTP,0,0);
hRequest = HttpOpenRequest(hURL,L"GET",L"/LogAnalysis.php?no=1&mail=1",NULL,NULL,NULL,0,0);

bRet = HttpSendRequest(hRequest,NULL,0,NULL,0);
            if ( FindNextChangeNotification(dwChangeHandles[0]) == FALSE )
            {
               printf("\n ERROR: FindNextChangeNotification function failed.\n");
               ExitProcess(GetLastError()); 
            }
            break; 
      case WAIT_TIMEOUT:
            printf("\nNo changes in the timeout period.\n");
            break;
      default: 
            printf("\n ERROR: Unhandled dwWaitStatus.\n");
            ExitProcess(GetLastError());
            break;
    }
  }





return 0;
}

'webhxxx > 연구과제' 카테고리의 다른 글

111121_진행상황  (0) 2011.11.21
input 자동완성 방지  (0) 2011.11.21
111106_진행상황 (webknight console)  (0) 2011.11.06
111102bugfix  (0) 2011.11.02
dynamic gauge(google chart) for snmp  (0) 2011.11.01
Posted by applicationlayer
:



구글차트는 인터넷 익스플로러에서 돌아가기는하나 그래픽이 부드럽지 않게 보이고 상대적으로 버벅인다. 역시 크롬에서 가장 매끄러운 화면을 보여준다.

구글 게이지차트와 윈도우snmp를 연동하는 작업을 했는데 상당히 애를 먹었다. 결국에 정석대로 코딩을 하면 문제없는 것인데 인터넷에는 꼼수가 너무 많이 나온다. 그리고 서적도 이런부분에 대해서 정확하게 언급하지 않는다. 웹프로그래밍 자체가 문법에 많이 관대하다보니 이런 문제가 생기는듯

남은것
[완료]서버 cpu,mem,traffic체크기능
[완료]구글맵 마커 디자인 - 그냥 구글꺼쓰기로.. 귀찮다
윈도우서버 에이전트
webknight conf 리스트박스 콤보박스 관련 기능
각 서버로그 통계
[완료]서버 추가 ui
[완료]서버 삭제 기능
Additional info클릭시 전문 출력



'webhxxx > 연구과제' 카테고리의 다른 글

input 자동완성 방지  (0) 2011.11.21
111117_진행상황 (webknight console)  (0) 2011.11.18
111102bugfix  (0) 2011.11.02
dynamic gauge(google chart) for snmp  (0) 2011.11.01
111031_진행상황 (webknight console)  (0) 2011.10.31
Posted by applicationlayer
:

111102bugfix

webhxxx/연구과제 2011. 11. 2. 12:38 |
Loganalysis.php
날짜 증가시 한자리일 경우 0을 붙여 두자리수로 수정
Posted by applicationlayer
:

구글에서 제공하는 게이지차트를 사용해서 원격 서버의 트래픽을 그래프로 출력할 수 있다.
위 소스는 인터넷검색을 통해 받았으며 랜덤함수를 사용하여 그래프가 동적으로 변한다. 이부분만 수정하면 된다.
예)
  setInterval(function() {
    data.setValue(0, 1, Number(getHttprequest('snmpproc.php?id=cpu&snmpserver=<?=$servername?>')));
    chart.draw(data, options);
  }, 10000);
  setInterval(function() {
    data.setValue(1, 1,Number(getHttprequest('snmpproc.php?id=network&snmpserver=<?=$servername?>')));
    chart.draw(data, options);
  }, 10000);
  setInterval(function() {
    data.setValue(2, 1,Number(getHttprequest('snmpproc.php?id=tcp&snmpserver=<?=$servername?>')));
    chart.draw(data, options);
  }, 10000);
  setInterval(function() {
    data.setValue(3, 1,Number(getHttprequest('snmpproc.php?id=udp&snmpserver=<?=$servername?>')));
    chart.draw(data, options);
  }, 10000);


snmpproc.php예)
<?php
$id=$_GET[id];
$snmpserver=$_GET[snmpserver];
if($id=='cpu'){
        $snmparr = snmpwalk("$snmpserver","public",".1.3.6.1.2.1.25.3.3.1.2");
        $rt = explode(': ',$snmparr[0]);
        echo $rt[1];
}



php에서 snmp관련함수를 사용하기 위해서 snmp를 설치해한다.

yum -y install snmp*
yum -y install php-snmp*

snmp데몬을 실행, apache재시작





snmp관련 자료)
total memory
.1.3.6.1.2.1.25.2.2.0

cpu load
.1.3.6.1.2.1.25.3.3.1.2

snmp관련
http://www.4te.co.kr/91
http://www.chonnom.com/bbs/board.php?bo_table=B19&wr_id=84&page=7
http://www.chonnom.com/bbs/board.php?bo_table=B20&wr_id=115

http://www.nanha.com/index.php?p=b/view&n=776&b=dft

'webhxxx > 연구과제' 카테고리의 다른 글

111106_진행상황 (webknight console)  (0) 2011.11.06
111102bugfix  (0) 2011.11.02
111031_진행상황 (webknight console)  (0) 2011.10.31
IE와 chrome의 차이  (0) 2011.10.31
차트라이브러리  (0) 2011.10.26
Posted by applicationlayer
:

google chart가 IE에서 제대로 보이지 않아 앞으로 chrome을 기준으로 테스트하기로 했다.ㅠ

conf ui 의 체크박스, 텍스트박스는 변경시 xmlhttprequest를 사용하여 변경시키므로 화면이 리플레쉬 되지 않는다 . 리스트박스까지 깔끔하게 적용하려면 ajax를 좀 공부해야할듯




남은것
서버 cpu,mem,traffic체크기능
구글맵 마커 디자인
윈도우서버 에이전트
webknight conf 리스트박스 콤보박스 관련 기능
각 서버로그 통계
서버 추가 ui
서버 삭제 기능

'webhxxx > 연구과제' 카테고리의 다른 글

111102bugfix  (0) 2011.11.02
dynamic gauge(google chart) for snmp  (0) 2011.11.01
IE와 chrome의 차이  (0) 2011.10.31
차트라이브러리  (0) 2011.10.26
지정폴더 감시 API  (0) 2011.10.25
Posted by applicationlayer
:
객체에 접근할때 ie와 chrome의 차이점
ie는 문자열만으로 객체를 지정할 수 있는반면 크롭에서는 함수를 이용한 검색을 통해 가능

예)
<html>
<script>
function XmlSave(InputName,bb,cc)
{
msg = "DEBUG Message:xmlsave function." + InputName.name + "-" + InputName.checked;

alert(msg);
}
</script>
<body>
<input name="Scanning" type="checkbox" onclick="XmlSave(Scanning,'192.168.230.128','8080')" >

IE에서는 실행됨 chrome에서는 실행안됨

아래처럼 사용하면된다
XmlSave(this,'192.168.230.128','8080')" >
 
자신이 아닌 다른 객체에 접근할때는 this를 이용할 수 없는데 그땐 아래 사이트에서 참고하자
http://www.mungchung.com/xe/4197

처음부터 크롬으로 테스트할걸 그랬어 ㅠㅠㅠ

'webhxxx > 연구과제' 카테고리의 다른 글

dynamic gauge(google chart) for snmp  (0) 2011.11.01
111031_진행상황 (webknight console)  (0) 2011.10.31
차트라이브러리  (0) 2011.10.26
지정폴더 감시 API  (0) 2011.10.25
진행상황_111024  (0) 2011.10.24
Posted by applicationlayer
: