איסוף יומני AIDE (סביבה מתקדמת לזיהוי פריצות)

גרסת המנתח: 1.0

נתמך ב:

במאמר הזה מוסבר איך להטמיע יומני AIDE (סביבה מתקדמת לזיהוי פריצות) ב-Google Security Operations באמצעות Bindplane. ‫AIDE הוא כלי למעקב אחרי תקינות קבצים שמזהה שינויים בקבצים במערכות Linux/Unix.

לפני שמתחילים

חשוב לוודא שיש לכם את הדברים הבאים:

  • מכונה של Google SecOps
  • מארח Linux עם systemd שמריץ את AIDE בגרסה 0.18 ואילך (לתמיכה בפורמט JSON)
  • אם אתם משתמשים בשרת proxy, ודאו שהיציאות של חומת האש פתוחות בהתאם לדרישות של סוכן Bindplane.
  • גישה עם הרשאות לקובצי התצורה של AIDE

קבלת פרטי כניסה ל-Google SecOps בשביל סוכן Bindplane

כדי לאמת את סוכן Bindplane ב-Google SecOps, בוחרים באחת מהשיטות הבאות:

  • פריסות חדשות: משתמשים ב-Chronicle API (אפשרות 1).
  • פריסות קודמות: ממשיכים להשתמש בקובץ האימות להטמעת נתונים (אפשרות 2) עד שה-Ingestion API יופסק ב-20 ביולי 2027.
  1. נכנסים למסוףGoogle Cloud ובוחרים את הפרויקט ב- Google Cloud שמקושר למכונה של Google SecOps.
  2. נכנסים לדף IAM & Admin > Service Accounts.
  3. לוחצים על Create service account.
  4. מזינים את פרטי ההגדרה הבאים:
    • Service account name: מזינים שם לחשבון (לדוגמה, bindplane-ingest).
    • Service account description: מזינים תיאור (לדוגמה, Bindplane agent log ingestion).
  5. לוחצים על Create and continue.
  6. בקטע Grant this service account access to project, לוחצים על Select a role ובוחרים באפשרות Chronicle Editor.
  7. לוחצים על המשך ואז על סיום.
  8. לוחצים על חשבון השירות שיצרתם ועוברים לכרטיסייה Keys.
  9. לוחצים על Add key > Create new key.
  10. בוחרים באפשרות JSON ולוחצים על Create. קובץ המפתח יורד למחשב.
  11. שומרים את קובץ המפתח בתור ingestion-auth.json בספריית Bindplane collector (/opt/observiq-otel-collector/ingestion-auth.json ב-Linux או C:\Program Files\observIQ OpenTelemetry Collector\ingestion-auth.json ב-Windows), או מעדכנים את creds_file_path ב-config.yaml כך שיתאים לנתיב שבו שמרתם אותו.
  12. עוברים אל IAM & Admin > Settings ומעתיקים את הערך של Project number. תצטרכו אותו כדי להגדיר את הייצוא.

אפשרות 2: הורדה של קובץ האימות להטמעת נתונים (גרסה קודמת)

  1. נכנסים למסוף Google SecOps.
  2. עוברים אל הגדרות > ניהול נתונים > סוכני איסוף. אם אתם משתמשים בפלטפורמת SIEM בלבד, עוברים אל הגדרות > סוכני איסוף.
  3. מורידים את קובץ האימות להטמעת נתונים.
  4. שומרים את הקובץ בצורה מאובטחת במערכת שבה יותקן הסוכן של Bindplane.

איך מקבלים את מספר הלקוח ב-Google SecOps

  1. נכנסים למסוף Google SecOps.
  2. עוברים אל הגדרות > ניהול > פרופיל. אם אתם משתמשים בפלטפורמה של SIEM בלבד, עוברים אל הגדרות > פרופיל.
  3. מעתיקים את מספר הלקוח מהקטע פרטי הארגון ושומרים אותו.

התקנת הסוכן של Bindplane

מתקינים את סוכן Bindplane במערכת ההפעלה Linux לפי ההוראות הבאות.

