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
#!/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
<?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
#!/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
#!/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
#!/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
__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
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 Mochar', ('iomarmochtar@gmail.com',)) | |
""" | |
Simple XML builder, i create it for generating HTML tag(s) | |
""" | |
# alternative of xml attribute that also become keyword in python side | |
ALTERNATE_MAP = { | |
'klass': 'class' | |
} |
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)' | |
""" | |
WARNING : For learning purpose only !!! | |
This is example of utilizing ozpy for gaining zimbra admin rights through SSRF vulnerability | |
""" | |
import sys | |
import requests |