Tags: linux

Sort by: Date / Title /

  1. 1 year ago by xarkam
    1. #!/bin/bash
    2. xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
    3. xrandr --addmode Virtual1 1920x1080_60.00
    4. xrandr --output Virtual1 --mode 1920x1080_60.00
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/2221"></script>
  2. 4 years ago by spirit
    1. #Adding/Modifying Rules
    2.  
    3. #    Watch for files
    4.  
    5. auditctl -w /etc/yum.conf -p wa  -k yum_watch
    6. auditctl -w /usr/bin/nmap -p x   -k nmap_watch
    7. auditctl -w /etc/shadow   -p rwa -k shadow_watch
    8.  
    9. #    Remove a rule using auditctl
    10.  
    11. auditctl -W /etc/shadow -p rwa -k shadow_watch
    12.  
    13. #    Watching for ptrace system call
    14.  
    15. auditctl -a entry,always -F arch=b64 -S ptrace -k info_scan
    16.  
    17. #    Suppress 32bit clock_gettime & fstat64 system calls
    18.  
    19. -a entry,never -F arch=b32 -S clock_gettime -k clock_gettime
    20. -a entry,never -F arch=b32 -S fstat64 -k fstat64
    21.  
    22. #    Audit files opened by a specific user
    23.  
    24. auditctl -a exit,always -S open -F auid=2010
    25. auditctl -a exit,always -F arch=b64 -F auid=2010  -F uid=2010 -F path=/etc/hosts -S open
    26.  
    27. #    Audit unsuccessful attempts for multiple system calls where user id is greater than or equal to 500
    28.  
    29. auditctl -a always,exit -F arch=b32 -S creat -S open -S openat -S truncate -S ftruncate -F exit=-EACCES -F auid>=500
    30. auditctl -a always,exit -F arch=b32 -S creat -S open -S openat -S truncate -S ftruncate -F exit=-EPERM -F auid>=500
    31.  
    32. #Reporting/Searching
    33.  
    34. #    List all rules
    35.  
    36. auditctl -l
    37.  
    38. #    List status
    39.  
    40. auditctl -s
    41.  
    42. #    Report on watched files. Date format is local to the server's date format.
    43.  
    44. aureport -f
    45. aureport -f --start 02/18/10 17:42:00
    46. aureport -f --start 02/18/10 17:00:00 --end 02/18/10 17:10:00
    47. aureport -f -ts this-week
    48. aureport -f -ts today
    49.  
    50. #    Search by system call
    51.  
    52. ausearch -sc ptrace -i
    53.  
    54. #    Search for user id or effective user id
    55.  
    56. ausearch -ui 2010
    57. ausearch -ue 2010
    58.  
    59. #    Lists all auth attempts and their result
    60.  
    61. aureport -au
    62.  
    63. #    List just logins
    64.  
    65. aureport -l
    66.  
    67. #    List account modification attempts.
    68.  
    69. aureport -m
    70.  
    71. #    Search events where success value is no, User id is 500 and key is nmap_watch
    72.  
    73. ausearch -sv no -ua 500 -k nmap_watch
    74.  
    75. #    Search by executable
    76.  
    77. ausearch -x /usr/bin/nmap
    78.  
    79. #    Search by terminal
    80.  
    81. ausearch -tm pts/0
    82.  
    83. #    Search by daemon. Stuff like cron log terminal as the daemon name
    84.  
    85. ausearch -tm cron
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/2171"></script>
  3. 4 years ago by spirit
    alt + impr ecran r e i s u  b
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/2163"></script>
  4. sponsorised links
  5. 4 years ago by spirit
    iptraf
    jnettop
    iftop
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/2162"></script>
  6. 4 years ago by spirit
    1. PS1="\[\e[30;1m\](\[\e[34;1m\]\A\e[30;1m\])-(\[\e[34;1m\]\u@\h\[\e[30;1m\]\[\e[30;1m\]:\[\[\e[32;1m\]\w\[\e[30;1m\])> \[\e[0m\]"
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/2156"></script>
  7. 4 years ago by spirit
    <150> represents facility and severity following RC3164 Syslog header use the current timestamp and a random hostname
    1. echo "<150>`env LANG=us_US.UTF-8 date "+%b %d %H:%M:%S"` host`date +%s` service: my special message goes here" | nc 192.168.0.1 -u 514 -w 1
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/2143"></script>
  8. 4 years ago by leomarcov
    Listado de las rutas de bibliotecas del sistema: /etc/ld.so.confex
    Además se incluyen las rutas de la variable de entrono: $LD_LIBRARY_PATH
    Mostrar las bibliotecas dependientes de un programa: ldd /bin/ls
    Recargar la cache de bibliotecas: ldconfig
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/2142"></script>
  9. 4 years ago by sox
    # Enable
    mysql> SET GLOBAL general_log = 'ON';
    
    # On Debian, you can check log on /var/run/mysqld/mysqld.log
    tail -f /var/run/mysqld/mysqld.log
    
    # Disable
    mysql> SET GLOBAL general_log = 'OFF';
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/2138"></script>
  10. 5 years ago by spirit
    1. #Linux
    2. for ip in $(seq 1 254); do ping -c 1 192.168.1.$ip>/dev/null; [ $? -eq 0 ] && echo "192.168.1.$ip UP" || : ; done
    3.  
    4. #Windows:
    5. for /L %I in (1,1,254) DO ping -w 30 -n 1 192.168.1.%I | find "Reply"
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/2130"></script>
  11. 5 years ago by neorom
    1. iptables -D table -s IP -j DROP
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/2129"></script>

First / Previous / Next / Last / Page 1 of 13 (126 posteets)