Windows를 재시작하다보면 내가 사용하던 프로그램이 자동 시작되었으면 하는 경우가 있는데
Chrome 브라우저의 경우 내가 사용하던 탭들이 자동으로 유지되지만 다른 프로그램들 같은 경우엔 그렇지 않다

그래서 찾아본 결과
아래처럼 시작프로그램에 내가사용하는 프로그램들을 등록해주면 된다
Drag & Drop!

윈도우 재부팅 후 아래 4개 프로그램들이 자동으로 실행되었다~
Chrome 은 말할것도 없이 내가 마지막에 사용하던 탭들 모두 유지되어 올라와 있었음


경로
C:\Users\사용자ID\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup


,

 

 

Server Security Guide


 

 

Idle time 설정 - 설정되있음

 

로그인 실패 횟수 제한 ( 계정 잠금 카운터 ) - 설정안되어있음

계정 잠금기간 (5) / 계정잠금 임계값 5/ 계정잠금 카운터 재설정 5

 

공유폴더 확인 ( ex. 프린터 공유 - 예시. \\ IP address \print$

 

1. Windows Server

1.1 Windows Update

Control Panel\All Control Panel\Windows Update

Check for updates > Install

* 비즈니스에 방해가 되는 경우를 제외한 최신 보안 패치는 즉시 설치되어야 함

 

 

 

 

1.2 Shared Folder

1.2.1 시스템 기본 공유폴더 제거

* IPS$는 서비스에 영향을 미칠 수 있으므로 삭제 전 검토가 필요함

방법 1. 컴퓨터 관리 설정 변경

Computer Management\System Tolls\Shared Folders\Shares

C$ / D$ / ADMIN$ Stop Sharing

* 서버 또는 서비스 재시작 시 재설정 필요함

 

방법2. Command 실행

cmd.exe

> net share

> netshare 공유 이름 /delete

* 서버 또는 서비스 재시작 시 재설정 필요함

>위 설정후에는 재부팅후에 설정이 원복됨 ( 레지스트리를 수정해줘야 원복되지 않음 )

 

 

방법3. 레지스트리 수정

*방법 1, 2은 서버 또는 서비스 재시작시 공유폴더가 활성화되어 재시작이 필요하나

레지스트리를 수정하면 시스템 재부팅 후 디폴트 폴더가 자동 공유되는 것 방지 가능함.

그러나 레지스트리 수정 방법은 IPC$를 포함한 모든 기본 공유 폴더 비활성화하므로

주의가 필요함

regedit.exe >

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanServer\Parameter

Value name : AutoShareServer

DataType : REG_DWORD

Value : 0 (Zero)

 

1.2.2 공유폴더 Everyone 권한 제한

Computer Management\System Tolls\Shared Folders\Shares

공유된 폴더의 Everyone 권한 Read Only 또는 Deny All

 

 

 

1.3 Remote Desktop

1.3.1 Drive redirection 비활성화

* 터미널 서버에서 로컬 드라이브 액세스 제한

방법 1. 레지스트리 수정

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Serivice

Value name : fDisableCdm

DataType : REG_DWORD

Value : 1

 

 

방법 2. 컴퓨터 구성 수정

gpedit.msc >

Computer Configuration\Policies\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Device and Resource Redirection\Do not allow drive redirection

Enabled: All drives

 

1.3.2 원격 접속 권한 제한 설정

방법 1. 컴퓨터 관리 수정

Computer Management\Local Users and Groups\Users

일반 User계정: Deny the user permissions to log on to Remote Desktop Session Host server

 

방법 2. 컴퓨터 구성 수정

gpedit.msc >

Computer Configuration\Policies\Windows Settings\Security Settings\Local Policies\User Rights Assignment\Allow log on through Remote Desktop Services

Administrators / (Remote Desktop Users)

 

 

 

 

 

1.3.3 Idle time 설정

방법 1. 레지스트리 수정

regedit.exe >

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services

Value name : MaxIdleTime

DataType : REG_DWORD

Value : 900000 (Dec)

 

 

방법 2. 컴퓨터 구성 수정

gpedit.msc

Computer Configuration\Policies\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Session Time Limits\Set time limit for active but idle Remote Desktop Services sessions

15 minutes

 

1.3.4 Plug & Play redirection리다이렉션 제한

* Plug & Play : 장치 자동 인식 기능

방법 1. 레지스트리 수정

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services

Value Name: fDisablePNPRedir
Type: REG_DWORD
Value: 1

 

방법 2. 컴퓨터 구성 수정

gpedit.msc >

Computer Configuration\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Device and Resource Redirection\Do not allow supported Plug and Play device redirection

Enabled

 

 

1.4 Drive

1.4.1 Autorun 비활성화

          * Autorun : autorun.inf라는 파일을 자동으로 읽어, 특정 프로그램을 자동으로 실행하는 기능

방법 1. 레지스트리 수정

regedit.exe >
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer

Value name : NoAutorun

DataType : REG_DWORD

Value : 1

              

           

방법 2. 컴퓨터 구성 수정

Computer Configuration\Administrative Templates\Windows Components\AutoPlay Policies\Set the default behavior for AutoRun

Enabled: Do not execute any autorun commands

 

 

1.4.2 Autoplay 비활성화

* Autoplay : 드라이브의 미디어를 읽어들여 자동으로 재생하는 기능

방법 1. 레지스트리 수정

regedit.exe >
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer

Value name : NoDriveTypeAutoRun

DataType : REG_DWORD

Value : FF

               

 

방법 2. 컴퓨터 구성 수정

gpedit.msc >

Computer Configuration\Administrative Templates\Windows Components\AutoPlay Policies\Turn off Autoplay

Enabled: All drives

1.5. Etc.

1.5.1 네트워크로부터의 접근 권한 제어

* 네트워크의 다른 사용자가 SMB / NetBIOS / CIFS / COM+ 등의 프로토콜에 접근할 수 있는 권한

설정

Computer Configuration\Policies\Windows Settings\Security Settings\Local Policies\User Rights Assignment\Access this computer from the network

Administrators / Authenticated Users / (ENTERPRISE DOMAIN CONTROLLERS)

1.5.2 불필요한 서비스 비활성화

* 서버의 기능에 따라 서비스 사용 여부 확실히 판단 후 disable

Control Panel\All Control Panel Items\Administrative Tools\Services

불필요한 Service 속성 > Startup type: disable

 

* 참고 : 오픈 포트 확인

CMD

Netstat -nao

 

* 대표적인 불필요한 서비스 ( 아래 서비스 사용 여부 확인 후 disable / 굵은 글씨 : 특히 주의 )

- File and printer sharing services (NetBIOS / NFS / FTP)

 - Wireless networking services

 - Remote control and remote access programs, particularly those that do not strongly encrypt their -communications (Telnet)

 - Directory services (LDAP, NIS)

- Web servers and services

- Email services (SMTP)

- Language compilers and libraries

 - System development tools

 - System and network management tools and utilities (SNMP)

 

 

 

 

 

 

 

 

 

2. 참고 문서

     - CIS Microsoft Windows Server 2012 R2 Benchmark (v2.2.1)

     - NIST Guide to General Server Security (Special Publication 800-123)

     - SANS Server Security Policy (2016)

,

가상 사설망(Virtual Private Network, VPN)

 인터넷을 이용하여 고비용의 사설망을 대체하는 효과를 얻기 위한 기술로 인터넷망과 같은 공중망을 사용하여 둘 이상의 네트워크를 안전하게 연결하기 위하여 가상의 터널을 만들고 암호화된 데이터를 전송할 수 있도록 구성된 네트워크

공중 네트워크를 통해 한 회사나 몇몇 단체가 내용을 바깥 사람에게 드러내지 않고 통신할 목적으로 쓰이는 사설 통신망이다. 


VPN은 알 수 없는 공중망을 거치는 연결을 통하지만 그안에서 소프트웨어적으로 가상의 회선을 직접 연결한 것과 같은 효과를 내는 것을 말한다.



사설망 ( Private Network )

특정한 회사나 조직이 소유하고 독점적으로 사용하는 네트워크를 의미


공중망 ( Public Network ) 

불특정 다수의 사용자에게 서비스를 제공하는 통신망으로 우리가 흔히 쓰고 있는 인터넷이 대표적인 공중망


VPN 터널링 프로토콜

VPN 연결 지점간에 오가는 데이터 패킷의 암호화, VPN 터널의 생성 및 관리, 그리고 암호화 키 관리를 수행

터널링 프로토콜은 데이터가 전송 네트워크를 통과할 수 있도록 하는 라우팅 정보를 포함한 헤더와 개인데이터를 캡슐화한다. 캡슐화된 프레임은 헤더에 추가되어 있는 라우팅 정보를 기반으로 인터넷과 같은 공중망을 경유하여 터널의 엔드포인트로 전송되고 목적지에 도달하면 디캡슐화 되어 최종 목적지로 향하게 된다.


VPN 터널링 프로토콜로는 PPTP(Point-to-Point Tunneling Protocol), L2TP(Layer 2 Tunneling Protocol), IPsec(IP Security) 등


Layer2
L2F(layer 2 Forwarding)
PPTP(Point-to-Point Tunneling Protocol)
L2TP(Layer 2 Tunneling Protocol)

Layer 3
IPSEC(Internet Protocol Security)
ATMP(Ascend Tunnel Management Protocol)
VTP(Virtual Tunneling Protocol)



  ㅇ 통신 계층에 따른 구분
     - Layer 2 (데이터링크 계층) 기반의 VPN 
        . CPE-VPN  :  PPTPL2TP 등
        . PP-VPN   :  MPLS 기반 (MPLS-VPN) 등

     - Layer 3 (네트워크계층) 기반의 VPN 
        . CPE-VPN  :  IPSec 등
        . PP-VPN   :  가상 라우터 기반 방식 등

     - Layer 5 (세션계층) 기반의 VPN 
        . CPE-VPN  :  SOCKv5 등

  ㅇ 터널링 프로토콜에 따른 구분
     - Layer 2 터널링 방식 (데이터링크 계층) :  PPTPL2TPMPLS 등
     - Layer 3 터널링 방식 (IP 계층)         :  IPSecGRE 등
     - Layer 4 터널링 방식 (전송 계층)       :  SSL/TLSSSHSOCKS v5 등



PPTP(Point-to-Point Tunneling Protocol)

PPTP는 PPP(Point-to-Point) 접속을 확장하여 원격 사용자와 사설망 사이의 보안 접속을 제공하는 Layer 2 터널링 프로토콜로 마이크로소프트, 3Com 등이 공동으로 제안

서버에 접속한 후 인증을 받으면 VPN 터널이 생성되고 이를 통해 VPN 연결이 가능해진다. 주로 외부에서 사내의 서버에 접속하기 위해 널리 이용되며 Microsoft Windows, 안드로이드 등 다양한 OS에서 기본적으로 제공


[ PPTP 프로토콜의 캡슐화 및 암호화 과정 ]

 PPTP 프로토콜의 캡슐화 및 암호화 과정을 나태낸다. 그림에서와 같이 터널링된 데이터에 대해서 PPTP 프로토콜은 수정된 버전의 GRE(Generic Routing Encapsulation)를 사용하여 PPP 프레임을 캡슐화하고 캡슐화된 PPP 프레임의 페이로드에 대해 암호화나 압축을 수행하게 된다. 이 때 PPP 프레임은 MS-CHAP v2 또는 EAP-TLS 인증 프로세스에서 생성된 암호화 키를 사용하여 MPPE(Microsoft Point-to-Point Encryption, Microsoft 지점 간 암호화)로 암호화할 수 있다. 사용자 인증은 PPP 인증을 이용한다.



L2TP (Layer 2 Tunneling Protcol)

L2TP는 Microsoft가 제안한 PPTP와 Cisco가 제안한 L2F(Layer 2 Forwarding) 프로토콜을 결합한 것으로 PPTP의 장점과 L2F의 장점을 하나로 모으자는 의도로 개발된 프로토콜이다. PPTP와는 달리 L2TP는 IP 네트워크(UTP/IP) 뿐만 아니라 IP 전송계층이 없는 WAN 구간에서도 사용이 가능하며 X25, 프레임 릴레이, ATM(Asynchronous Transfer Moder) 등 다양한 네트워크를 지원한다는 장점이 있다. PPTP에 비해서 L2TP는 다음과 같은 차이점을 갖는다.

PPTP는 IP기반의 네트워크만 지원하는 반면 L2TP는 패킷 중심의 지점간 연결이기만 하면 통신이 가능
PPTP는 두 지점 사이에 하나의 터널만 가능하지만 L2TP는 두 지점 사이에 여러개의 터널을 사용할 수 있으며 터널에 따른 QoS를 적용가능
PPTP와 달리 PPP 데이터 그램을 암호화하지 않으므로 암호화에는 IPsec(IP Security)를 사용하는데 이러한 L2TP와 IPsec의 조합을 L2TP/IPsec이라고 한다


IP 헤더
L2TP
L2TP 페이로드





L2TP/IPsec의 캡슐화는 L2TP 캡슐화와 IPsec 캡슐화의 두 단계로 구성









VPN의 핵심 구성요소
Security
authentication(인증)
Integrity(무결성)
encryption(암호화)

방법
DES (Data Encryption Standard) : CPU intensive
3DES
RC5
MPPE




















'Security > Network' 카테고리의 다른 글

[ Network ] MAC Flapping 현상  (0) 2016.10.25
,


게시판의 검색기능을 구현하는데 컬럼명을 선택하는 것이 아닌 

모든 컬럼에서 알아서 검색하길 원했다.


구현하기 위해서는 프로시저의 생성이 먼저 필요했다.


[ MSSQL SP 생성 ]

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
CREATE PROCEDURE sp_FindStringInTable @stringToFind VARCHAR(100), @schema sysname, @table sysname
AS
 
DECLARE @sqlCommand VARCHAR(8000)
DECLARE @where VARCHAR(8000)
DECLARE @columnName sysname
DECLARE @cursor VARCHAR(8000)
 
BEGIN TRY
   SET @sqlCommand = 'SELECT * FROM [' + @schema + '].[' + @table + '] WHERE'
   SET @where = ''
 
   SET @cursor = 'DECLARE col_cursor CURSOR FOR SELECT COLUMN_NAME
   FROM ' + DB_NAME() + '.INFORMATION_SCHEMA.COLUMNS
   WHERE TABLE_SCHEMA = ''' + @schema + '''
   AND TABLE_NAME = ''' + @table + '''
   AND DATA_TYPE IN (''char'',''nchar'',''ntext'',''nvarchar'',''text'',''varchar'')'
 
   EXEC (@cursor)
 
   OPEN col_cursor   
   FETCH NEXT FROM col_cursor INTO @columnName   
 
   WHILE @@FETCH_STATUS = 0   
   BEGIN   
       IF @where <> ''
           SET @where = @where + ' OR'
 
       SET @where = @where + ' [' + @columnName + '] LIKE ''' + @stringToFind + ''''
       FETCH NEXT FROM col_cursor INTO @columnName   
   END   
 
   CLOSE col_cursor   
   DEALLOCATE col_cursor 
 
   SET @sqlCommand = @sqlCommand + @where
   --PRINT @sqlCommand
   EXEC (@sqlCommand) 
END TRY
BEGIN CATCH
   PRINT 'There was an error. Check to make sure object exists.'
   IF CURSOR_STATUS('variable', 'col_cursor') <> -3
   BEGIN
       CLOSE col_cursor   
       DEALLOCATE col_cursor 
   END
END CATCH


[ 사용 방법 ]

1
2
3
4
5
-- " 를 값으로 가지고 있는 A_Table의 모든 row 찾기.
EXEC sp_FindStringInTable '%"%', 'dbo', 'A_Table'
 
 -- 2015로 시작하는 값을 가지고 있는 A_Table의 모든 row 찾기.
EXEC sp_FindStringInTable '2015%', 'dbo', 'A_Table'









'Programming > DB' 카테고리의 다른 글

[MYSQL] SubQuery 사용법  (0) 2016.06.16
,

1. 원본 내용

tablesorter 소개에 대해선 http://tablesorter.com/docs/에서 확인 가능.


2. 다운로드 

http://tablesorter.com/docs/#Download에서 다운로드


3. 사용하기

1) 헤더에 플러그인 포함하기

header.php

1
2
3
4
5
6
7
8
9
10
11
12
    <title>Security</title>
    <meta charset="utf-8">
 <script language="JavaScript" src="js/_jquery.tablesorter/jquery-latest.js"></script>
 <script language="JavaScript" src="js/_jquery.tablesorter/jquery.tablesorter.min.js"></script>
 <script language="JavaScript" src="js/_jquery.tablesorter/jquery.tablesorter.js"></script><link rel="stylesheet" href="../jquery-tablesorter/themes/blue/style.css" type="text/css">
<-- option -->
<link rel="stylesheet" href="../jquery-tablesorter/themes/green/style.css" type="text/css">
 
 
 
 
});


2) 테이블에 class 값 입력하기

class="tablesorter" 이 클래스명은 변경하면 안된다. ( 적용 안됨 )

index.php

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
   <table id="logtable" class="tablesorter">
    <thead>
        <tr>
            <th>ID</th>
            <th>Auth</th>
            <th>Date</th>
            <th>User</th>
            <th>Source IP</th>
            <th>Remote IP</th>
            <th>Level</th>
        </tr>
    </thead>
    <tbody>
      <tr>
            <td>ID</td>
            <td>Auth</td>
            <td>Date</td>
            <td>User</td>
            <td>Source </td>
            <td>Remote </td>
            <td>Level</td>
        </tr>
    </tbody>
</table>
});


3) 스크립트 실행하기

- 기본 실행 방법

main.js

1
2
3
$(function(){
    $("#logtable").tablesorter();
});


- 컬럼별 오름차순 내림차순 적용하기

sortList: [[0,1]] 의 경우 1번째 컬럼의 1: desc 내림차순 (5,4,3,2,1) 정렬한다는 의미

sortList: [[3,1],[5,0]] 의 경우 4번째 컬럼의 desc 내림차순 정렬 , 6번째 컬럼의 asc 오름차순 정렬한다는 의미

1
2
3
4
5
6
7
8
9
$(document).ready(function() {
    // call the tablesorter plugin
    $("#logtable").tablesorter({
        // sort on the first column, order asc [coulum num,asc=0 or desc=1]
        sortList: [[0,1]]
    });
});
 
});


4) 여러가지 데모 및 예제

데모 확인 하기  http://tablesorter.com/docs/#Demo  

예제 확인 하기 http://tablesorter.com/docs/#Examples 






'Programming > Script' 카테고리의 다른 글

[ CSS ] 네비게이션바 링크  (0) 2017.08.08
,