This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Note: | |
- i suggest you for not delete any script or program that intruder put into your server, you can backup it and see how it's works. | |
so you can learn how it operated and can determine impact in your server. | |
- before or in parallel you do backup please make sure that your server is clean first by any backdoor !!!. | |
- you may considering reinstall your OS if the damaged from intruder was quite heavy, | |
eg: they are replacing some coreutils or some crucial daemon (SSH for instance). | |
in general you may see by detail any folder that zimbra user has write access to it. | |
but these are the common way you may check: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__author__ = ('Imam Omar Mochtar', 'iomarmochtar@gmail.com') | |
import urllib2 | |
import sys | |
import os | |
import re | |
FONTS_DIR = 'fonts' | |
CSS_FILE = 'offline.css' | |
site = sys.argv[1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/opt/zimbra/bin/zmpython | |
__author__ = ('Imam Omar Mochtar', ('iomarmochtar@gmail.com', 'imam.omar@jabetto.com')) | |
""" | |
Get all COS including user assigned to it. you may run this script inside zimbra's server (LDAP server is recommended) | |
""" | |
from com.zimbra.cs.account import Provisioning |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
__author__ = 'Imam Omar Mochtar <iomarmochtar@gmail.com>' | |
""" | |
this script assume zimbra smtp and mailbox service in same server with original ip (oip) is logged | |
the attempted/blocked IP will listed in AUDITWATCH chain. for applying block to it add rule in INPUT filter. | |
Example: | |
# iptables -t filter -I INPUT -j AUDITWATCH | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
__author__ = 'Imam Omar Mochtar <iomarmochtar@gmail.com>' | |
""" | |
Parse zimbra audit file for blocking any massive failed authentication which indicating brute force attempt | |
this script assume zimbra proxy and mailbox service in same server with original ip (oip) is logged | |
the attempted IP will listed in AUDITWATCH chain. for applying block combine run this command for add it in INPUT filter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Author: Imam Omar Mochtar <iomarmochtar@gmail.com> | |
* Date: 08/04/17 | |
* Reuse ajax-curd untuk menambahkan data secara async pada (sementara ini) komponen select. reload via pjax | |
*/ | |
namespace common\utils; | |
use yii\web\AssetBundle; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Author: Imam Omar Mochtar (iomarmochtar@gmail.com) | |
# Desc : Script for automating pgAdmin4 as Desktop mode, make sure postgresql-dev and python-dev package has been installed | |
# , was tested in Ubuntu 16.04 LTS | |
BASE_DIR="/opt/pgadmin4" | |
RUN_SCRIPT="$BASE_DIR/run.sh" | |
VIRTENV="/usr/local/bin/virtualenv" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__author__ = ('Imam Omar Mochtar', 'iomarmochtar@gmail.com') | |
from ozpy.mailbox import Mailbox | |
import sys | |
from pprint import pprint | |
import os | |
""" | |
Example of fetching Zimbra task and task list (recursively). | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
daemon off; | |
worker_processes 1; | |
user root; | |
error_log /opt/mailman3/var/logs/nginx-error.log; | |
pid /opt/mailman3/var/logs/nginx.pid; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import django | |
from django.template import Template, Context | |
from django.conf import settings | |
# optional if you just render str instead of template file | |
from django.template.loader import get_template | |
settings.configure(TEMPLATES=[{ | |
'BACKEND': 'django.template.backends.django.DjangoTemplates', | |
# if you want to render using template file | |
'DIRS': ['/tmp/template_dirs'] |