'Useful' 카테고리의 다른 글
[Useful] iherb 추천코드 (0) | 2018.02.27 |
---|---|
[ Tip ] 카드사 고객센터 직통 연결 (0) | 2018.01.25 |
[ Useful ] 신용카드 발급으로 현금 페이백 받는 방법 (1) | 2017.12.11 |
[Useful] iherb 추천코드 (0) | 2018.02.27 |
---|---|
[ Tip ] 카드사 고객센터 직통 연결 (0) | 2018.01.25 |
[ Useful ] 신용카드 발급으로 현금 페이백 받는 방법 (1) | 2017.12.11 |
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 |
방법 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)
[ Windows ] Powershell 명령어 (0) | 2017.07.05 |
---|---|
[ Windows ] Powershell memory monitoring (0) | 2017.07.04 |
[ Virus ] 바이러스 백신 표준 순위확인하기 (0) | 2017.06.29 |
[Server-Windows] ERROR 원인 : Set-ExecutionPolicy : Windows PowerShell updated your execution policy successfully, but the setting is overridden by a policy defined at a more specific scope. (0) | 2017.02.21 |
[서버] 메일서버 MX 레코드 / Relay 대해 (미완성) (0) | 2016.03.08 |
가상 사설망(Virtual Private Network, VPN)
인터넷을 이용하여 고비용의 사설망을 대체하는 효과를 얻기 위한 기술로 인터넷망과 같은 공중망을 사용하여 둘 이상의 네트워크를 안전하게 연결하기 위하여 가상의 터널을 만들고 암호화된 데이터를 전송할 수 있도록 구성된 네트워크
공중 네트워크를 통해 한 회사나 몇몇 단체가 내용을 바깥 사람에게 드러내지 않고 통신할 목적으로 쓰이는 사설 통신망이다.
사설망 ( Private Network )
특정한 회사나 조직이 소유하고 독점적으로 사용하는 네트워크를 의미
공중망 ( Public Network )
불특정 다수의 사용자에게 서비스를 제공하는 통신망으로 우리가 흔히 쓰고 있는 인터넷이 대표적인 공중망
VPN 연결 지점간에 오가는 데이터 패킷의 암호화, VPN 터널의 생성 및 관리, 그리고 암호화 키 관리를 수행
터널링 프로토콜은 데이터가 전송 네트워크를 통과할 수 있도록 하는 라우팅 정보를 포함한 헤더와 개인데이터를 캡슐화한다. 캡슐화된 프레임은 헤더에 추가되어 있는 라우팅 정보를 기반으로 인터넷과 같은 공중망을 경유하여 터널의 엔드포인트로 전송되고 목적지에 도달하면 디캡슐화 되어 최종 목적지로 향하게 된다.
VPN 터널링 프로토콜로는 PPTP(Point-to-Point Tunneling Protocol), L2TP(Layer 2 Tunneling Protocol), IPsec(IP Security) 등
PPTP는 PPP(Point-to-Point) 접속을 확장하여 원격 사용자와 사설망 사이의 보안 접속을 제공하는 Layer 2 터널링 프로토콜로 마이크로소프트, 3Com 등이 공동으로 제안
서버에 접속한 후 인증을 받으면 VPN 터널이 생성되고 이를 통해 VPN 연결이 가능해진다. 주로 외부에서 사내의 서버에 접속하기 위해 널리 이용되며 Microsoft Windows, 안드로이드 등 다양한 OS에서 기본적으로 제공
IP 헤더 | L2TP | L2TP 페이로드 |
[ 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' |
[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
[ CSS ] 네비게이션바 링크 (0) | 2017.08.08 |
---|