Ranjana Kishore

14 papers Journal 14
YearRankTypeTitle / Venue / Authors
2020 J jnl
Nucleic Acids Res.
Julie Agapite, Laurent-Philippe Albou, Suzi A. Aleksander, Joanna Argasinska, Valerio Arnaboldi, Helen Attrill, Susan M. Bello, Judith A. Blake, Olin Blodgett, Yvonne M. Bradford, Carol J. Bult, Scott Cain, Brian R. Calvi, Seth Carbon, Juancarlos Chan, Wen J. Chen, J. Michael Cherry, Jae-Hyoung Cho, Karen R. Christie, Madeline A. Crosby, Jeff de Pons, Mary E. Dolan, Gilberto dos Santos, Barbara Dunn, Nathan A. Dunn, Anne E. Eagle, Dustin Ebert, Stacia R. Engel, David Fashena, Ken Frazer, Sibyl Gao, Felix Gondwe, Joshua L. Goodman, L. Sian Gramates, Christian A. Grove, Todd W. Harris, Marie-Claire Harrison, Douglas G. Howe, Kevin L. Howe, Sagar Jha, James A. Kadin, Thomas C. Kaufman, Patrick Kalita, Kalpana Karra, Ranjana Kishore, Stanley J. F. Laulederkind, Raymond Y. N. Lee, Kevin A. MacPherson, Steven J. Marygold, Beverley Matthews, Gillian H. Millburn, Stuart R. Miyasato, Sierra A. T. Moxon, Hans-Michael Müller, Christopher J. Mungall, Anushya Muruganujan, Tremayne Mushayahama, Robert S. Nash, Patrick Ng, Michael Paulini, Norbert Perrimon, Christian Pich, Daniela Raciti, Joel E. Richardson, Matthew Russell, Susan Russo Gelbart, Leyla Ruzicka, Kevin Schaper, Mary Shimoyama, Matt Simison, Cynthia L. Smith, David R. Shaw, Ajay Shrivatsav, Marek S. Skrzypek, Jennifer R. Smith, Paul W. Sternberg, Christopher J. Tabone, Paul D. Thomas, Jyothi Thota, Sabrina Toro, Monika Tomczuk, Marek Tutaj, Monika Tutaj, Jose-Maria Urbano, Kimberly Van Auken, Ceri E. Van Slyke, Shur-Jen Wang, Shuai Weng, Monte Westerfield, Gary Williams, Edith D. Wong, Adam Wright, Karen Yook
2020 J jnl
Database J. Biol. Databases Curation
Ranjana Kishore, Valerio Arnaboldi, Ceri E. Van Slyke, Juancarlos Chan, Robert S. Nash, Jose-Maria Urbano, Mary E. Dolan, Stacia R. Engel, Mary Shimoyama, Paul W. Sternberg, The Alliance of Genome Resources
2020 J jnl
Nucleic Acids Res.
Todd W. Harris, Valerio Arnaboldi, Scott Cain, Juancarlos Chan, Wen J. Chen, Jae-Hyoung Cho, Paul Davis, Sibyl Gao, Christian A. Grove, Ranjana Kishore, Raymond Y. N. Lee, Hans-Michael Müller, Cecilia Nakamura, Paulo A. S. Nuin, Michael Paulini, Daniela Raciti, Faye Rodgers, Matthew Russell, Gary Schindelman, Kimberly Van Auken, Qinghua Wang, Gary Williams, Adam Wright, Karen Yook, Kevin L. Howe, Tim Schedl, Lincoln Stein, Paul W. Sternberg
2018 J jnl
Nucleic Acids Res.
Raymond Y. N. Lee, Kevin L. Howe, Todd W. Harris, Valerio Arnaboldi, Scott Cain, Juancarlos Chan, Wen J. Chen, Paul Davis, Sibyl Gao, Christian A. Grove, Ranjana Kishore, Hans-Michael Müller, Cecilia Nakamura, Paulo A. S. Nuin, Michael Paulini, Daniela Raciti, Faye Rodgers, Matthew Russell, Gary Schindelman, Mary Ann Tuli, Kimberly Van Auken, Qinghua Wang, Gary Williams, Adam Wright, Karen Yook, Matthew Berriman, Paul J. Kersey, Tim Schedl, Lincoln Stein, Paul W. Sternberg
2016 J jnl
Nucleic Acids Res.
Kevin L. Howe, Bruce J. Bolt, Scott Cain, Juancarlos Chan, Wen J. Chen, Paul Davis, James Done, Thomas A. Down, Sibyl Gao, Christian A. Grove, Todd W. Harris, Ranjana Kishore, Raymond Y. N. Lee, Jane Lomax, Yuling Li, Hans-Michael Müller, Cecilia Nakamura, Paulo A. S. Nuin, Michael Paulini, Daniela Raciti, Gary Schindelman, Eleanor Stanley, Mary Ann Tuli, Kimberly Van Auken, Daniel Wang, Xiaodong Wang, Gary Williams, Adam Wright, Karen Yook, Matthew Berriman, Paul J. Kersey, Tim Schedl, Lincoln Stein, Paul W. Sternberg
2014 J jnl
Nucleic Acids Res.
Todd W. Harris, Joachim Baran, Tamberlyn Bieri, Abigail Cabunoc, Juancarlos Chan, Wen J. Chen, Paul Davis, James Done, Christian A. Grove, Kevin L. Howe, Ranjana Kishore, Raymond Y. N. Lee, Yuling Li, Hans-Michael Müller, Cecilia Nakamura, Philip Ozersky, Michael Paulini, Daniela Raciti, Gary Schindelman, Mary Ann Tuli, Kimberly Van Auken, Daniel Wang, Xiaodong Wang, Gary Williams, J. D. Wong, Karen Yook, Tim Schedl, Jonathan Hodgkin, Matthew Berriman, Paul J. Kersey, John Spieth, Lincoln Stein, Paul W. Sternberg
2012 J jnl
Nucleic Acids Res.
Karen Yook, Todd W. Harris, Tamberlyn Bieri, Abigail Cabunoc, Juancarlos Chan, Wen J. Chen, Paul Davis, Norie De La Cruz, Adrian Duong, Ruihua Fang, Uma Ganesan, Christian A. Grove, Kevin L. Howe, Snehalata Kadam, Ranjana Kishore, Raymond Y. N. Lee, Yuling Li, Hans-Michael Müller, Cecilia Nakamura, Bill Nash, Philip Ozersky, Michael Paulini, Daniela Raciti, Arun Rangarajan, Gary Schindelman, Xiaoqi Shi, Erich M. Schwarz, Mary Ann Tuli, Kimberly Van Auken, Daniel Wang, Xiaodong Wang, Gary Williams, Jonathan Hodgkin, Matthew Berriman, Richard Durbin, Paul J. Kersey, John Spieth, Lincoln Stein, Paul W. Sternberg
2010 J jnl
Nucleic Acids Res.
Todd W. Harris, Igor Antoshechkin, Tamberlyn Bieri, Darin Blasiar, Juancarlos Chan, Wen J. Chen, Norie De La Cruz, Paul Davis, Margaret J. Duesbury, Ruihua Fang, Jolene Fernandes, Michael Han, Ranjana Kishore, Raymond Y. N. Lee, Hans-Michael Müller, Cecilia Nakamura, Philip Ozersky, Andrei Petcherski, Arun Rangarajan, Anthony Rogers, Gary Schindelman, Erich M. Schwarz, Mary Ann Tuli, Kimberly Van Auken, Daniel Wang, Xiaodong Wang, Gary Williams, Karen Yook, Richard Durbin, Lincoln D. Stein, John Spieth, Paul W. Sternberg
2008 J jnl
Nucleic Acids Res.
Anthony Rogers, Igor Antoshechkin, Tamberlyn Bieri, Darin Blasiar, Carol Bastiani, Payan Canaran, Juancarlos Chan, Wen J. Chen, Paul Davis, Jolene Fernandes, Tristan J. Fiedler, Michael Han, Todd W. Harris, Ranjana Kishore, Raymond Y. N. Lee, Sheldon J. McKay, Hans-Michael Müller, Cecilia Nakamura, Philip Ozersky, Andrei Petcherski, Gary Schindelman, Erich M. Schwarz, William Spooner, Mary Ann Tuli, Kimberly Van Auken, Daniel Wang, Xiaodong Wang, Gary Williams, Karen Yook, Richard Durbin, Lincoln D. Stein, John Spieth, Paul W. Sternberg
2007 J jnl
Nucleic Acids Res.
Tamberlyn Bieri, Darin Blasiar, Philip Ozersky, Igor Antoshechkin, Carol Bastiani, Payan Canaran, Juancarlos Chan, Nansheng Chen, Wen J. Chen, Paul Davis, Tristan J. Fiedler, Lisa R. Girard, Michael Han, Todd W. Harris, Ranjana Kishore, Raymond Y. N. Lee, Sheldon J. McKay, Hans-Michael Müller, Cecilia Nakamura, Andrei Petcherski, Arun Rangarajan, Anthony Rogers, Gary Schindelman, Erich M. Schwarz, William Spooner, Mary Ann Tuli, Kimberly Van Auken, Daniel Wang, Xiaodong Wang, Gary Williams, Richard Durbin, Lincoln D. Stein, Paul W. Sternberg, John Spieth
2006 J jnl
Nucleic Acids Res.
Erich M. Schwarz, Igor Antoshechkin, Carol Bastiani, Tamberlyn Bieri, Darin Blasiar, Payan Canaran, Juancarlos Chan, Nansheng Chen, Wen J. Chen, Paul Davis, Tristan J. Fiedler, Lisa R. Girard, Todd W. Harris, Eimear Kenny, Ranjana Kishore, Daniel Lawson, Raymond Y. N. Lee, Hans-Michael Müller, Cecilia Nakamura, Philip Ozersky, Andrei Petcherski, Anthony Rogers, William Spooner, Mary Ann Tuli, Kimberly Van Auken, Daniel Wang, Richard Durbin, John Spieth, Lincoln D. Stein, Paul W. Sternberg
2005 J jnl
Nucleic Acids Res.
Nansheng Chen, Todd W. Harris, Igor Antoshechkin, Carol Bastiani, Tamberlyn Bieri, Darin Blasiar, Keith Bradnam, Payan Canaran, Juancarlos Chan, Chao-Kung Chen, Wen J. Chen, Fiona Cunningham, Paul Davis, Eimear Kenny, Ranjana Kishore, Daniel Lawson, Raymond Y. N. Lee, Hans-Michael Müller, Cecilia Nakamura, Shraddha Pai, Philip Ozersky, Andrei Petcherski, Anthony Rogers, Aniko Sabo, Erich M. Schwarz, Kimberly Van Auken, Qinghua Wang, Richard Durbin, John Spieth, Paul W. Sternberg, Lincoln D. Stein
2004 J jnl
Nucleic Acids Res.
Todd W. Harris, Nansheng Chen, Fiona Cunningham, Marcela K. Tello-Ruiz, Igor Antoshechkin, Carol Bastiani, Tamberlyn Bieri, Darin Blasiar, Keith Bradnam, Juancarlos Chan, Chao-Kung Chen, Wen J. Chen, Paul Davis, Eimear Kenny, Ranjana Kishore, Daniel Lawson, Raymond Y. N. Lee, Hans-Michael Müller, Cecilia Nakamura, Philip Ozersky, Andrei Petcherski, Anthony Rogers, Aniko Sabo, Erich M. Schwarz, Kimberly Van Auken, Qinghua Wang, Richard Durbin, John Spieth, Paul W. Sternberg, Lincoln D. Stein
2003 J jnl
Nucleic Acids Res.
Todd W. Harris, Raymond Y. N. Lee, Erich M. Schwarz, Keith Bradnam, Daniel Lawson, Wen J. Chen, Darin Blasiar, Eimear Kenny, Fiona Cunningham, Ranjana Kishore, Juancarlos Chan, Hans-Michael Müller, Andrei Petcherski, Gudmundur A. Thorisson, Allen Day, Tamberlyn Bieri, Anthony Rogers, Chao-Kung Chen, John Spieth, Paul W. Sternberg, Richard Durbin, Lincoln D. Stein
yara/README.md
← Index yara/README.md markdown
# YARA Rules Directory

