반응형

출처: https://blog.thesysadmins.co.uk/winrm-winrs-and-forwarded-event-logs.html



This post should give you a quick understanding of WinRM, WinRS, forwarding event logs and when you’re likely to see the 0x80338126 error.

WinRM (Windows Remote Management) is Microsoft’s new remote management which allows remote management of Windows machines. It was introduced in Server 2003 R2, but I didn’t really hear much about it until Server 2008.

WinRM is the ‘server’ component and WinRS is the ‘client’ that can remotely manage the machine with WinRM configured.

Differences you should be aware of:

WinRM 1.1
Vista and Server 2008
Port 80 for HTTP and Port 443 for HTTPS

WinRM 2.0
Windows 7 and Server 2008 R2
Port 5985 for HTTP and Port 5986 for HTTPS

WinRM 1.1 can also be downloaded and installed on pre-R2 2003 and XP from here.


WinRM

To enable WinRM head to the command prompt and type winrm qc or winrm quickconfig this does the following:

Performs configuration actions to enable this machine for remote management.
Includes:
1. Start the WinRM service
2. Set the WinRM service type to auto start
3. Create a listener to accept request on any IP address
4. Enable firewall exception for WS-Management traffic (for http only)

It’ll ask you if you want to make these changes, type ‘y’ and press enter.

To verify a listener has been created type winrm enumerate winrm/config/listener

WinRM Client Setup

Just to round off this quick introduction to WinRM, to delete a listener use winrm delete winrm/config/listener?address=*+Transport=HTTP

WinRS

WinRS (Windows Remote Shell) is the client that connects to a WinRM configured machine (as seen in the first part of this post). WinRS is pretty handy, you’ve probably used PSTools or SC for similar things in the past. Here are a few examples of what you do.

Connecting to a remote shell
winrs -r:http://hostnameofclient "cmd"
Stop / Starting remote service
winrs -r:http://hostnameofclient "net start/stop spooler"
Do a Dir on the C drive
winrs -r:http://hostnameofclient "dir c:\"

WinRS

Forwarded Event Logs

This is configured using ‘subscribers’, which connect to WinRM enabled machines.

To configure these subscribers head over to event viewer, right click on forwarded events and select properties. Select the 2nd tab along subscriptions and press create.

This is where you’ll select the WinRM enabled machine and choose which events you would like forwarded.

Subscriptions

Right click the subscription and select show runtime status.

Error 0x80338126

Now it took me a minute or two to figure this one out. Was it a firewall issue (this gives the same error code), did I miss some configuration steps? Well no, it was something a lot more basic than that. Remember earlier on we were talking about the port changes in WinRM 1.1 to 2.0?

That’s right, I was using server 2008 R2 to set the subscriptions which automatically sets the port to 5985. The client I configured initially was server 2008 so uses version 1.1. If you right click the subscription and click properties -> advanced you’ll be able to see this. I changed this to port 80 and checked the runtime status again.

[DC2.domain.local] – Error – Last retry time: 03/02/2011 20:20:30. Code (0x5): Access is denied. Next retry time: 03/02/2011 20:25:30.”

Head back to the advanced settings and change the user account from machine account to a user with administrative rights. After making these changes the forwarded events started to flow.

Subscriptions Advanced

반응형

'IT기술 관련 > 윈도우' 카테고리의 다른 글

NTLM 위험 요소  (0) 2017.11.16
NTLM VS Kerberos 인증  (0) 2017.11.16
NFS,CIFS 차이점  (2) 2017.09.20
WinRM 관련 보안 이슈 확인 및 보안 조치 방안  (0) 2017.09.12
Winrm 보안설정 관련 자료  (0) 2017.09.11
반응형

출처: http://blog.naver.com/PostView.nhn?blogId=marso219&logNo=220864314457&parentCategoryNo=&categoryNo=14&viewDate=&isShowPopularPosts=false&from=postView



SMB


NFS는 파일시스템을 제공해주는 서버와 서버의 파일시스템을 이용하는 클라이언트의 협동작업으로 이루어진다. 



윈도우시스템이 다른 시스템의 디스크나 프린터와 같은 자원을 공유할 수 있도록 하기 위해 개발된 프로토콜.


TCP/IP 기반하의 Netbios 프로토콜을 이용하기 때문에 이 프로토콜은 NFS, NIS, lpd 와 같은 유닉스의 분산인증구조와 유사.


따라서 윈도우 중심의 


------------------------------------------------------------------------------------------------------------------

CIFS 란? 


Common interest File System


네트워크를 위한 SMB 파일 공유 프토콜의 확장된 버전.


윈도우와 유닉스 환경을 동시에 지원하는 인터넷의 표준 파일 규악의 프로토콜이다.


CIFS는 이전의 폐쇄적인 SMB프로토콜 과는 달리 CIFS 규약 정의는 여러 유닉스 업체의 참여하여 결정된 내용이기 때문에 

삼바도 버전이 올라감에 따라 CIFS규약을 잘 준수하여 안정성이 향상...


------------------------------------------------------------------------------------------------------------------


*중요*


Windows 파일서버는 CIFS(Common Internet File System)을 사용해서 클라이언트에 스토리지를 공유합니다. 

흔히 PC의 윈도우 탐색기에서 오른쪽 마우스->속성->공유로 해당 폴더를 공유하고, 