התקנה ב-Linux

  1. פותחים טרמינל עם הרשאות root או sudo.
  2. מריצים את הפקודה הבאה:

    sudo sh -c "$(curl -fsSlL https://github.com/observiq/bindplane-agent/releases/latest/download/install_unix.sh)" install_unix.sh
    

מקורות מידע נוספים בנושא התקנה

אפשרויות התקנה נוספות מפורטות במדריך ההתקנה.

הגדרת סוכן Bindplane להטמעת Syslog ושליחה אל Google SecOps

  1. ניגשים לקובץ התצורה:

    • מאתרים את הקובץ config.yaml. בדרך כלל, הוא נמצא בספרייה /opt/observiq-otel-collector/ ב-Linux.
    • פותחים את הקובץ באמצעות כלי לעריכת טקסט (לדוגמה, nano או vi).
  2. עורכים את הקובץ config.yaml:

    receivers:
      udplog:
        # Replace the port and IP address as required
        listen_address: "0.0.0.0:514"
    
    exporters:
      chronicle/chronicle_w_labels:
        protocol: https
        # Region of your instance, for example us, europe, asia-southeast1
        location: <LOCATION>
        # Project number of the Google Cloud project linked to the instance
        project: '<PROJECT_NUMBER>'
        compression: gzip
        # Adjust the path to the credentials file you downloaded in Step 1
        creds_file_path: '/path/to/ingestion-authentication-file.json'
        # Replace with your actual customer ID from Step 2
        customer_id: <CUSTOMER_ID>
        endpoint: chronicle.googleapis.com
        # Add optional ingestion labels for better organization
        log_type: 'AIDE'
        raw_log_field: body
        ingestion_labels:
    
    service:
      pipelines:
        logs/source0__chronicle_w_labels-0:
          receivers:
            - udplog
          exporters:
            - chronicle/chronicle_w_labels
    
    • מחליפים את היציאה ואת כתובת ה-IP לפי הצורך בתשתית שלכם.
    • מחליפים את <LOCATION> באזור של המופע של Google SecOps (לדוגמה, us,‏ europe או asia-southeast1). המערכת מוסיפה את הערך הזה בתחילת chronicle.googleapis.com.
    • מחליפים את <PROJECT_NUMBER> במספר הפרויקט שמופיע בקטע IAM & Admin > Settings.
    • מחליפים את <CUSTOMER_ID> במספר הלקוח בפועל.
    • מעדכנים את /path/to/ingestion-authentication-file.json לנתיב הקובץ שבו נשמר קובץ המפתח של חשבון השירות (אפשרות 1) בשלב 1.

מייצא API להטמעה מדור קודם

  • אם אתם משתמשים בקובץ האימות להטמעת נתונים מאפשרות 2, החליפו את הבלוק exporters בקוד הבא. מגדירים את creds_file_path לנתיב של קובץ האימות להטמעת נתונים. אם המכונה נמצאת מחוץ לארה"ב, מחליפים את malachiteingestion-pa.googleapis.com בנקודת הקצה האזורית (לדוגמה, europe-malachiteingestion-pa.googleapis.com).

    exporters:
      chronicle/chronicle_w_labels:
        compression: gzip
        # Adjust the path to the credentials file you downloaded in Step 1
        creds_file_path: '/path/to/ingestion-authentication-file.json'
        # Replace with your actual customer ID from Step 2
        customer_id: <CUSTOMER_ID>
        endpoint: malachiteingestion-pa.googleapis.com
        # Add optional ingestion labels for better organization
        log_type: 'AIDE'
        raw_log_field: body
        ingestion_labels:
    

מפעילים מחדש את הסוכן של Bindplane כדי להחיל את השינויים.

  • כדי להפעיל מחדש את הסוכן של Bindplane ב-Linux, מריצים את הפקודה הבאה:

    sudo systemctl restart observiq-otel-collector
    