This folder contains YARA rules for scanning binary samples.

## Setting Up YARA-Forge Rules

To use the YARA-Forge rules from [https://github.com/YARAHQ/yara-forge](https://github.com/YARAHQ/yara-forge):

```bash
# Download the latest release
cd /path/to/redb/yara
# wget https://github.com/YARAHQ/yara-forge/releases/latest/download/yara-forge-rules-core.zip
wget https://github.com/YARAHQ/yara-forge/releases/latest/download/yara-forge-rules-extended.zip

# Extract rules
# unzip yara-forge-rules-core.zip
unzip yara-forge-rules-extended.zip
```

Available packages:
- `yara-forge-rules-core.zip` - Core rules (~5,000 rules)
- `yara-forge-rules-extended.zip` - Extended rules (~10,000 rules)
- `yara-forge-rules-full.zip` - Full rules (~11,000+ rules)

## Pre-compiling Rules (Recommended for Production)

For large rulesets like YARA-Forge, pre-compiling rules significantly improves startup time:

```bash
# Pre-compile all rules into a single .yarac file
python -m redb.extractors.yara --compile

# Or specify custom paths
python -m redb.extractors.yara --compile --rules-path /path/to/rules --output /path/to/output.yarac
```

This creates `yara/compiled_rules.yarac` which is loaded automatically on subsequent runs.

### Performance Comparison

| Method | First Scan Startup | Subsequent Scans |
|--------|-------------------|------------------|
| Source files (.yar) | ~10-30 seconds (11k rules) | Instant (cached) |
| Pre-compiled (.yarac) | ~1-2 seconds | Instant (cached) |

## Directory Structure

```
yara/
├── README.md
├── .gitkeep
├── compiled_rules.yarac    # (optional) Pre-compiled rules
├── packages/               # YARA-Forge packages
│   └── core/
│       └── *.yar
└── custom/                 # Your custom rules
    └── my_rules.yar
```

Rules are loaded in this priority:
1. `compiled_rules.yarac` (if exists) - fastest
2. All `.yar` and `.yara` files recursively - compiles on first run

## Usage

### Scan with YARA only

```bash
# Scan local files
python start.py --path /path/to/samples -y --repo my_repo --index_prefix redb

# Scan S3 samples
python start.py --s3 --repo bazaar -y --index_prefix redb

# Dry-run (print results instead of storing in ClickHouse)
python start.py --path /path/to/samples -y --dry-run --repo test --index_prefix redb
```

### Scan already-analyzed samples

Run YARA on samples that were previously analyzed (already in `basic_properties`).
Deduplication is handled by the `yara_matches` table — samples already scanned are
automatically excluded before processing begins:

```bash
# Scan all analyzed macho samples with YARA
python start.py --analyzed --magika macho -y --index_prefix redb

# Scan all analyzed PE samples with YARA
python start.py --analyzed --magika pe -y --index_prefix redb

# Scan all analyzed samples (no filetype filter)
python start.py --analyzed -y --index_prefix redb
```

### Partition large YARA runs by date

Combine `--analyzed` with `--range` to partition millions of samples into
manageable batches. Only samples in `basic_properties` AND within the date
range (by `first_seen` in `catalog_samples`) are processed:

```bash
# Scan analyzed PE samples from Feb 2025
python start.py --range 2025-02-01 2025-02-28 --analyzed --magika pebin -y --index_prefix redb

# Scan analyzed PE samples from first week of March 2025
python start.py --range 2025-03-01 2025-03-08 --analyzed --magika pebin -y --index_prefix redb
```

YARA dedup still applies — re-running a range safely skips already-scanned samples.

### Combined Features + YARA

Run feature extraction and YARA scanning together on the same samples:

```bash
# Local files with features + YARA
python start.py --path /path/to/samples --with-yara --repo my_repo --index_prefix redb

# S3 samples with features + YARA
python start.py --s3 --repo bazaar --with-yara --index_prefix redb
```

### Pre-compile Rules

```bash
# Compile and save to default location (yara/compiled_rules.yarac)
python -m redb.extractors.yara --compile

# Compile with custom paths
python -m redb.extractors.yara --compile --rules-path ./my_rules --output ./compiled.yarac
```

### Sync Rules to Database

Before batch scanning, sync rules to ensure all rule metadata is stored:

```bash
# Sync rules to database
python -m redb.extractors.yara --sync-rules

# Sync with custom source collection name
python -m redb.extractors.yara --sync-rules --source-collection yara-forge-core

# Compile and sync in one command
python -m redb.extractors.yara --compile --sync-rules
```

## ClickHouse Table Schema

YARA data uses a **normalized schema** with two tables for efficient storage.

### Matches Table: `yara_matches`

Stores one row per sample-rule match (optimized with binary sha256 and rule_id):

| Column | Type | Description |
|--------|------|-------------|
| sha256 | FixedString(32) | Binary SHA256 (32 bytes, use `hex(sha256)` to display) |
| rule_id | UInt64 | Unique rule identifier (xxHash64 of canonical rule content) |
| rule_name | LowCardinality(String) | YARA rule name (denormalized for convenience) |
| scan_date | DateTime64(3, 'UTC') | Scan timestamp |
| match_strings | Array(String) | Matched string identifiers |

### Rules Table: `yara_rules`

Stores rule metadata once per unique rule (deduplicated by rule_id):

| Column | Type | Description |
|--------|------|-------------|
| rule_id | UInt64 | Unique rule identifier (xxHash64 of canonical rule content) |
| rule_name | String | YARA rule name |
| source_collection | LowCardinality(String) | Source collection (e.g., 'yara-forge-core', 'malpedia') |
| ingested_at | DateTime64(3, 'UTC') | When this rule was ingested |
| rule_text | String | Full rule source code |
| rule_meta | JSON | Rule metadata (author, description, reference, etc.) |
| rule_tags | Array(LowCardinality(String)) | Rule tags |

### Schema Benefits

- **Binary SHA256**: 32 bytes vs 64 bytes (50% storage savings on hash columns)
- **UInt64 rule_id**: Fast joins and lookups via integer key
- **Content-based rule_id**: xxHash64 of canonical rule content (excluding metadata) for deduplication
- **Denormalized rule_name**: Allows queries without joins for common use cases

### Example Queries

```sql
-- Get matches with hex sha256
SELECT
    hex(m.sha256) as sha256,
    m.rule_name,
    m.match_strings
FROM yara_matches m
WHERE m.sha256 = unhex('abc123...')

-- Join with rules for full metadata
SELECT
    hex(m.sha256) as sha256,
    m.rule_name,
    m.match_strings,
    r.rule_meta,
    r.source_collection
FROM yara_matches m
JOIN yara_rules r ON m.rule_id = r.rule_id
WHERE m.sha256 = unhex('abc123...')

-- Find all samples matching a specific rule
SELECT hex(sha256), scan_date
FROM yara_matches
WHERE rule_name = 'APT_Lazarus_Loader'
ORDER BY scan_date DESC
```

## Environment Variables

| Variable | Description | Default |
|----------|-------------|---------|
| `YARA_RULES_PATH` | Override the YARA rules directory | `yara/` |
| `YARA_COMPILED_RULES` | Compiled rules filename | `compiled_rules.yarac` |
| `YARA_SOURCE_COLLECTION` | Default source collection name | `default` |