다른 PC에서 네트워크 드라이브 연결로 상대방 PC의 스토리지를 원격 접속하는 것이 

바로 그것입니다. 


Unix나 Linux에서는 CIFS가 아니라 NFS(Network File System)을 사용합니다. Unix/Linux 파일서버의 로컬 파일시스템을 

NFS로 export하고 클라이언트에서 이것을 NFS mount하여 사용하는 것이지요. 


CIFS or NFS의 프로토콜만 차이가 있고 기본적인 개념은 동일합니다. 

모두 일반 IP 네트워크를 사용하지요. 


반응형
반응형

출처: http://dreamlog.tistory.com/246 [꿈꾸는 사람.]


우분투를 사용하다 패스워드를 잊어버렸을 경우가 있다.

우분투 시스템을 힘들게 설치했는데 막상 사용하려니 패스워드가 생각나지 않을 때도 있다.

또는 가상 머신으로 여러 우분투를 사용하다 보니 패스워드가 맞지 않기도 한다.

가장 위험한 것은 많은 데이터를 가진 우분투를 설치한 컴퓨터의 패스워드를 잊어 버렸을 때다.


자, 우분투의 패스워드를 잊어버렸을 경우 초기화 하는 방법을 알아보자.



우분투 패스워드 초기화 방법.

요약.

1. 재 부팅하여 GRUB 부트 로더의 복구 모드(recovery mode)를 선택한다.

2. 복구 모드에서 root 항목을 선택한다.

3. 읽기 전용으로 설정된 파일 시스템을 '읽기쓰기' 상태로 전환한다.

4. 루트 계정의 패스워드를 초기화한다. 


1. GRUB 부트 로더의 복구 모드 진입.

단일 부트 상태(우분투만 설치한 경우)라면 부팅 중 [shift] 키를 누르고 있어야 한다.

다중 부트 상태(우분투 외 하나 이상의 다른 운영체제를 추가로 설치한 경우)면 GRUB 부트 메뉴가 바로 표시된다.


2. 복구 모드에서 root 항목을 선택.

복구 모드 진입 후 부팅 과정이 끝날 때까지 기다린다.

"Drop to root shell prompt" 옵션을 선택하여 명령어 입력 모드로 전환한다.


3. 파일 시스템 읽기 쓰기 상태로 전환.

복구 모드에서는 파일 시스템이 읽기 전용으로 설정되어 있다.

계정의 암호를 변경하기 전에 읽기와 쓰기가 가능하도록 아래 명령을 실행한다.

root@ubuntu:~# mount -rw -o remount /

4. 계정의 패스워드를 초기화.

 passwd 명령으로 사용자 계정의 패스워드를 초기화 한다.

root@ubuntu:~# passwd root Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully root@ubuntu:~#

패스워드를 초기화 후 복구 모드로 돌아간다.

root@ubuntu:~# exit




반응형
반응형

1)     WinRM 사용 시 이슈가 없을지 여부

 

    WinRM 관련된 취약점 관련 히스토리

ü  WinRM에 대해 Exploit-DB 사이트에 등록된 최신 취약점 날짜는 2012 11월이며, 1건 존재합니다.
이에 반해 SSH 17년도에 발견된 취약점이 존재하며, exploit-DB 사이트에 20건 이상 존재합니다.

ü  중국 해킹 그룹 3390에서 실제로 WinRM 프로토콜에 대한 취약점을 이용하여 공격을 진행한 사례가 있습니다.

관련 URL: http:/attack.mitre.org/wiki/Group/G0027

ü  WinRM 프로토콜 관련 공격 툴로는 Colbalt Strike, Metasploit 등의 도구가 있습니다.( 해당 도구에는 2012년 공개된 취약점이 포함되어 있습니다. )

ü  WinRM HTTP.sys를 사용하는 SOAP (WCF)를 사용하므로 관련 공격을 받을 수 있습니다.
2015
년도에 HTTP.sys에 대한 DOS Remote Code Execution 취약점이 발표되었으며, 현재는 패치된 상황입니다. (MS15-034)

관련 URL: https://isc.sans.edu/forums/diary/MS15034+HTTPsys+IIS+DoS+And+Possible+Remote+Code+Execution+PATCH+NOW/19583

 


 

2)     WinRM을 어떻게 사용해야 할지 (보안성 향상 방안)

ü  HTTPS 연결 설정 ( HTTPS 연결을 위해서는 각 호스트 별 인증서 설치 필요)

ü  Default Port 변경 5985(HTTP),5986(HTTPS) à xxxx , xxxx

ü  WinRM 이벤트에 대한 로깅 및 감독 (도메인 레벨의 그룹으로 이벤트 로그 이용)

ü  IP 접근 관리 (서버 방화벽 사용- WinRM 서비스에 대해 별도의 방화벽 룰을 생성)

반응형

'IT기술 관련 > 윈도우' 카테고리의 다른 글

Winrm 로그 포워딩 방법  (0) 2017.09.26
NFS,CIFS 차이점  (2) 2017.09.20
Winrm 보안설정 관련 자료  (0) 2017.09.11
WINRM - Windows Remote Management-<WinRM, WinRS)  (0) 2017.09.11
WMI 란  (0) 2017.09.11

+ Recent posts