הגדרת העברת Syslog ב-AIDE

  1. פותחים את קובץ התצורה של AIDE:

    sudo vi /etc/aide/aide.conf
    
  2. עוברים לקטע הדיווח.

  3. מוסיפים את ההגדרות הבאות:

    • ‫report_level: מזינים list_entries.
    • ‫report_format: מזינים json (ל-AIDE בגרסה 0.18 ואילך) או plain.
    • ‫report_url: מזינים syslog:authpriv.

    הגדרה לדוגמה:

    ```ini
    report_level=list_entries
    report_format=json
    report_url=syslog:authpriv
    ```
    
  4. שומרים את ההגדרה.

  5. מגדירים את rsyslog כך שיעביר את יומני AIDE לסוכן Bindplane. פותחים את ההגדרות של rsyslog:

    sudo vi /etc/rsyslog.d/aide-forward.conf
    
  6. מוסיפים את ההגדרות הבאות כדי להעביר את היומנים של המתקן authpriv לסוכן Bindplane:

    authpriv.* @<BINDPLANE_AGENT_IP>:514
    
    • מחליפים את <BINDPLANE_AGENT_IP> בכתובת ה-IP של המארח של סוכן Bindplane.
    • משתמשים ב-@ ל-UDP או ב-@@ להעברת TCP.
  7. מפעילים מחדש את rsyslog:

    sudo systemctl restart rsyslog
    
  8. אם זו התקנה חדשה, מאתחלים את מסד הנתונים של AIDE:

    sudo aide --init
    sudo mv /var/lib/aide/aide.db.new /var/lib/aide/aide.db
    
  9. בודקים את ההגדרות:

    sudo aide --check
    
  10. הגדרת בדיקות אוטומטיות באמצעות cron:

    sudo crontab -e
    
  11. מוסיפים את השורה הבאה כדי להריץ את AIDE מדי יום בשעה 04:05:

    05 4 * * * root /usr/sbin/aide --check
    

טבלת מיפוי UDM

שדה ביומן מיפוי UDM Logic (פונקציה לוגית)
added_label principal.asset.attribute.labels ממוזג
changed_label principal.asset.attribute.labels ממוזג
old_acl_label principal.asset.attribute.labels ממוזג
old_md5_label principal.asset.attribute.labels ממוזג
old_perms_label principal.asset.attribute.labels ממוזג
old_sha256_label principal.asset.attribute.labels ממוזג
old_ts_label principal.asset.attribute.labels ממוזג
removed_label principal.asset.attribute.labels ממוזג
total_label principal.asset.attribute.labels ממוזג
file_path principal.file.full_path מיפוי ישיר
path principal.file.full_path מיפוי ישיר
old_size principal.file.size מיפוי ישיר
host principal.hostname מיפוי ישיר
sr security_result ממוזג
new_acl_label target.asset.attribute.labels ממוזג
new_md5_label target.asset.attribute.labels ממוזג
new_perms_label target.asset.attribute.labels ממוזג
new_sha256_label target.asset.attribute.labels ממוזג
new_ts_label target.asset.attribute.labels ממוזג
path target.file.full_path מיפוי ישיר
new_size target.file.size מיפוי ישיר
לא רלוונטי metadata.event_type קבוע: GENERIC_EVENT
לא רלוונטי metadata.product_name קבוע: AIDE
לא רלוונטי metadata.vendor_name קבוע: AIDE
לא רלוונטי principal.application קבוע: aide
לא רלוונטי principal.file.size קבוע: sizedata
לא רלוונטי target.file.size קבוע: sizedata_target
total_files", "added_files", "removed_files", "changed_files", "old_timestamp", "old_perms", "old_sha256", "old_md5", and "old_acl principal.asset.attribute.labels מופה מיומן השינויים
new_timestamp", "new_perms", "new_sha256", "new_md5", and "new_acl target.asset.attribute.labels מופה מיומן השינויים

יומן שינויים

הצגת יומן השינויים של המנתח הזה

הבעיה עדיין לא נפתרה? קבלת תשובות מחברי הקהילה וממומחי Google SecOps.