Winrm 로그 포워딩 방법

2017. 9. 26. 17:35·IT기술 관련/윈도우
반응형

출처: 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
'IT기술 관련/윈도우' 카테고리의 다른 글
  • NTLM 위험 요소
  • NTLM VS Kerberos 인증
  • NFS,CIFS 차이점
  • WinRM 관련 보안 이슈 확인 및 보안 조치 방안
호레
호레
창업 / IT / 육아 / 일상 / 여행
    반응형
  • 호레
    Unique Life
    호레
  • 전체
    오늘
    어제
    • 분류 전체보기 N
      • 법률
        • 기본
        • 개인정보보호법
        • 정보통신망법
        • 전자금융거래법
        • 전자금융감독규정
        • 신용정보법
        • 온라인투자연계금융업법
      • 창업
        • 외식업 관련
        • 임대업 관련
        • 유통업 관련
        • 세무 관련
        • 마케팅 관련
        • 기타 지식
        • 트렌드
        • Youtube
      • IT기술 관련
        • 모바일
        • 윈도우
        • 리눅스
        • MAC OS
        • 네트워크
        • 빅데이터 관련
        • A.I 인공지능
        • 파이썬_루비 등 언어
        • 쿠버네티스
        • 기타 기술
      • 퍼블릭 클라우드 관련
        • Azure
        • GCP
        • AWS
      • 정보보안 관련
        • QRadar
        • Splunk
        • System
        • Web
      • 기타
        • 세상 모든 정보
        • 서적
      • 게임 관련
        • 유니티
      • 부동산
      • 맛집 찾기
        • 강남역
        • 양재역
        • 판교역
        • ★★★★★
        • ★★★★
        • ★★★
        • ★★
        • ★
      • 결혼_육아 생활
        • 리얼후기
        • 일상
        • 육아
        • 사랑
        • Food
      • 영어
        • 스피킹
        • 문법
        • 팝송
        • 영화
      • K-컨텐츠
        • 드라마
        • 영화
        • 예능
      • 독서
      • 프로젝트 관련 조사
        • 시스템 구축
        • 로그 관련
        • 웹
        • APT
        • 모의 해킹
        • DB
        • 허니팟
        • 수리카타
        • 알고리즘
        • FDS
      • 기업별 구내 식당 평가
        • 한국관광공사
        • KT telecop
        • KT M&S
        • KT powertel
        • KT cs 연수원
        • 진에어
      • 대학 생활
        • 위드윈연구소
        • 진로 고민
        • 채용정보
        • 자동차
        • 주식
        • 악성코드
        • 게임 보안
      • 쉐어하우스
  • 블로그 메뉴

    • 홈
    • 게임 관련
    • IT 기술 관련
    • 태그
  • 링크

  • 공지사항

  • 인기 글

  • 태그

    무역전쟁
    맛집
    보안가이드
    AWS
    점심
    돈까스
    판교맛집
    수제버거존맛
    런치
    대통령
    상호관세
    복리후생
    이재곧죽습니다
    수제버거맛집
    유니티
    쥬쥬랜드
    수제버거
    마케팅
    판교
    판교역
  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.0
호레
Winrm 로그 포워딩 방법
상단으로

티스토리툴바