# Failed Logins

**URL:** <https://discuss.elastic.co/t/failed-logins/190118>\
**Category:** SIEM\
**Created:** [July 11, 2019, 10:36pm UTC](https://discuss.elastic.co/t/failed-logins/190118 "2019-07-11T22:36:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![wwalker](https://avatars.discourse-cdn.com/v4/letter/w/43a26b/32.png) [@wwalker](https://discuss.elastic.co/u/wwalker)\
**Post date:** [July 11, 2019, 10:36pm UTC](https://discuss.elastic.co/t/failed-logins/190118/1 "2019-07-11T22:36:36Z")

</div>

How are failed logins tracked? I have lots of `winlog.event_id: 4771` indicating a login failure, but if I look at SIEM, it shows thousands of successful logins and 0 failed logins.

---

<div class="post-metadata">

**Author:** ![cwurm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cwurm/32/34882_2.png) [@cwurm](https://discuss.elastic.co/u/cwurm)\
**Post date:** [July 15, 2019, 7:48am UTC](https://discuss.elastic.co/t/failed-logins/190118/2 "2019-07-15T07:48:42Z")

</div>

Hi @wwalker, failed logins have to contain `event.category: authentication` and `event.type: authentication_failure` (successful logins `event.type: authentication_success`). Winlogbeat has a [security module](https://www.elastic.co/guide/en/beats/winlogbeat/7.2/winlogbeat-module-security.html) since version 7.2 that fills those fields.

---

<div class="post-metadata">

**Author:** ![wwalker](https://avatars.discourse-cdn.com/v4/letter/w/43a26b/32.png) [@wwalker](https://discuss.elastic.co/u/wwalker)\
**Post date:** [July 16, 2019, 8:57pm UTC](https://discuss.elastic.co/t/failed-logins/190118/3 "2019-07-16T20:57:26Z")

</div>

Yes, I see that in the winlogbeat reference file and I've included it in my winlogbeat.yml config on the agents. Below is my config, the paths are valid and files are present.

```auto
winlogbeat.event_logs:
  - name: Application
    ignore_older: 720h
  - name: Security
    ignore_older: 720h
    processors:
      - script:
          lang: javascript
          id: security
          file: ${path.home}/module/security/config/winlogbeat-security.js
  - name: System
    ignore_older: 720h
  - name: Microsoft-Windows-Sysmon/Operational
    processors:
      - script:
          lang: javascript
          id: sysmon
          file: ${path.home}/module/sysmon/config/winlogbeat-sysmon.js

```

---

<div class="post-metadata">

**Author:** ![andrewkroh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrewkroh/32/3784_2.png) [@andrewkroh](https://discuss.elastic.co/u/andrewkroh)\
**Post date:** [July 17, 2019, 10:47pm UTC](https://discuss.elastic.co/t/failed-logins/190118/4 "2019-07-17T22:47:50Z")

</div>

The security log module is very new and only handles the event IDs documented at [https://www.elastic.co/guide/en/beats/winlogbeat/7.2/winlogbeat-module-security.html](https://www.elastic.co/guide/en/beats/winlogbeat/7.2/winlogbeat-module-security.html). But it is possible to customize the module until we can add 4771. For example a user has added 4634 to the module then opened a PR in [https://github.com/elastic/beats/pull/12906/files](https://github.com/elastic/beats/pull/12906/files).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 14, 2019, 10:47pm UTC](https://discuss.elastic.co/t/failed-logins/190118/5 "2019-08-14T22:47:53Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
