Skip to content

Improve visibility on the ioctl events #1328

Description

@Biagio-Dipalma

Motivation

This syscall can be handy to detect suspicious/malicious operations with network interfaces. To achieve this we need more details about the interface provided in the entry event: at the moment we see the memory address of the object (in the argument field).

for example, here an example of C code to set a network interface in promiscuos mode:

 ifr.ifr_flags |= IFF_PROMISC;

    if (ioctl(sock, SIOCSIFFLAGS, &ifr) == -1) {
        perror("Failed to set promiscuous mode");
        close(sock);
        exit(1);
    }

this is what we see in Falco:

14:19:29.179213999: Warning IOCTL event (evt.args=fd=3(<4>) request=8913 argument=7FFE4A0E97B0  fd.type=ipv4 fd.name= fd.sockfamily=ip proc.name=set-promiscous)
14:19:29.179219373: Warning IOCTL event (evt.args=fd=3(<4>) request=8914 argument=7FFE4A0E97B0  fd.type=ipv4 fd.name= fd.sockfamily=ip proc.name=set-promiscous)

Feature

in this case we might need to update the arguments to see the flags applied to the network interface and get only the malicious/suspicious ones.

Alternatives

Additional context

Activity

  1. added this to the TBD milestone on Sep 5, 2023
  2. andreaterzolo commented on Sep 6, 2023

    @andreaterzolo
    Contributor

    ei @Biagio-Dipalma! The request makes sense! We will try to schedule some time for this in the next release. For the moment I will put the milestone

    /milestone TBD

  3. modified the milestones: TBD, 0.14.0 on Sep 11, 2023
  4. andreaterzolo commented on Sep 26, 2023

    @andreaterzolo
    Contributor

    Here I think we can only get socket relative ioctl cmd. Handling all possible ioctl commands for all possible devices would be a huge task.

    I think we can reproduce in some way what sock_do_ioctl check if the cmd is relative to sockets is_socket_ioctl_cmd and then convert types to a PPM notation, WDYT?

  5. modified the milestones: 0.14.0, 0.15.0 on Dec 18, 2023
  6. modified the milestones: 0.15.0, 0.16.0 on Mar 11, 2024
  7. FedeDP commented on Apr 16, 2024

    @FedeDP
    Contributor

    Moving to 0.17.0.
    /milestone 0.17.0

  8. modified the milestones: 0.16.0, 0.17.0 on Apr 16, 2024
  9. FedeDP commented on May 21, 2024

    @FedeDP
    Contributor

    /milestone 0.18.0

    We had no time to work on this during the 0.17.0 release cycle.

  10. removed this from the 0.17.0 milestone on May 21, 2024
  11. 24 remaining items

  12. added this to the 0.24.0 milestone on Dec 19, 2025
  13. poiana commented on Mar 19, 2026

    @poiana
    Contributor

    Issues go stale after 90d of inactivity.

    Mark the issue as fresh with /remove-lifecycle stale.

    Stale issues rot after an additional 30d of inactivity and eventually close.

    If this issue is safe to close now please do so with /close.

    Provide feedback via https://github.com/falcosecurity/community.

    /lifecycle stale

  14. ekoops commented on Apr 16, 2026

    @ekoops
    Contributor

    /remove-lifecycle stale

  15. modified the milestones: 0.24.0, 0.25.0, 0.26.0 on Apr 16, 2026
  16. poiana commented on Jul 15, 2026

    @poiana
    Contributor

    Issues go stale after 90d of inactivity.

    Mark the issue as fresh with /remove-lifecycle stale.

    Stale issues rot after an additional 30d of inactivity and eventually close.

    If this issue is safe to close now please do so with /close.

    Provide feedback via https://github.com/falcosecurity/community.

    /lifecycle stale

  17. ekoops commented on Jul 17, 2026

    @ekoops
    Contributor

    /remove-lifecycle stale

  18. modified the milestones: 0.26.0, 0.27.0 on Sep 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions